Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2009 16:35:13 +0100
From:      "army.of.root" <army.of.root@googlemail.com>
To:        Andrew Snow <andrew@modulus.org>
Cc:        freebsd-stable@freebsd.org, Clifton Royston <cliftonr@lava.net>
Subject:   Re: Installing FreeBSD from USB flash drive - some experiments
Message-ID:  <49B7DA31.9@googlemail.com>
In-Reply-To: <49B73BBE.3020302@modulus.org>
References:  <20090311032557.GA7735@lava.net> <49B73BBE.3020302@modulus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Snow wrote:
> 
> Here's the steps I use to create a 1GB USB image:
> 
> # dd if=/dev/zero of=bootable.image bs=1m count=1 oseek=1000 conv=sparse
> # mdconfig -a -t vnode -f bootable.image -u 0
> # newfs -m 0 -o space -n /dev/md0
> # mount /dev/md0 /mnt
> 
> # cd /usr/src
> # make installworld DESTDIR=/mnt
> # make distribution DESTDIR=/mnt
> # make installkernel DESTDIR=/mnt
> # umount /mnt
> 
> At this point you have a file "bootable.image" but instead of actually 
> making that a bootable dd image, I choose to create a dump file which is 
> a bit more flexible as you can restore it to a USB stick of any size.
> 
> # dump -0 -C 8 -f - /dev/md0 | gzip -9 > bootable.dump.gz
> # mdconfig -d -u 0
> 
> 
> At this point, you have a dump file which you can use to create a 
> bootable USB as follows:
> 
> Assuming the USB stick is /dev/da0 !
> 
> # dd if=/dev/zero of=/dev/da0 bs=16k
> # fdisk -BI /dev/da0
> # disklabel -B -w /dev/da0s1
> # newfs -m 0 -o space -n /dev/da0s1a
> # mount -o noatime,async /dev/da0s1a /mnt
> # gzcat bootable.dump.gz | ( cd /mnt ; restore -rvf - )
> # umount /mnt
> 
> 
> 
> Hope that helps
> 
> 
> - Andrew

Hi,

I didnt test this specific soulution, but I did something similar some time 
ago. Could you put this sketch somewhere visible on the web? - Like the Wiki or 
maybe open a thread in the Forum.

Thanks :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49B7DA31.9>