Subject: Re: booting past 2G...
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 02/26/2003 21:32:47
>>> Most sparc systems have trouble booting if the root partition
>>> extends beyond the first 2 GB of your disk.
>> i have a 9g ibm drive on my ss5 (netbsd ~1.5) with ~8g of that being
>> /, it booted just fine.
> Could it be that "extends beyond" should instead be "starts above?"

Yes and no.

The problem is with machines whose ROM code doesn't know how to do
10-byte CDBs.  This means they can address only the first 1G, or 2G, or
whatever it is, of the disk.  (I forget exactly how many bits of block
number a 6-byte CDB contains.)

Provided all your boot stuff is below the magic cutoff, you're golden,
and this is true regardless of the size of the root partition.  The
reason the size of the root partition matters is that you don't
generally have detailed control over what blocks the filesystem will
allocate for tomorrow's newly-installed kernel, and if it happens to
allocate something over the line, it'll break.

This also varies slightly depending on kernel version, too, because the
block allocation algorithms changed a version or two ago.  It also
depends on whether you cp the kernel into / or mv it there, because cp
will allocate a new inode and new blocks - and it will try to put it in
the same cg the containing directory is in, and that's generally inode
2, in cg 0, so it will _tend_ to end up in cg 0 and therefore early in
the partition.  Thus, even if your root partition is way over the
limit, provided you always cp your kernels to / and your filesystem
isn't very close to full, you can probably get away with it for a long
time.

But that's only "probably".  That's why I now have a separate
filesystem for just bootblocks and kernels, on a tiny little 50M
partition near the beginning of the disk, with kernels configured "root
on sd0e" and a symlink /netbsd -> kernels/netbsd.  (And a /kernels
mount listed in fstab.)  If I ever really need to, I can boot with -a
and tell it where to get /.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B