Subject: Re: unbootable new disk?
To: David Laight <email@example.com>
From: Steven M. Bellovin <firstname.lastname@example.org>
Date: 11/27/2004 12:31:05
In message <20041127091152.GA1619@snowdrop.l8s.co.uk>, David Laight writes:
>On Fri, Nov 26, 2004 at 09:26:08PM -0500, Steve Bellovin wrote:
>Some responses to earlier in the thread...
>The "no operating system" error (reported on the original mail) was
>probably the "No operating system" error message from the NetBSD 'normal'
>mbr code. The 'bootselect' versions report 'Error 3' instead.
>So the 'use entire disk' made to difference.
>That error is reported if the first sector of the 'root' partition
>definitely doesn't contain the boot code.
>This is usually because 'installboot' failed to run properly.
>(note that disklabel -B isn't the way to set up that area - except on hp300)
>In this case the mbr code will have read sector 63 - and not found the
>0xaa55 at the end. This read should be largely independant of the disk
>geometry in use - the sectors/track is almost always 63.
>> I changed the BIOS setting for the disk to LBA, from "Auto" (the other
>> choices were "Large" and "C/H/S"); after that, it worked just fine.
>That makes this all look like a BIOS bug!
>Probably something to do with the geometry translations!
>I don't actually know what the BIOS means by 'LBA' and 'Auto', but you
>might see the reported geometry change when you select different options.
>> Looking back at my postings I see this:
>> # fdisk wd1
>> Disk: /dev/rwd1d
>> NetBSD disklabel disk geometry:
>> cylinders: 310101, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
>> total sectors: 312581808
>> BIOS disk geometry:
>> cylinders: 1024, heads: 240, sectors/track: 63 (15120 sectors/cylinder)
>> total sectors: 268435455
>> Why do the BIOS and NetBSD number of sectors disagree? The same is
>> true now, with the system running. Yes, it's a 160G drive, but I have
>> a 160G drive on another machine, and the two geometries give the same
>> total on it. Is this some BIOS limitation in dealing with a large
>> drive? And might that have been at the root of my problem?
>Well, 268435455 is 0xfffff - which probably means that the BIOS doesn't
>support LBA48 reads for disks > 137GB. You aren't trying to read beyond
>that point - at least the failure is being reported before any attempt to
>read such sectors (/boot and /netbsd probably have to be below the 137GB
Right -- and now that I have it working, I'm quite certain that the
problem is the 137G boundary. (The disk has a jumper to limit it to
32G -- which isn't what I bought a 160G drive for...)
I have two questions now. The first is whether or not some part of
NetBSD -- sysinst, fdisk, installboot -- should detect the problem and
issue a warning mesage. To me, the clue is the differing numbers of
sectors reported by NetBSD and the BIOS. The second is what I should
do now: should I try a BIOS update, or should I just repartition the
disk so that wd0a is within the 137G limit? (Actually, the INSTALL
documentation should warn of this, too, and suggest that the default
partitioning -- everything in 'a' -- is a bad idea if you see the
warning about the BIOS versus your disks....)
--Steve Bellovin, http://www.research.att.com/~smb