Page 1 of 1

Problem booting a restored system after changes to GRUB

Posted: Wed Jun 26, 2013 10:25 am
by Brian49
Recently I needed to restore my Linux Mint Debian system from an IFL backup image. The restore appeared to go through smoothly. However, when I tried to boot the restored system, GRUB would not load. Then I remembered that I had implemented a GRUB package upgrade since the moment when I had created the IFL backup image. So I had to do a fresh install from a DVD, and spend many hours tweaking the system to suit my preferences.

So it looks as though an IFL restore runs into trouble when the version of GRUB held in the backup image is an earlier version than the one which is currently installed. Have I got that right, please? And if so, is there any way of working round the issue? Of course if I had known about this beforehand, I would have taken a new backup image as soon as I had implemented the GRUB upgrade.

Many thanks for any kind assistance.

Re: Problem booting a restored system after changes to GRUB

Posted: Wed Jun 26, 2013 12:23 pm
by TeraByte Support(TP)
Brian49 wrote:
> Recently I needed to restore my Linux Mint Debian system from an IFL backup
> image. The restore appeared to go through smoothly. However, when I tried
> to boot the restored system, GRUB would not load. Then I remembered that I
> had implemented a GRUB package upgrade since the moment when I had created
> the IFL backup image. So I had to do a fresh install from a DVD, and spend
> many hours tweaking the system to suit my preferences.
>
> So it looks as though an IFL restore runs into trouble when the version of
> GRUB held in the backup image is an earlier version than the one which is
> currently installed. Have I got that right, please? And if so, is there any
> way of working round the issue? Of course if I had known about this
> beforehand, I would have taken a new backup image as soon as I had
> implemented the GRUB upgrade.
>
> Many thanks for any kind assistance.

When Grub doesn't load/boot, one workaround is to have a grub boot disk (CD/DVD or UFD) available that you can boot from to get to a grub prompt, and then manually boot into the Linux installation by running a few commands from the grub prompt. Once booted, you can then reinstall Grub by using the 'grub-install' command. This KB article has details on how to go about doing that: http://www.terabyteunlimited.com/kb/article.php?id=408

To make the Grub boot disk, Linux Mint Debian should have the 'grub-rescue-pc' package available to install. Once installed, you can find the grub boot images at /usr/lib/grub-rescue. See /usr/share/doc/grub-rescue-pc/README.Debian for instructions on how to write the images to various boot media (CD/DVD, UFD).
You could also download the Grub boot disk linked to in that KB article.

In this case, I'm not sure off hand what would have caused the problem you had. Was the image you restored an image of an entire drive, or just of an individual partition? Is the system multiboot (more than 1 OS installed) , or just the 1 OS?

Re: Problem booting a restored system after changes to GRUB

Posted: Wed Jun 26, 2013 3:06 pm
by Brian49
Thanks for responding. I'll investigate the GRUB rescue disk.

I have only one OS on the drive. The drive has two partitions, one for the OS and the other for data storage not specifically related to the OS. GRUB is installed to the drive. When restoring from a backup image, IFL offers an option to restore the OS partition together with part of the whole drive (the word "partial" is used). Usually there is no problem doing a restore using that option, as long as GRUB has not changed meanwhile. Thanks again.

Re: Problem booting a restored system after changes to GRUB

Posted: Wed Jun 26, 2013 5:26 pm
by TeraByte Support(TP)
Brian49 wrote:
> Thanks for responding. I'll investigate the GRUB rescue disk.
>
> I have only one OS on the drive. The drive has two partitions, one for the
> OS and the other for data storage not specifically related to the OS. GRUB
> is installed to the drive. When restoring from a backup image, IFL offers
> an option to restore the OS partition together with part of the whole drive
> (the word "partial" is used). Usually there is no problem doing a
> restore using that option, as long as GRUB has not changed meanwhile.
> Thanks again.

It must have been that when Grub got updated, it also updated the Grub code in the first track of the drive, which was then out of sync with the Grub in the partition that you restored. In that situation, you would need to restore the first track when restoring the partition.

When you create an image, IFL always backs up the MBR/first track, but doesn't restore it automatically (except on full drive restores) unless you select the "Restore First Track" option on the restore options screen. In the case of Grub, I'd also set the First Track Sectors to 0 (zero), to ensure all Grub sectors get restored.