Putting grub back on new mirror disk
Have a computer with 4 500Gb seagate drives setup in 2 mirror pairs. The first pair, sda/sdb have 3 partitions, Boot/os/programs, Swap, data/storage for vdr.
I've had to replace drives several times. These seagates are junk, but warranty is up this year and then, if I manage to get some money, I'd like to replace them with a pair of WD 1Tb reds.
This time it was sda that went bad. Got it replaced, got the partitions back in the arrays and no sign of errors during rebuilds. but when I tried to put grub back on, I got some kind of error. Thought I did it the same way I've done it before, the way I was told in #grub.
---------------------------------------------------------------------
vorg@x64VDR:~$ su Password: x64VDR:/home/vorg# grub-install /dev/sda && grub-install /dev/sdb /usr/sbin/grub-probe: error: no such disk. Auto-detection of a filesystem of /dev/md0 failed. Please report this together with the output of "/usr/sbin/grub-probe --device-map=/boot/grub/device.map --target=fs -v /boot/grub" to <[email protected]> x64VDR:/home/vorg# exit exit vorg@x64VDR:~$ ---------------------------------------------------------------------
When I last checked the grub version was when I got the help in the #grub channel on freenode irc: (GNU GRUB 1.98~20100115-1)
I may have done an apt-get update/upgrade since, but it would have been a long time ago. I didn't ask on irc this time because a busy day and couldn't wait for response. I already am on this list which is why I checked here. I want to do a full upgrade, and build a new kernel when I get some time. But wanted to get it back to where it was before the drive dies first. I'll take a closer look at the replies here tommrow when I get a chance.
Still trying to figure out why I also lost audio on DVI output for vdr. I sent the computer to a shop this time thinking they would be able to take care of things. They replaced a sata cable and the power supply (said it was dieing which is possible) and reset the cmos :( but missed the fact that the drive was bad or 3 arrays where down.
Quoted 22 lines · Chris Murphy
Quoted 2 lines · Timothy D. Lenz
x64VDR:/home/vorg# grub-install /dev/sda && grub-install /dev/sdbWhat happens when you issue the commands separately?
Quoted 3 lines
/usr/sbin/grub-probe: error: no such disk.
Auto-detection of a filesystem of/dev/md0failed.
Please report this together with the output of "/usr/sbin/grub-probe--device-map=/boot/grub/device.map --target=fs -v/boot/grub" to <[email protected]>I'm going to guess an old version of prerelease GRUB2 since device.map isn't used anymore. Dollars to donuts help-grub@ will ask you to upgrade to current upstream GRUB2.
grub-install --version
If installing to sda or sdb fail separately, use --debug flag and put that up on pastebin. Many, many changes are in the final release of 2.00, which is now about 9 months old.
Chris Murphy
Had a couple minutes, so here is the paste for just sda.
x64VDR:/home/vorg# grub-install --version grub-install (GRUB) 1.98+20100804-14
Quoted 22 lines · Chris Murphy
Quoted 2 lines · Timothy D. Lenz
x64VDR:/home/vorg# grub-install /dev/sda && grub-install /dev/sdbWhat happens when you issue the commands separately?
Quoted 3 lines
/usr/sbin/grub-probe: error: no such disk.
Auto-detection of a filesystem of/dev/md0failed.
Please report this together with the output of "/usr/sbin/grub-probe--device-map=/boot/grub/device.map --target=fs -v/boot/grub" to <[email protected]>I'm going to guess an old version of prerelease GRUB2 since device.map isn't used anymore. Dollars to donuts help-grub@ will ask you to upgrade to current upstream GRUB2.
grub-install --version
If installing to sda or sdb fail separately, use --debug flag and put that up on pastebin. Many, many changes are in the final release of 2.00, which is now about 9 months old.
Chris Murphy
Quoted 3 lines · Timothy D. Lenz
Had a couple minutes, so here is the paste for just sda.
It's looking at the device.map, and it's also considering md0 as a grub device which doesn't seem correct. Try:
grub-install --recheck /dev/sda
Chris Murphy
Quoted 1 line · Timothy D. Lenz
This message said no errors. does that mean grub is now back on sda correctly?
That should be the case yes.
Quoted 10 lines
Here is the current device.map:
(fd0)/dev/fd0
(hd0)/dev/disk/by-id/ata-ST3500413AS_Z3T69GCE
(hd1)/dev/disk/by-id/ata-ST3500418AS_5VMJ49P1
(hd2)/dev/disk/by-id/ata-ST3500320AS_9QM35MY5
(hd3)/dev/disk/by-id/ata-ST3500820AS_9QM6V6JFHmm, wonder if that didn't update correctly as the replacement drive would have a different number.
? All four entries are different.
Chris Murphy
hd0 would have changed because it's a new drive. But all the numbers match the device list at /dev/disk/by-id
Quoted 25 lines · Chris Murphy
Quoted 1 line · Timothy D. Lenz
This message said no errors. does that mean grub is now back on sda correctly?
That should be the case yes.
Quoted 10 lines
Here is the current device.map:
(fd0)/dev/fd0
(hd0)/dev/disk/by-id/ata-ST3500413AS_Z3T69GCE
(hd1)/dev/disk/by-id/ata-ST3500418AS_5VMJ49P1
(hd2)/dev/disk/by-id/ata-ST3500320AS_9QM35MY5
(hd3)/dev/disk/by-id/ata-ST3500820AS_9QM6V6JFHmm, wonder if that didn't update correctly as the replacement drive would have a different number.
? All four entries are different.
Chris Murphy--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Ok, was thinking it was checking that grub got installed. So the map may have had the old drive listed instead of the new drive. But the map was force updated to match.
Quoted 9 lines · Chris Murphy
Quoted 1 line · Timothy D. Lenz
hd0 would have changed because it's a new drive. But all the numbers match the device list at
/dev/disk/by-idI don't understand what you're saying or asking. The --recheck flag causes grub-install to look at
/dev/disk/by-idto create a new device.map. So the device.map and/dev/disk/by-idshould be the same, at least with this variant of GRUB. Some use/dev/sdXdesignations, some use UUID.Chris Murphy
Quoted 1 line · Timothy D. Lenz
Ok, was thinking it was checking that grub got installed. So the map may have had the old drive listed instead of the new drive. But the map was force updated to match.
Yeah. Grub is dense and really non-obvious. And has changed a LOT in the three years since 1.98.
Chris Murphy