[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/37656: fdisk segfault on invalid MBR entries on non-x86 geometry detection
The following reply was made to PR bin/37656; it has been noted by GNATS.
From: Eric Auge <eau%phear.org@localhost>
Cc: gnats-admin%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Subject: Re: bin/37656: fdisk segfault on invalid MBR entries on non-x86
Date: Wed, 02 Jan 2008 12:59:08 +0100
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
John Nemeth wrote:
> The following reply was made to PR bin/37656; it has been noted by GNAT=
> From: jnemeth%victoria.tc.ca@localhost (John Nemeth)
> To: Eric Auge <eau%phear.org@localhost>, gnats-bugs%NetBSD.org@localhost
> Cc: netbsd-bugs%NetBSD.org@localhost
> Subject: Re: bin/37656: fdisk segfault on invalid MBR entries on non-x8=
6 geometry detection
> Date: Wed, 2 Jan 2008 03:20:39 -0800
> On May 25, 6:20am, Eric Auge wrote:
> } Martin Husemann wrote:
> } > The following reply was made to PR bin/37656; it has been noted by=
> } >
> } > From: Martin Husemann <martin%duskware.de@localhost>
> } > Subject: Re: bin/37656: fdisk segfault on invalid MBR entries on n=
on-x86 geometry detection
> } > Date: Wed, 2 Jan 2008 11:21:24 +0100
> } >
> } > On Wed, Jan 02, 2008 at 02:13:59AM -0800, John Nemeth wrote:
> } > > Not sure how this is handled, but yes the MBR would be all=
> } >
> } > The MBR has a magic number at the end (see MBR_MAGIC_OFFSET and M=
> } > in bootblock.h).
> The issue here is using the partition table to guess the disk
> geometry. Obviously, if there isn't a valid partition table you can't=
> do that. BTW, I wrote code to do this 15 years ago. At that time, PC=
> BIOSes didn't have an "auto" setting for detecting disks automatically=
> so you had to manually tell it the size of the disk. Usually if you
> set the "type" to "47", it would let you enter the geometry manually.
> My program told you what numbers to stick in there, so I called it
> } Can fdisk fail in writing this magic number ?
> Only if there is a serious bug.
> } This is an fdisk generated MBR partitioning on the cobalt, all tests=
> } I've done were reporting this bad magic number.
> If that is the case, then it shouldn't have been using the
> partition table to guess the disk geometry.
yep but using what as we are not on x86 arch ? I don't think there is
BIOS calls on cobalt, I'm no expert though.
> } But it now successfully boot, what the purpose of this "magic number=
> To let the BIOS know that it is a valid boot sector. If the
> number isn't there, then the machine shouldn't boot at all.
My previous post was including an fdisk output showing the "bad magic
number" on each partition reported by fdisk but still the cobalt boot
fdisk was the tool used to build the partition.
> }-- End of excerpt from Eric Auge
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Main Index |
Thread Index |