Subject: Re: renaming /boot to /boot_
To: Wolfgang Solfrank <ws@tools.de>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 11/16/1999 09:34:27
Summary - boot.${MACHINE} should be ok now!

Wolfgang Solfrank wrote:

> >  a) Subdirectories are out because of the 7.5k code size limit on
> >     some architectures.
> 
> Hmm, the code in sys/lib/libsa/cd9660.c includes subdirectory searching
> code; it even cannot (currently) be compiled without this support.

I was talking about a generic scheme for all bootblock types, not just
ISO bootblocks.  I think it'd be better to always have the same name for
the bootblocks regardless of root files system type.

Also, it appears that either the first 16k or 32k of an ISO filesystem
is available for bootblock use - do you know if this is true?

> >  b) The apparent ISO limitation of an 8.3 filename.  Todd Whitesel
> >     says that "pure" ISO filesystem allow more than this, but the
> >     code in sys/lib/libstand/cd9660.c couldn't find a "boot.pmax".
>                       ^^^^^^^^
> Certainly you mean libsa here.

Yep - got it wrong from memory.

> Hmm, are you sure with this?  The code in there doesn't even have any
> length checks against some fixed maximum at all.  It should be able
> to even find longer names than the allowed 32 characters, if those were
> recorded on the disk.

It turns out to be driver error on my part - as Todd Whitesel pointed
out, mkisofs needs a "-l" option to generate 32 character file names
otherwise it defaults to using 8.3 filenames.

> If it couldn't find a file with that name, but could find a file with
> a shorter name, there is something strange going on there.

My tests involved having "boot.pmax" on the ISO filesystem and the
first stage trying to open that filename.  A hex dump of the start of
the filesystem showed only a BOOT.PMA in the directory.  Being an ISO
novice, I wrongly assumed that this filesystem had an 8.3 limit.

For the paranoid, there's the benefit that the ISO bootblocks are quite
a bit smaller than the ufs bootblocks.  On the pmax:

	checking sizes for bootxx_cd9660... OK - 1384 bytes free
	checking sizes for bootxx_ffs... OK - 392 bytes free

It's probably not unreasonable then to add a check that if
boot.${MACHINE} fails to load then to try only using the last three
characters of boot.${MACHINE}.


So, it appears that boot.${MACHINE} is now a valid option for all
current boot media.  Is there anyone unhappy with this naming
convention?

Simon.