grub-install trashes the ntfs partition that starts at sector 63 if one or more sectors in the embedding area is occupied by Adobe FlexNet
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Debian) |
Fix Released
|
Unknown
|
|||
grub2 (Ubuntu) |
Fix Released
|
Critical
|
Colin Watson |
Bug Description
Binary package hint: grub
The new grub-install of natty alpha3 now detects and avoids FlexNet-occupied sectors, but it seems it somehow mishandles something and writes code into after sector 63, thus make the ntfs partition that starts there unbootable and unreadable.
I have tested with a memory stick /dev/sdc partitioned like this:
ubuntu@ubuntu:~$ sudo fdisk -lu /dev/sdc
Disk /dev/sdc: 16.2 GB, 16236085248 bytes
255 heads, 63 sectors/track, 1973 cylinders, total 31711104 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00063979
Device Boot Start End Blocks Id System
/dev/sdc1 63 25671869 12835903+ 7 HPFS/NTFS
/dev/sdc2 25671870 31696244 3012187+ 83 Linux
/dev/sdc1 was not mounted.
/dev/sdc2 was mounted on /mnt.
Then I downloaded FlexNet signature at http://
unzipped flexnet.
sudo dd if=flexnet.sector32 of=/dev/sdc seek=32
ran grub-install, it detected and avoided that sector:
ubuntu@ubuntu:~$ sudo grub-install /dev/sdc --root-
/usr/sbin/
Installation finished. No error reported.
NTFS partition /dev/sdc1 was now trashed. By design, the last sector of ntfs is a backup of its boot sector, so I copied the last sector of /dev/sdc1 to its first sector and successfully recovered the file system:
ubuntu@ubuntu:~$ sudo dd if=/dev/sdc of=/dev/sdc count=1 seek=63 skip=25671869
I took a further look at the sectors and found that the first sector of the partition was not the only sector that was overwritten by grub, and was surprised that by recoverying only the first sector the whole file system seemed good.
By removing the FlexNet signature, grub-install never overwrite the NTFS sectors again.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: grub (not installed)
ProcVersionSign
Uname: Linux 2.6.38-5-generic i686
NonfreeKernelMo
Architecture: i386
Date: Sun Mar 6 17:43:14 2011
LiveMediaBuild: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110302)
ProcEnviron:
LANGUAGE=en_US:en
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: grub
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
affects: | grub (Ubuntu) → grub2 (Ubuntu) |
Changed in grub2 (Ubuntu): | |
importance: | Undecided → Critical |
summary: |
- grub-install trashes ntfs partition when sector 32 of the hard disk is - occupied by Adobe FlexNet + grub-install trashes the ntfs partition that starts at sector 63 if one + or more sectors in the embedding area is occupied by Adobe FlexNet |
description: | updated |
Changed in grub2 (Ubuntu): | |
assignee: | nobody → Colin Watson (cjwatson) |
milestone: | none → ubuntu-11.04-beta-1 |
status: | New → Triaged |
Changed in grub2 (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in grub2 (Debian): | |
status: | Unknown → New |
Changed in grub2 (Debian): | |
status: | New → Fix Released |
https:/ /bugs.launchpad .net/ubuntu/ +source/ grub2/+ bug/701806
Maybe a duplicate?
I have Adobe Acrobat X installed now which seems to be shipped w/Flexnet too.
May I mark mine a duplicate?