[TriLUG] Need Grub help

vikram sai balaji ulaganathan via TriLUG trilug at trilug.org
Wed May 2 07:41:25 EDT 2018


Typically I do the following. Note that I only have 1 hard drive /dev/sda
with efi, swap, boot, root and home partitions
1. Grub-mkconfig -o grub.cfg
2. As root copy grub.cfg to /boot/grub/
3. Make sure /etc/fstab has the right partition entries
4. Assuming efi partition was formatted as vfat and firmware installed
already and mounted on /boot/efi I use
grub-install --efi-directory=/boot/efi
5 Reboot

I do this in Gentoo which has the steps. Ignoring the emerge commands these
steps should work. This is just how mine is setup. Yours may need
additional parameters. Always backup before you try any commands.

On Tue, May 1, 2018, 8:44 PM Paul Boyle via TriLUG <trilug at trilug.org>
wrote:

> Thanks for the link Scott.
>
> I got up to the part where it says to run grub2-install.  That failed, not
> surprisingly because this is an EFI system.  I followed the directions
> farther down regarding grub2-mkconfig.  I saw that the program found my
> kernel and initrd images.  When I tried to reboot it didn't work.  I found
> this page:
>
> https://fedoraproject.org/wiki/GRUB_2
>
> The bottom line from that page was don't use grub2-install on EFI
> systems.  There doesn't seem to be an analogous program for EFI system.  I
> tried a couple of time running grub2-config.  It could find the images, but
> couldn't boot.
>
> I guess this will have to wait until I get back from vacation.  Thanks for
> your help.
>
> Paul
>
> ________________________________________
> From: Scott Lambdin <lopaki at gmail.com>
> Sent: May 1, 2018 7:11 PM
> To: Paul Boyle; Triangle Linux Users Group General Discussion
> Subject: Re: [TriLUG] Need Grub help
>
> Hi -
>
> I think this looks pretty good for you:
>
> https://www.thegeekdiary.com/centos-rhel-7-how-to-reinstall-grub2-from-rescue-mode/
>
> --Scott
>
> On Tue, May 1, 2018 at 6:02 PM, Paul Boyle via TriLUG <trilug at trilug.org
> <mailto:trilug at trilug.org>> wrote:
> Hi,
>
> I had the hard drive which contains the OS and distro (CENTOS 7) on one
> of my student workstations fail (a hardware failure). /home is on a
> separate drive which is OK. I was able to clone the image of the drive
> to another hard drive (partitions look OK from gdisk). The cloned
> partitions can be mounted via a harness on another Linux box.
>
> The layout of the disk is:
> /dev/sda1 -> /boot/efi (msdos(?))
> /dev/sda2 -> /boot (ext4)
> /dev/sda3 -> / (ext4)
> /dev/sda4 -> Linux swap
>
> I put the cloned drive into the PC. and when I try to boot I get an
> error saying
>
> "Reboot and select proper boot device
> or Insert Boot media into selected boot device and press a key".
>
> I'm thinking I need to run GRUB2 to make the system boot from new hard
> drive.  However, I am befuddled by GRUB2.  Can someone suggest a
> sensible course of action?
>
> I'm thinking  putting a original CENTOS install DVD and
> choosing the rescue option.  However, I don't know really what to do
> after that.
>
> Any help appreciated.
>
> Reason to break out the world's smallest violins:  I'm scheduled to
> start my vacation tomorrow and I would love to get this sorted out this
> evening.
>
> Thanks,
>
> Paul
>
> --
> Paul D. Boyle, Ph. D.
> Manager, X-ray Facility
> Department of Chemistry
> Western University
> London, ON N6A 5B7
> Canada
> GPG Fingerprint: 8ECE 516D 9046 FE83 4A46  7E8E D720 555D 8CC3 EC6B
>
> --
> This message was sent to: Scott Lambdin <lopaki at gmail.com<mailto:
> lopaki at gmail.com>>
> To unsubscribe, send a blank message to trilug-leave at trilug.org<mailto:
> trilug-leave at trilug.org> from that address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> https://www.trilug.org/mailman/options/trilug/lopaki%40gmail.com
> Welcome to TriLUG: https://trilug.org/welcome
>
>
>
> --
>
> Eat like you give a damn.  Go vegan.
> --
> This message was sent to: Vikram <tayirvadai.vikram at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> https://www.trilug.org/mailman/options/trilug/tayirvadai.vikram%40gmail.com
> Welcome to TriLUG: https://trilug.org/welcome


More information about the TriLUG mailing list