Date: Sun, 14 Jun 2009 14:10:13 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Adrian Chadd <adrian@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Booting from FAT(32) Message-ID: <200906141410.14771.doconnor@gsoft.com.au> In-Reply-To: <200906141034.01890.doconnor@gsoft.com.au> References: <200906140015.44560.doconnor@gsoft.com.au> <d763ac660906130833h1043b1eat3b83964bc81bcbea@mail.gmail.com> <200906141034.01890.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Sun, 14 Jun 2009, Daniel O'Connor wrote:
> > I've been meaning to trial it out actually. It sure would be
> > interesting to boot a kernel/mfs off of a DOS bootable FAT USB.
>
> I think you can do it if you makefs /boot and feed it to syslinux
> using memdisk (I plan on trying this today).
I used Luigi's iso2flash.sh script (the guts thereof) and it worked fine, ie..
mkdir /tmp/boot
cp -r /boot /tmp/boot
[ fixup /tmp/boot/boot how you like ]
makefs -t ffs -o bsize=4096 -o fsize=512 -f 50 /tmp/boot.img /tmp/boot
bsdlabel -Bw -f /tmp/boot.img auto
bsdlabel -f /tmp/boot.img | sed -e '/ c:/{p;s/c:/a:/;}' | bsdlabel -R -f /tmp/boot.img /dev/stdin
gzip /tmp/boot.img
(Using -B obviated the need for the dd magic in the original script)
Copy /tmp/boot.img.gz to the USB stick and then you can use a syslinux conf
like..
label FreeBSD
kernel memdisk
append initrd=boot.img.gz
I got the kernel to mount root off the FAT32 partition although you need to
make sure /dev exists and all the binaries & libs it wants are present.
(eg mkdir /mnt/dev ; cp -r /bin /sbin /lib /libexec /mnt)
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
iD8DBQBKNH8u5ZPcIHs/zowRAlXYAJ9pNfI4gxKeeNhtjsP8kwq4zcpsUwCfdK3r
1GaLvIjS7VGFolIqb81hE1M=
=9IU4
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906141410.14771.doconnor>
