# make 2GB image file:
dd if=/dev/zero of=./memstick.img bs=1m count=2000
# load image as virtual disk device:
mdconfig -a -t vnode -f ./memstick.img -u 0
fdisk -iI /dev/md0
bsdlabel -wB /dev/md0s1
newfs /dev/md0s1a
mount /dev/md0s1a /mnt
cd /usr/src
make installkernel installworld DESTDIR=/mnt
umount /mnt
# insert memstick now, assuming it will be /dev/da0...
# raw copy virtual disk content to memstick.
dd if=/dev/md0 of=/dev/da0 bs=1m
No comments:
Post a Comment