Package: mbr
Version: 1.1.11-5+b1
Severity: important
Tags: upstream

For years, I have run "install-mbr /dev/sda" on every hard disk where
I wanted to install Linux to its own partition, in addition to a
pre-existing Windows partition.  Last time I did, it resulted in an
unbootable Windows 7 system.  Here is what I discovered afterwards:

According to http://en.wikipedia.org/wiki/Master_boot_record, bytes
440--443 of the MBR are reserved for the Disk Id.  Windows 7 (and likely
also Vista) stores that Id in its Boot Configuration Data (BCD) file,
and fails to boot unless the Id on disk matches the one in the BCD.

The install-mbr program copies the original MBR from disk into RAM,
overwrites the first 512 - 66 == 446 bytes with <internal> code, appends
the original partition table at offset 446, then writes the sector back
to disk.  With the default <internal> code, the Disk Id is changed to
0x00000000, rendering W7 unbootable with overwhelming probability.

I don't know if bytes 440--446 of the <internal> MBR are useful code
or leftover garbage, therefore I'm not able to suggest a patch.
Please consider adding to the man page (and perhaps the executable itself)
a prominent warning against using install-mbr on a disk containing
Windows Vista or later.

For the record, I was able to restore the disk-id by examining the BCD
via hexdump, guessing the original id, and restoring it on disk via the
expert menu of the fdisk utility.  Needless to say, I promptly purged
the mbr package from my system.

Best regards,
        g

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages mbr depends on:
ii  libc6  2.13-38

mbr recommends no packages.

mbr suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to