Fedora Linux Support Community & Resources Center
  #1  
Old 30th July 2017, 08:50 AM
safulop Offline
Registered User
 
Join Date: Jun 2008
Posts: 114
windows_98_nt_2000chrome
Best way to reinstall Grub

Something somehow deleted my bootloader file, so now my Fedora boot process leads to shim MOK manager instead of booting up. I see that the grubx64 file is missing, although the cfg file is still present ?

What is the best way to reactivate Grub without changing the installation or reinstalling? I do have a Fedora 25 Live disk but I don't want to reinstall because that would erase everything right?
Reply With Quote
  #2  
Old 30th July 2017, 12:39 PM
tim8723 Offline
Registered User
 
Join Date: Mar 2017
Location: USA
Posts: 36
linuxfedorafirefox
Re: Best way to reinstall Grub

Right. Since a good answer has already been published, here is a link:

https://ask.fedoraproject.org/en/que...n-the-live-cd/

Tim
Reply With Quote
  #3  
Old 30th July 2017, 07:55 PM
amiga Offline
Registered User
 
Join Date: Aug 2007
Posts: 137
linuxfirefox
Re: Best way to reinstall Grub

Quote:
Right. Since a good answer has already been published, here is a link:
Did you actually read the post in the link you gave tim8723 ? It has nothing to do with this post as their system is legacy BIOS and not UEFI. The OP in this thread definitely has a UEFI system.

Also if you read that thread it is one of the worst examples ever. The OP in that thread has a very confusing disk structure with two Fedora installations, one with LVM and one with standard partitions. Also their BIOS Boot partition which should be only 1 MB in size is 128 MB and their main Linux partition is labeled "Microsoft Basic Data". All of these inconsistencies result in the responses being very confused and incorrect. I could not imagine a worse example for how to re-install grub on a UEFI system for the OP in this thread primarily since the OP in that thread has a BIOS/GPT system in addition to many confusing factors.

Last edited by amiga; 30th July 2017 at 08:08 PM.
Reply With Quote
  #4  
Old 31st July 2017, 03:01 AM
safulop Offline
Registered User
 
Join Date: Jun 2008
Posts: 114
windows_98_nt_2000chrome
Re: Best way to reinstall Grub

Quote:
Originally Posted by amiga View Post
Did you actually read the post in the link you gave tim8723 ? It has nothing to do with this post as their system is legacy BIOS and not UEFI. The OP in this thread definitely has a UEFI system.

Also if you read that thread it is one of the worst examples ever. The OP in that thread has a very confusing disk structure with two Fedora installations, one with LVM and one with standard partitions. Also their BIOS Boot partition which should be only 1 MB in size is 128 MB and their main Linux partition is labeled "Microsoft Basic Data". All of these inconsistencies result in the responses being very confused and incorrect. I could not imagine a worse example for how to re-install grub on a UEFI system for the OP in this thread primarily since the OP in that thread has a BIOS/GPT system in addition to many confusing factors.
Thanks, I thought that thread was trash also and did not attempt to follow the solutions offered, which are far too DIY for me anyway.
Reply With Quote
  #5  
Old 31st July 2017, 03:48 AM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,349
linuxfedorafirefox
Re: Best way to reinstall Grub

I ran sudo dnf list grub*
and came way with
dnf list grub* | cut -d' ' -f1-2

Installed Packages
grub-customizer.x86_64
grub2.x86_64
grub2-efi.x86_64
grub2-tools.x86_64
grubby.x86_64
Available Packages
grub2-breeze-theme.x86_64
grub2-efi-modules.x86_64
grub2-starfield-theme.x86_64
[leslie@F26onE ~]$ dnf list grub* | cut -d' ' -f1
Last
Installed
grub-customizer.x86_64
grub2.x86_64
grub2-efi.x86_64
grub2-tools.x86_64
grubby.x86_64
Available
grub2-breeze-theme.x86_64
grub2-efi-modules.x86_64
grub2-starfield-theme.x86_64

try dnf reinstall grub* Which should fix up your issue.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #6  
Old 31st July 2017, 05:43 AM
safulop Offline
Registered User
 
Join Date: Jun 2008
Posts: 114
windows_98_nt_2000chrome
Re: Best way to reinstall Grub

I have no idea how the previous post could be applied to my situation, where I have a Fedora system which cannot be booted into nor mounted. At least, I have no idea how to mount it from running a Live USB.
Reply With Quote
  #7  
Old 31st July 2017, 07:30 AM
srakitnican Offline
Registered User
 
Join Date: Oct 2011
Posts: 1,577
linuxchrome
Re: Best way to reinstall Grub

From Live media, you can mount your system and chroot into it. Since you are using UEFI boot method, you must also mount EFI System partition under /boot/efi . Here is a few links that can help you with that, and don't follow advices to use grub2-install since that is not used on an UEFI system.

https://unix.stackexchange.com/a/72599/215643

https://fedoraproject.org/wiki/GRUB_...otloader_files

If your board's firmware still does not recognize Fedora boot loader, you might have to install an entry with efibootmgr.
Reply With Quote
  #8  
Old 31st July 2017, 07:54 AM
srakitnican Offline
Registered User
 
Join Date: Oct 2011
Posts: 1,577
linuxchrome
Re: Best way to reinstall Grub

Quote:
Originally Posted by safulop View Post
Thanks, I thought that thread was trash also and did not attempt to follow the solutions offered, which are far too DIY for me anyway.
Weeelll there is no GUI with a single tick for this one that I am aware of. You have to do some research on how to do stuff yourself. If you find this too hard right now, it might be easier for you to just reinstall then.
Reply With Quote
  #9  
Old 31st July 2017, 08:55 AM
safulop Offline
Registered User
 
Join Date: Jun 2008
Posts: 114
windows_98_nt_2000chrome
Re: Best way to reinstall Grub

I can handle the tough stuff when necessary; has anyone used Super Grub Disk for this problem? I am trying it now but when I create their bootable USB from the iso image it is not actually bootable....
Reply With Quote
  #10  
Old 31st July 2017, 07:36 PM
safulop Offline
Registered User
 
Join Date: Jun 2008
Posts: 114
windows_98_nt_2000chrome
Re: Best way to reinstall Grub

OK I was able to mount the installed system using the Live system, but I think it is more broken than I thought because it says "no" to both dnf and yum, and apt-get doesn't work right either.

So at this point I am just going to roll into Fedora 26; what happens if I use the installer with manual partitions to stick the new system where the old one is? Will it automatically do updates or will I end up with two of everything?
Reply With Quote
  #11  
Old 31st July 2017, 08:42 PM
srakitnican Offline
Registered User
 
Join Date: Oct 2011
Posts: 1,577
linuxchrome
Re: Best way to reinstall Grub

It will format the partition and create new system on '/' partition from scratch, It think there is no "overwrite" option if I remember correctly. But stuff did change since last time I've used an installer, so I might be completely wrong. But it should be possible to install a new system in a different partition and to keep this one for reference.

There was an option to keep /home partition though if you have it separate, in that case be sure to do manual partitioning and to tell it to not format. In any case is always a good idea to backup anything important to you before this action.

Last edited by srakitnican; 31st July 2017 at 08:49 PM.
Reply With Quote
  #12  
Old 1st August 2017, 03:31 AM
nsnbm's Avatar
nsnbm Offline
Registered User
 
Join Date: Dec 2007
Location: Australia
Posts: 1,584
linuxfedorafirefox
Re: Best way to reinstall Grub

Quote:
what happens if I use the installer with manual partitions to stick the new system where the old one is? Will it automatically do updates or will I end up with two of everything?
If you choose to "stick the new system where the old one is" then the installer will reformat the partition with the old system and install the new system on that partition. That is effectively, overwritng that partition with the new installation. Before it writes anything to disk, the installer will give you a window telling you which partition it will "reformat" so that you can make a final check that it's doing what you want it to. If it's not what you want, you can go back and start partitioning again or readjust what you have configured. As mentioned above, you have to choose custom partitioning to arrange all of this. The installer only reformats partitions which have the reformat box ticked.

A new installation from media such as a usb or disk doesn't automatically do updates and if you install over the old partition you will not end up with anything from the old system, so there's no doubling up.
Reply With Quote
  #13  
Old 1st August 2017, 04:27 AM
amiga Offline
Registered User
 
Join Date: Aug 2007
Posts: 137
linuxfirefox
Re: Best way to reinstall Grub

Quote:
OK I was able to mount the installed system using the Live system, but I think it is more broken than I thought because it says "no" to both dnf and yum, and apt-get doesn't work right either.
This doesn't make sense as apt-get is not in Fedora at all. It is package management for Debian systems. If you have apt-get on your Live System and don't have either dnf or yum then you don't have a Fedora Live DVD.
Reply With Quote
  #14  
Old 1st August 2017, 07:47 AM
safulop Offline
Registered User
 
Join Date: Jun 2008
Posts: 114
linuxfedorafirefox
Re: Best way to reinstall Grub

Quote:
Originally Posted by amiga View Post
This doesn't make sense as apt-get is not in Fedora at all. It is package management for Debian systems. If you have apt-get on your Live System and don't have either dnf or yum then you don't have a Fedora Live DVD.
Well, I already did chroot over to my installed system. So when I was calling for yum, dnf, and apt-get it was not using the Live system, it was using my installed system. I can assure you I have a Fedora Live USB, I am using it right now to try and get stuff off my old system before I erase it and start over.
Reply With Quote
  #15  
Old 1st August 2017, 07:51 PM
amiga Offline
Registered User
 
Join Date: Aug 2007
Posts: 137
linuxfirefox
Re: Best way to reinstall Grub

Quote:
Well, I already did chroot over to my installed system. So when I was calling for yum, dnf, and apt-get it was not using the Live system, it was using my installed system.
So now you are claiming that your installed system is not Fedora but a Debian derivative as apt-get wouldn't exist in any Fedora installation.

Quote:
I can assure you I have a Fedora Live USB, I am using it right now to try and get stuff off my old system before I erase it and start over.
So you don't like my questioning whether you have a Fedora Live USB or not but apparently your old installed system is not Fedora. If your installed system does not have either dnf or yum and does have apt-get, which doesn't work right but does exist then your old installed system is not Fedora.

In none of your previous posts you never mentioned that you have any installed system but Fedora.

Post #6 by safulop
Quote:
I have no idea how the previous post could be applied to my situation, where I have a Fedora system which cannot be booted into nor mounted. At least, I have no idea how to mount it from running a Live USB.
Post #1 by safulop
Quote:
Something somehow deleted my bootloader file, so now my Fedora boot process leads to shim MOK manager instead of booting up. I see that the grubx64 file is missing, although the cfg file is still present ?

What is the best way to reactivate Grub without changing the installation or reinstalling? I do have a Fedora 25 Live disk but I don't want to reinstall because that would erase everything right?
In all of your previous posts you only talked about having an installed Fedora system. Now you are claiming that your installed system does not have either dnf or yum and does have apt-get meaning it can't be Fedora.

Last edited by amiga; 1st August 2017 at 08:06 PM.
Reply With Quote
Reply

Tags
grub , reinstall

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reinstall GRUB hqthao Using Fedora 1 12th November 2012 08:57 AM
How to reinstall Grub? Elijah Using Fedora 2 31st May 2006 02:02 PM
Reinstall Grub michi Installation, Upgrades and Live Media 2 27th April 2006 06:10 PM
Reinstall GRUB zillah Using Fedora 6 20th December 2004 09:19 PM


Current GMT-time: 03:39 (Wednesday, 18-10-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat