NetBSD-Bugs archive

[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>
To: gnats-bugs%NetBSD.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 
geometry
 detection
Date: Wed, 02 Jan 2008 11:44:40 +0100

 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --------------enigDD522320D99E7F4C95AA9B38
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 Martin Husemann wrote:
 > The following reply was made to PR bin/37656; it has been noted by GNAT=
 S.
 >=20
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: John Nemeth <jnemeth%victoria.tc.ca@localhost>
 > Cc: Eric Auge <eau%phear.org@localhost>, gnats-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 11:21:24 +0100
 >=20
 >  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 0s.
 > =20
 >  The MBR has a magic number at the end (see MBR_MAGIC_OFFSET and MBR_MA=
 GIC
 >  in bootblock.h).
 > =20
 >  Martin
 
 Can fdisk fail in writing this magic number ?
 This is an fdisk generated MBR partitioning on the cobalt, all tests
 I've done were reporting this bad magic number.
 
 But it now successfully boot, what the purpose of this "magic number" ?
 
 # fdisk
 Disk: wd0d
 NetBSD disklabel disk geometry:
 cylinders: 387621, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
 total sectors: 390721968
 
 BIOS disk geometry:
 cylinders: 1024, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
 total sectors: 390721968
 
 Partition table:
 0: Linux native (sysid 131)
     start 63, size 21105 (10 MB, Cyls 0-20)
         PBR is not bootable: All bytes are identical (0x00)
 1: Linux swap or Prime or Solaris (sysid 130)
     start 21168, size 1180368 (576 MB, Cyls 21-1191)
         PBR is not bootable: Bad magic number (0x5f6c)>
 2: NetBSD (sysid 169)
     start 1201536, size 389520432 (190196 MB, Cyls 1192-387620)
         PBR is not bootable: Bad magic number (0x0000)>
 3: <UNUSED>
 # uname -a
 NetBSD goodvibes 4.0_STABLE NetBSD 4.0_STABLE (GENERIC) #0: Fri Dec 28
 13:23:05 CET 2007
 root%bearcave.no.phear.org@localhost:/usr/obj/sys/arch/cobalt/compile/GENERIC 
cobal=
 t
 #
 
 Thanks,
 Regards,
 Eric.
 
 
 --------------enigDD522320D99E7F4C95AA9B38
 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
 
 iD8DBQFHe2scSdZNA80H8MYRAknRAKCc2oaUv0hPIUD8wvHsNvCky8KJxACgxsEP
 dXPR/9YMUzfO1B/DsDohyqw=
 =2WCl
 -----END PGP SIGNATURE-----
 
 --------------enigDD522320D99E7F4C95AA9B38--
 



Home | Main Index | Thread Index | Old Index