Ask Your Question
1

Reinstall Grub2 26/Gnome

asked 2017-07-15 13:44:15 -0500

x27qb8 gravatar image

I have a Windows 7 / Fedora 26 Dual Boot system.

I recently had to repair Windows Startup & Performed an Inplace Upgrade, because the upgrades were failing. Now grub2 has been overwritten. I laumched a Live version of Gparted and verified that my Fedora partition is still there and I assume unharmed. I suspect I'm going to have to reinstall grub from a Live distro; but I've never done this before.

Can someone explained the proceedure and where to get the correct files?

Thanks

edit retag flag offensive close merge delete

Comments

I read that there is a RESCUE BOOT OPTION available on the LIVE DVD. Is this is true, would it apply to my situation; and is this the best and safest place to start? Also, should I launch GPARTED LIVE and look for the boot flag? Would this tell me anything about GRUB in a Win / Fed dual boot system? Also, should I drill down and look at FSTAB?

Let's suppose I bootup and am staring at GRUB RESCUE> or something similar, what info do I need to have before I can proceed?

x27qb8 gravatar imagex27qb8 ( 2017-07-18 00:03:11 -0500 )edit

That is a lot of what ifs. Surely if you run Arch you are familiar with reading the documentation. First step - take a deep breath. Second step decide with distro you want to use to boot your system (each system has files in /boot used by grub to boot). If you use Fedora follow the instructions you have been given and post back if you have a problem. If you still have questions about grub on fedora see https://fedoraproject.org/wiki/GRUB_2 . The fedora DVD is a large download for this sort of fix and as such I have no personal experience with the rescue boot option. No better or worse.

bodhi.zazen gravatar imagebodhi.zazen ( 2017-07-18 22:49:44 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-07-18 08:02:39 -0500

cmurf gravatar image

The easiest way to fix this is download a Fedoa 26 netinstall, and from the Troubleshooting menu, choose Rescue a Fedora system. This will help assemble your Fedora installation at /mnt/sysimage. Then:

chroot /mnt/sysimage
grub2-install
grub2-mkconfig -o /boot/grub2/grub.cfg

More details here. The above is for BIOS systems, which I'm assuming since it's Windows 7. But if the firmware is UEFI you need to use different commands.

https://docs.fedoraproject.org/en-US/...

https://docs.fedoraproject.org/en-US/...AdministratorsGuide/sec-ReinstallingGRUB2.html

edit flag offensive delete link more

Comments

Thank you sir,

Solid rescue. Simple and to the point. This was all I was looking for.

I did however get a little nervous during the first boot, when I received the following message:

*Warning --SELinux targeted policy relabel is required.

This quickly passed; and I was up and running in no time.

x27qb8 gravatar imagex27qb8 ( 2017-07-19 07:14:05 -0500 )edit
0

answered 2017-12-09 10:18:46 -0500

It's possible to recover a grub2 installation even if you have a Live CD/DVD without the rescue option on it. However, it crucially depends on having an unencrypted boot partition with the contents of /boot intact.

  1. Boot using the live media.
  2. Bring up a terminal with a shell prompt.
  3. $ su
  4. # mount -t ext4 /dev/sda2 /boot (use the appropriate boot partition on your system)
  5. # grub2-install /dev/sda

It should grind for a few seconds and give a message about no errors encountered. If so, you're probably home safe. Reboot the system, hold your breath and see if you get a good Grub2 menu.

(There are situations where the contents of /boot may have been corrupted/overwritten with an invalid combination of kernel images, initramdisk images, configurations, modules, and so. In such a case, you'll have to manually and painstakingly reconstruct the contents of /boot from another system that is known to be working.)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-15 13:44:15 -0500

Seen: 3,777 times

Last updated: Jul 18 '17