Ask Your Question
1

[SOLVED] Can't restore GRUB2 via Boot-Repair-Disk

asked 2016-04-13 10:51:11 -0600

Igettäjä gravatar image

updated 2016-04-17 06:51:29 -0600

I have a dual-boot laptop (BIOS) with Windows 10 & Fedora 23 in it. I recently updated Windows 10 which somehow resulted in my GRUB boot menu disappearing; the laptop now boots straight into Windows 10.

So I installed Boot-Repair-Disk (which uses Lubuntu 14.04) on my USB drive and booted it. After running the Recommended Repair, I get an error message:

Please enable a repository containing the [grub2] packages in the software sources of Fedora release 23 (Twenty (mapper/fedora-root). Then try again.

I have all repositories enabled in /etc/apt/sources.list, though.

I tried updating grub2, but the Boot-Repair-Disk media already has the newest version of it. I also tried removing the package and redownloading it, still the same error message.

Here is the boot info summary: http://paste.ubuntu.com/15813468/

Any help here?

edit retag flag offensive close merge delete

Comments

2

I don't know what kind of tool Boot-Repair-Disk is but it seems to work only in a Debian/Ubuntu environment (using apt-get and .deb packages). Fedora uses rpm, dnf and .rpm packages, which are not compatible with Debian stuff. I'd recommend you to get a bootable Fedora Live Disk, and follow this Q/A to fix your grub . There are also many more questions related to grub-reinstall on this site. Search for it. Alternative you can try http://www.supergrubdisk.org/super-gr...

florian gravatar imageflorian ( 2016-04-13 13:51:06 -0600 )edit

Edit: Boot-Repair is supposed to work on Fedora too, as stated on the tool's page.

I tried Rescatux, which could be downloaded from supergrubdisk.org . It did not work, it kept saying the drive could not be mounted because "Windows is hibernated". That is really weird, because I have both hibernation and fast boot disabled in my settings. I also checked that the hiberfil.sys does not exist on C.

I will try SuperGrubDisk but I'm afraid it won't help either as Windows somehow doesn't fully shut down.

Igettäjä gravatar imageIgettäjä ( 2016-04-14 10:58:00 -0600 )edit

I am in a similar situation... Dual booting Windows 10 & fedora 23 system... I screwed up the boot process when I let Boot-Repair on a booted Ubuntu external drive run on the system (it was 32-bit Ubuntu if that matters).

I have tried a BUNCH of things to fix this including running Boot-Repair, tinkering with the activation and boot sector designations in GParted, but still no joy... Right now I do have it working to boot into Windows 10, but when I try to run Boot-Repair (from a thumb drive), I get:

(cont'd in next comment)

bbneo gravatar imagebbneo ( 2016-07-09 08:13:04 -0600 )edit

I get from Boot-Repair:

"Please enable a repository containing the [grub2] packages in the software sources of Fedora release 23 (Twenty (mapper/fedora-root). Then try again."

How am I going to do that if I can't get fedora 23 to boot in the first place?

I do have a pastebin from Boot-Repair that I can share if anybody is interested and knowledgeable. I don't want to "tinker" with any more of the various incantations I see here and there for fear of making things worse since I really don't understand the whole "active partition, boot, grub" system/process in the first place.

bbneo gravatar imagebbneo ( 2016-07-09 08:17:17 -0600 )edit

Is there a good online reference to get a "bird's eye view" of how all of the boot pieces fit together?

"active partition, boot, grub, OSes ..."

bbneo gravatar imagebbneo ( 2016-07-09 08:17:23 -0600 )edit

4 Answers

Sort by » oldest newest most voted
1

answered 2016-04-17 06:45:45 -0600

Igettäjä gravatar image

After trying out many different solutions and failed with them, I happened to find an old boot info summary of mine. There I found the menuentry I had had before, and copied it manually to /boot/grub2/grub.cfg. Then I rebooted and could see the entry for Fedora 23 again.

edit flag offensive delete link more

Comments

This is fine. Nice work.

cialu gravatar imagecialu ( 2016-04-17 06:47:21 -0600 )edit

Thanks! Gotta do a boot info summary more often for similar situations...

Igettäjä gravatar imageIgettäjä ( 2016-04-17 06:53:51 -0600 )edit
1

answered 2016-04-15 16:48:12 -0600

cmurf gravatar image

Try again. Boot Fedora installation media. If you use Fedora netinstall media, you can choose the rescue option in the boot menu, and it'll help assemble things correctly and put it in a chroot. If you use Fedora live (workstation) you'll need to do it manually as follows:

mount /dev/mapper/fedora-root /mnt
mount /dev/sda3 /mnt/boot
mount -B /dev /mnt/dev
mount -B /proc  /mnt/proc
mount -B /sys /mnt/sys
chroot /mnt
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg
exit
reboot

The critical part that I think is missing in the earlier steps is the grub.cfg wasn't recreated properly, or wasn't put into the right location.

edit flag offensive delete link more

Comments

I tried this again. No errors in mounting (I also checked via file manager that the right partitions were mounted), no errors in chroot, no errors in grub2-install, but when updating the grub config I get the error /run/lvm/lvmetad.socket: connect failed: No such file or directory, and then it finds only the Windows partitions. Here is the whole output of the process.

I did the commands the same way, only replaced the second line's sda3 with sda1, as that's my boot partition. Output of fdisk -l.

Igettäjä gravatar imageIgettäjä ( 2016-04-16 03:00:21 -0600 )edit

This wiki says that those warnings are normal when chrooted. But it still only finds the Windows entries.

I tried this solution here, but it still gives me the errors and won't list Fedora.

Igettäjä gravatar imageIgettäjä ( 2016-04-16 03:08:12 -0600 )edit
1

answered 2016-04-15 04:05:11 -0600

cialu gravatar image

You can re-install Grub on Fedora following this method: How to reinstall or fix GRUB in Fedora

edit flag offensive delete link more

Comments

1

Thank you for your answer. I went throught the steps without any problems, rebooted and got my grub menu back. But... it only shows Windows 10 & Windows Recovery Environment, Fedora 23 is not there. I'm not sure if I did something wrong because my Fedora installation uses LVM.

Igettäjä gravatar imageIgettäjä ( 2016-04-15 14:02:43 -0600 )edit
0

answered 2018-02-02 07:20:34 -0600

request: please re-upload pastebin output...

thanks

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-04-13 10:22:29 -0600

Seen: 18,381 times

Last updated: Apr 17 '16