On Fri, Jan 23, 2009 at 02:31:01PM +0000, Bryn M. Reeves wrote: > James Courtier-Dutton wrote: > > I thought that valid boot sectors have a checksum or some kind of > > signature bytes. It might be worth verifying that it is a valid boot > > sector before blindly using it. If it is not a valid boot sector, one > > might as well fill it with zeros. > > Which field are you thinking of here? There's the (optional) 32-bit > disk signature at 0x01b8 (immediately following the executable code) > and the 16-bit MBR signature at 0x01fe. > > From what I can see, neither of these would be suitable. > > The disk signature is optional and is only intended to be a unique > identifier. The "MBR signature" is intended to signify a valid MBR but > it's not based on any kind of checksum - if the field contains > "0xaa55" it's valid, any other value and it's not. > > I just checked a bunch of devices that have valid MSDOS partition > tables but do not have valid boot code (removable USB devices, some > auxiliary HDs and a bunch of LUNs on my iscsi test box). All of these > had the 0xaa55 signature, but no valid bootcode at offset 0, so I > don't think we can use this as a check.
Hi, how could we push this forward? Is zeroing bootcode of newly created extended partition worth the trouble? Thanks, -- Best regards / s pozdravem Petr Uzel, Packages maintainer --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: [email protected] Lihovarská 1060/12 tel: +420 284 028 964 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

