October 22, 2004

Restoring a Linux Image with Acronis True Image

After you do the restore using the bootable True Image CD the mbr and Grub config are munged.

Do the following.

Boot into a linux install cd and enter rescue mode by typing: linux rescue at the command prompt.

It will take you thru a few screens; accept the defaults and then it will tell you it is going to search for your linux install, if it finds one it will mount it using /mnt/sysimage as the path.

Once you are at a prompt type chroot /mnt/sysimage to change the root mount to your unbootable linux install on the hard drive.

Next look at grub.conf in /etc/ and determine which HD device holds the grub info and the kernal you want to boot.

Example:
title Red Hat Linux (2.4.18-24.7.x)
root (hd0,0)
kernel /vmlinuz-2.4.18-24.7.x ro root=/dev/hda3
initrd /initrd-2.4.18-24.7.x.img

title Red Hat Linux (2.4.18-19.7.x)
root (hd0,0)
kernel /vmlinuz-2.4.18-19.7.x ro root=/dev/hda3
initrd /initrd-2.4.18-19.7.x.img

AS we can see, the root file system is located in (hd0,0) this is (hard drive #, partition #)

Now exit that file and type grub at the command prompt:

Next type

root (hd0,0)
setup (hd0,0)

This will setup stage2 and correct the MBR on your boot drive and enable you to boot the restored server.

--Thats it.

DK



1 comment:

Hubert said...

hi DK,

For my case I actually have to do "setup (hd0)" to make it work. Before doing that GRUB just hang when I reboot.

Pls feel free to comment that or update your webpage (very useful BTW) if you think my input is relevant.
Thanks