Anything Goes - (solved) Corrupted grub

ghstryder - 25.10.2012, 00:24
Post subject: (solved) Corrupted grub
I'll put this here since I don't believe in coincidence. If someone else has the problem, then it might be an upgrade warning.

A couple of days ago, I installed a SSD in my (not new) laptop. Since it can accomodate two drives, and I use a data partition, it was a fairly trivial exercise to incorporate the SSD as my system drive. Of course, when I cloned the partitions, it cloned the UUIDs (for those who have not seen the feature, gparted is now capable of changing UUIDs, nice feature). In the process of changing the UUIDs, editing fstab and deleting/moving a lot of files, I got rid of something out of order and killed grub. I restored it with aptosid on a flash drive, following the instructions for an overwritten grub. No problems, and the computer has worked fine since, with at least one DU and a few reboots.

Today, I did a DU and it installed a few grub files. It asked it I wanted to keep my "customized" configuration, to which I answered yes. Afterward, I got "partition not found" errors. Once again, I used the flash drive and the instructions in the Manual to recover.

Normally, I would just consider this to be a mistake on my part, but I sure don't think I did anything to break it today, so I thought it worth mentioning in the event it happens to someone else.
slh - 25.10.2012, 00:30
Post subject: RE: Corrupted grub
grub2 uses /dev/disk/by-id/* to identify the target disks for installing the bootloaders, which includes the system bus and the disks' serial number, if you switch drives these need to be adapted. "dpkg-reconfigure grub-pc" (or its efi equivalent) should do that.
ghstryder - 25.10.2012, 01:09
Post subject: RE: Corrupted grub
Thanks slh.
I thought I had explicitly installed it to sda, but when I ran dpkg-reconfigure grub-pc, it came up with the partition on the old drive preselected. In spite of seemingly working ok, it was obviously confused. I'm glad it happened now.
It was well worth the effort - it is like having a new machine.
All times are GMT - 12 Hours
Powered by PNphpBB2 © 2003-2010 The Zafenio Group