分类: BSD
2008-04-07 21:38:10
option RAMDISK_HOOKS option MINIROOTSIZE=3560 pseudo-device rd 1 |
# dd if=/dev/zero of=/ramdisk bs=512 count=3560 # vnconfig -c svnd0 /ramdisk # disklabel -r -w svnd0 rdroot # newfs -m 0 -S 512 -i 4096 /dev/svnd0a # mount /dev/svnd0a /mnt # mkdir /mnt/{dev,bin,sbin,etc} # cp /dev/MAKEDEV /mnt/dev # cp /bin/{sh,ls} /mnt/bin # cp /sbin/init /mnt/sbin # cd /mnt/dev/ && ./MAKEDEV ramdisk # echo 'echo "This is my minibsd all in kernel" && /bin/sh' > /mnt/etc/rc # sync && umount /mnt # sync && vnconfig -u svnd0 && sync |
# cc -o rdsetroot /usr/src/distrib/common/elfrdsetroot.c # ./rdsetroot /minibsd < ramdisk |
# gzip -9 -c /minibsd > /minibsd.gz |
# disklabel -B -w -r /dev/fd0a fd1440 # newfs -m 0 -S 512 /dev/fd0a # mount /dev/fd0a /mnt # cp /usr/mdec/boot /mnt # cp /minibsd.gz /mnt/bsd |