Red Hat Bugzilla – Bug 145701
Grub installed to "corrupt" ntfs partition, losing all data
Last modified: 2007-11-30 17:10:58 EST
Description of problem:
I have a SATA drive and an IDE drive. I boot to the SATA drive, but
Anaconda detected the IDE drive first, so I swapped them.
Installation continued and my system was usable. When I went to
install my video driver, it kept saying that gcc.lib was not
installed, even though it was, so I reinstalled. This time, I forgot
to swap the drives and it put grub on the IDE drive. when I rebooted
it said 'GRUB' and hung, sort of like the old LI_ issue from years
ago. I disabled the drive in the bios and booted into windows (which
is how i always had it before because my motherboard - Abit A8V -
can't seem to boot to SATA if IDE is installed and configured in
BIOS) and the drive letter associated with the IDE drive was there,
but the drive was 'unformatted'. I ran Norton Disk Doctor which
searched for partitions but found none (read only mode). I tried
Partition Magic, which showed the partition as bad, also Winternals
Disk Commander showed a bunch of unusable partitions.
Eventually, I tried R-Studio (paid $50 for it!) and it was able to
recover my data on a file by file basis over several days.
One other thing. Before I ever did the install, I noticed that
Partition Magic showed the IDE drive partition as bad, but windows
never complained and Norton scanned with no errors found. I even had
Windows installed on it at one point with no problems. Because
everything had worked on the drive for so long, I assumed it was an
issue with Partition Magic (version 8) and the large drive.
So it's possible the partition was already corrupt to some degree
when grub wrote to it. My problem is, when doing the first install,
when disk druid ran, it said hdb was corrupt and could not be written
to, and did i want to wipe it out (i said NO). so it was smart enough
to know there was *something* not quite right with the partition, but
when it came to the grub install, there was no check or warning that
i was about to put grub on a 'corrupt' partition. this check should
have been done, just as it was a few moments ago with disk druid.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. make a partition corrupt and unreadable
2. start setup
3. note error warning about corrupt partition when starting disk druid
4. go to next step for grub install
5. note that there is no warning about installing grub to the corrupt
grub was installed to a partition that disk druid said was corrupt
it should have warned me that i'm about to write grub to a partition
that is corrupt or unreadable
Grub can't tell which disks BIOS can or can't read to, so there's no way for it
to know that it's installing to the wrong one.
(In reply to comment #1)
> Grub can't tell which disks BIOS can or can't read to, so there's no way for
> to know that it's installing to the wrong one.
Peter, I'm very disappointed in your curt reply. I spent quite a bit of time
detailing my issue, and it seems to have taken you no time to shoot it down
without carefully reading or asking for clarification. Even if Grub can't tell
if it's the 'wrong' one, that's not the issue. if there were nothing wrong
with the partition, it wouldn't have been a problem. my point is that when
disk druid runs, it points out that the partition has issues and that it is
unusable. the next step is when grub runs and it makes no such check. of
course, this product doesn't have to warn you at all, but if you are going to
provide checking at one step, it would seem fair to expect it at the next one
as well. if that data had been a special type of partition, such as an oracle
database or something, grub would have killed the data entirely. again, disk
druid checked and said 'hey this can't be used' but grub did not. please
consider adding a basic sanity check to the grub process to ensure the
partition is even usable. it may save someone else's data.