My CentOS 6.5 system was getting errors about the hard disk so I used partclone to clone the root filesystem.
Just 2 days later the hard disk died and the system would no longer boot.
So I replaced the hard drive and using a CentoS Live CD I created the same partition structure for the root filesystem using fdisk, and created an ext4 filesystem and finally restored my backed up partition clone using partclone.
So far so good, the new root partition can be mounted and read and all my files are intact.
But when it came to booting the system, I am having a problem with GRUB. The system just hangs with a blank screen.
I followed the instructions on the CentOS site for re-installing the boot loader:
Boot from CD, and enter rescue mode
chroot /mnt/sysimage
grub-install /dev/sda
But then I get an error saying:
Could not find device for
And that's it - it doesnt say what device for, its just blank.
I tried another method too:
grub
find /boot/grub/stage1
root(hd0,0)
setup (hd0,0)
This doesnt work either - I just end up into the same problem. I really dont want to go down the reinstall route, help!
Update
OK looks like I have trouble reading, it was setup(hd0) not (hd0,0) The system now boots, but it seems a few rpms have been corrupted which I'm not trying to re-install.
This was a painful excerise! Is there a better way of backing up the root filesystem and restoring it to another drive (which may not be the same size, but could fit the root filesystem) ?
0 Answers