Problem reinstalling Grub

Looks as though I have a problem with the hard drive used in the (at the moment) only operational Nethserver machince. I was in a hurry, so I decided to use fsarchiver to copy the drive contents (and also give myself an image backup). No problems with doing that - I’ve used it with other systems frequently in the past.

After writing the image to a new hard drive (simple partition, no raid, no LVM), I booted from the latest Super-Grub disk, loaded the Nethsystem and attempted to reinstall Grub (since fsarchiver creates partition images, Grub needs to reinstalled to the MBR. Again, something I’ve used with other systems multiple times. After finding the gru2 installer, I ran it. It reported no errors, but when I rebooted, the machine could not find a bootable device. Strange…

As a second attempt, I used the recommended method for CentOS. Booted from my Nethserver flash drive, used the tools menu item to get the systemimage mounted at /mnt/sysimage, then chrooted to the sysimage.

When I attempted to run /sbin/grub2-install, it failed with an error - could not find /lib/grub/i386.mod. When I went to have a look in /lib/grub, there were no files at all in that directory. So I’m a bit stuck…

Is there something else I should know about reinstalling grub? I have a full CentoOS 7.6 flash drive which I’ll try tomorrow, but I’m wondering why the simple installs I’ve already tried failed. Any ideas, anyone?

If I still can’t reinstall grub, I have backups I can use with a fresh install, but I am puzzled as to why the grub reinstall failed and would appreciate any clues.

@support_team
Can somebody help here?

Since entering my first message, I’ve had another try, this time using CentOS directly. Booted, used the “Troubleshooting” option, then used the rescue option, used chroot on the mounted /mnt/sysimage. This time, I could see the necessary support files in /lib/grub/i386 without issue. But my attempts to install Grub failed again, with an error that I’ve never seen before:

grub2-install: warning: Attempting toinstall GRUB to a disk with multiple partition labels. This is not supported yet... grub2-install: error: embedding is not possible, but this is required for cross-disk install.

I have other options, and for the moment, the system is running, booted from the Super-Grub CD, but I have never had this sort of problem reinstalling Grub before, and would really like to get to the bottom of it…

Did you install the source Nethserver without LVM?
Which filesystem did you use as destination filesystem?
Nethserver uses xfs by default.

Please post the fsarchiver savefs and restfs commands and the partition table you used on the destination hard disk to make it possible to reproduce the issue.

I’ve now got a spare drive, so I’m going to repeat the experiment. I’ll let you know once I’ve had a chance to see if it shows the same error.

2 Likes