View Full Version : [Solved] How to make memstick.img
ericturgeon
February 9th, 2010, 11:43
I need info to make memstick.img for GhostBSD project.
If some one have an how to to make an memstick image.
Please reply.
thanks
MG
February 9th, 2010, 23:02
# 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
Don't forget to configure /etc/fstab to mount / from USB
Markand
September 20th, 2010, 19:00
Don't forget to make DESTDIR=/mnt distribution too.
mix_room
September 22nd, 2010, 08:57
If you already have an image which will fit on the memory-stick you can try
dd if=/dev/zero of=/dev/da0 bs=1k count=1
bsdlabel -Bw da0 auto
newfs -L FreeBSD /dev/da0a
mdconfig -a -t vnode -f X.Y-IMGFILE -u 0 && mount -r -t cd9660 /dev/md0 /mnt/iso
mount /dev/da0a /mnt/USB-Stick
copy all files from your mounted cd in to your USB-Stick, after that you need to create a fstab for your USB-Stick
vi /mnt/USB-Stick/etc/fstab and put following in:
/dev/ufs/FreeBSD / ufs ro 0 0
http://www.freebsdnews.net/2009/06/15/install-freebsd-80-usb-memory-stick/
lgfang
November 6th, 2010, 16:45
It confused me for some time:
why "copying all files" will do the job. Aren't we supposed to also install boot loader (or something alike) into the MBR of the img?
wblock@
November 6th, 2010, 17:12
It confused me for some time:
why "copying all files" will do the job. Aren't we supposed to also install boot loader (or something alike) into the MBR of the img?
The bsdlabel command above does that.
lgfang
November 6th, 2010, 17:56
thanks
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.