Are these the right instructions to restore grub?

asked 2017-08-31 00:03:37 -0500

toddandmargo gravatar image

updated 2017-09-01 20:08:53 -0500

Hi All,

Fedora 26

Tomorrow, I have to scrub XFS off a boot drive and install ext4. I will recreate the partitions and do and xfsrestore to them from backup xfsdumps. All that is missing is restoring grub.

Question : do I need to vi into grub.cfg first and edit xfs -> ext4?

I found these instructions for restoring grub for Fedora 17. Are they still accurate for Fedora 26?

1) Boot the system from an installation boot medium. (live CD/USB)

2) Type linux rescue at the installation boot prompt to enter the rescue environment.

3) Type chroot /mnt/sysimage to mount the root partition.

4) Type /sbin/grub-install bootpart to reinstall the GRUB boot loader, where bootpart is the boot partition (typically, /dev/sda).

5) Review the /etc/grub.d/10linux file, as additional entries may be needed in the /etc/grub.d/40custom for GRUB to control additional operating systems.

6) Reboot the system.

And do I really need to do 5) above?

Many thanks, -T

Follow up:

Hi All,

I found out that when you change your File System and change from Legacy boot to EUFI pain in the ... boot, that you can not just re-install your / and /home drive (vendor request that I combine these partitions). I had to start over from scratch and re-install everything one at a time. SELiux about killed me. But I took good notes for the next time. I was out till 06:00 in the morning.

On the bright side, I figured out what was causing the hot swap crash: it was the back up drives themselves. See:

And I am now XFS free. Everything is back on EXT4, except /boot/efi, which is apparently fat32.

A note on XFS. Every time the hot swap crashed the OS, when the OS came back, XFS journaled out everything I had done. I lost gigabytes of data that I had to get back from backup. Some of the data on backup had already been journaled, but fortunately I had old backups too. (I always backed up before testing a hot swap.)

XFS is far to aggressive for me in this manner. I would much prefer it did an fsck, then journaled out what it could not recover. XFS has it place, but not on my stuff anymore. A big data center, it would be perfect.

Moral of the story, if you are recovering exactly what partition and file system you had before, grub recovery will work. Other wise, you have to start over.

Thank you all for the tips and support!


edit retag flag offensive close merge delete



Actually, around F20, grub was replaced with grub2, so might want to research that and see if the commands are different.

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-08-31 08:52:52 -0500 )edit

I am not finding anything definitive on this. Just a lot of outdated stuff. Would I get away with just doing a fresh install, then wiping the data off data partitions (ignoring /boot) and restoring the data (except /boot)?

toddandmargo gravatar imagetoddandmargo ( 2017-08-31 12:25:47 -0500 )edit