From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 14 04:40:20 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98ABA106564A; Sun, 14 Jun 2009 04:40:20 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id E3BFF8FC12; Sun, 14 Jun 2009 04:40:18 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-137-119.lns11.adl6.internode.on.net [121.45.137.119]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n5E4eHIs062185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 14 Jun 2009 14:10:17 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Adrian Chadd Date: Sun, 14 Jun 2009 14:10:13 +0930 User-Agent: KMail/1.9.10 References: <200906140015.44560.doconnor@gsoft.com.au> <200906141034.01890.doconnor@gsoft.com.au> In-Reply-To: <200906141034.01890.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2601132.gjJxcnWojr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906141410.14771.doconnor@gsoft.com.au> X-Spam-Score: -1.244 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Booting from FAT(32) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 04:40:20 -0000 --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--