you can install woody on to a flash drive .. .then mount / in a ram drive
Code:
gw-fx:~# cat /etc/debian_version
3.0
gw-fx:~# mount
rootfs on / type rootfs (rw)
tmpfs on / type tmpfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw)
gw-fx:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
#
tmpfs / tmpfs rw 0 0
proc /proc proc defaults 0 0
gw-fx:~#
wr to save data .. or wr -a to save everything
Code:
gw-fx:~# cat /usr/local/sbin/wr
#!/bin/sh
# Vadim Berkgaut 2003
# Dumps changes in tmpfs to flash, Cisco style. Uses rsync
# to avoid excessive writing to flash.
while true ; do
case "$1" in
a|-a|all|-all|--all) WRITE_ALL='y';;
v|-v|verbose|-verbose|--verbose) WRITE_VERBOSE='v';;
av|va|-av|-va) WRITE_ALL='y' ; WRITE_VERBOSE='v';;
'') cd / ; break;;
*) echo "Usage: wr [a|all] [v|verbose]" ; exit 1;;
esac
shift
done
RSYNC="/usr/bin/rsync"
test -f $RSYNC || exit 1
RSYNC="$RSYNC -ax$WRITE_VERBOSE --delete --temp-dir=/tmp"
mount -t ext2 -o noatime /dev/hda2 /mnt || exit 1
$RSYNC --exclude="/etc/fstab" --exclude="/etc/motd" \
--exclude="/etc/ioctl.save" --exclude="/etc/mtab" \
--exclude="/etc/network/ifstate" \
/etc /mnt
for FILE in /root/.profile /root/.bashrc /root/.mc/ini ; do
DIR=`dirname /mnt$FILE`
test -e $FILE && { test -d $DIR || mkdir $DIR; } && \
$RSYNC $FILE /mnt$FILE || rm -f /mnt$FILE
done
echo "config saved"
if [ $WRITE_ALL ] ; then
$RSYNC \
--exclude="/lib/modules" --exclude="/usr/share/locale" \
/bin /lib /sbin /usr /home /mnt
$RSYNC --exclude="available*" \
/var/lib/dpkg /var/lib/apt /mnt/var/lib
echo "system saved"
fi
umount /mnt
Bookmarks