From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 17:49:49 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 7936E1065673 for ; Tue, 16 Jun 2009 17:49:49 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id 230288FC12 for ; Tue, 16 Jun 2009 17:49:48 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 70193 invoked from network); 16 Jun 2009 12:23:07 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 16 Jun 2009 12:23:07 -0500 Received: (qmail 91540 invoked by uid 2001); 16 Jun 2009 17:23:06 -0000 Date: Tue, 16 Jun 2009 12:23:06 -0500 From: "Rick C. Petty" To: Daniel O'Connor Message-ID: <20090616172306.GA91395@keira.kiwi-computer.com> References: <200906162350.40221.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906162350.40221.doconnor@gsoft.com.au> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Loader reading FAT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 17:49:49 -0000 On Tue, Jun 16, 2009 at 11:50:38PM +0930, Daniel O'Connor wrote: > > Unfortunately I can't get the loader to read a FAT partition which > surprises me because I think it should be able to.. I believe that > libstand can do it (I can see the code :) however when I list the USB > stick device I get an empty directory listing. I read somewhere that there isn't enough space in the boot2 loader to put such logic. You're only guaranteed 15 512-byte sectors or 7680 bytes, if you use any UFS partition. It's pretty tight; I think you will find it difficult to insert another file system in there, especially one as complicated as msdos. libstand is 223 KB, so it's not as trivial as you think. Theoretically it would be possible: for example, if you're willing to set aside a separate partition you would have as much room as you want. Or if you put it at the front of a UFS partition, you have just under 256 KB of room since our UFS code will search for the superblock at a byte offset of 262144, but there aren't any knobs to newfs so you'd have to hack it together. Take a look at /usr/src/sys/boot/i386/boot2/ for starters. -- Rick C. Petty