Loader reading FAT

Daniel O'Connor doconnor at gsoft.com.au
Wed Jun 17 02:19:20 UTC 2009


On Wed, 17 Jun 2009, Rick C. Petty wrote:
> 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.

In effect I will be doing that, I can make a syslinux memdisk which 
holds boot0/1/2 + loader in a UFS partition. I would just prefer to be 
able to read the kernel, modules & MFS root off FAT32.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20090617/4a7afa3d/attachment.pgp


More information about the freebsd-hackers mailing list