Skip site navigation (1)Skip section navigation (2)
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
--nextPart2601132.gjJxcnWojr
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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, i=
e..
mkdir /tmp/boot
cp -r /boot /tmp/boot
[ fixup /tmp/boot/boot how you like ]
makefs -t ffs -o bsize=3D4096 -o fsize=3D512 -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=
=20
like..
label FreeBSD
kernel memdisk
append initrd=3Dboot.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)

=2D-=20
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

--nextPart2601132.gjJxcnWojr
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)

iD8DBQBKNH8u5ZPcIHs/zowRAlXYAJ9pNfI4gxKeeNhtjsP8kwq4zcpsUwCfdK3r
1GaLvIjS7VGFolIqb81hE1M=
=9IU4
-----END PGP SIGNATURE-----

--nextPart2601132.gjJxcnWojr--



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