Comment 7 for bug 730225

Revision history for this message
billbear (ninth-9) wrote : Re: grub-install trashes ntfs partition when sector 32 of the hard disk is occupied by Adobe FlexNet

I did not try the chkdsk thing but did you boot from a windows cd to run it?

By design, the last sector of ntfs is a backup of its boot sector. By copying the last sector to its first sector I successfully recovered the NTFS file system on my memory stick. There's no operating systems on the memory stick so I don't know if this recovery method can fix the boot issue of Windows. ( If boot sector is the only sector destroyed it is expected to fix the boot issue but unfortunately several sectors are overwritten ) I would appreciate it if you could test this for me:

First check if FlexNet is still there ( Earlier versions of grub2 overwrites it)
sudo dd if=/dev/sda count=63 2>/dev/null | hd | grep "d8 41 a0 f5 02 00 02 00"
If the command above returns nothing it's gone.

If it finds FlexNet, try ruin your C drive by installing grub2 from 11.04(backup your data first of course):
sudo grub-install /dev/sda
You will see a warning "Sector 50 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track."

Then run "sudo parted -l", if the file system of sda1 is not shown you successfully ruin your C drive.

Now run "sudo fdisk -lu", from the file you attached its output was
   Device Boot Start End Blocks Id System
/dev/sda1 * 63 85160564 42580251 7 HPFS/NTFS
/dev/sda2 85160626 1953520064 934179719+ 5 Extended
/dev/sda5 85160628 419441084 167140228+ 7 HPFS/NTFS
/dev/sda6 419441148 461386799 20972826 83 Linux
/dev/sda7 461386863 1846141604 692377371 83 Linux
/dev/sda8 1846141700 1953520064 53689182+ 7 HPFS/NTFS

If the partition layout has not been changed since then, recover the boot sector of sda1 from the backup sector:
sudo dd if=/dev/sda of=/dev/sda count=1 seek=63 skip=85160564
Be very careful here no to type anything wrong. Both "if" and "of" devices are /dev/sda, not /dev/sda1. And if the start or end sector changes, modify seek="start sector" skip="end sector" correctly.

Now /dev/sda1 should be mountable again. Reboot to see if windows boots. Thank you!