[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-mkconfig os-prober did not update UUID

From: Jimmie Mayfield
Subject: Re: grub-mkconfig os-prober did not update UUID
Date: Sat, 5 Sep 2020 10:35:42 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0


When attempting to install grub onto a different hard drive (perhaps rescue-mounted from another machine), it's best to bind-mount /proc, /dev (and possibly /sys and /run depending on what you need to do during the rescue) into the chroot.  I've had to do this on occasion when a bad grub update renders one of my machines unbootable.

For simplicity, assume that /dev/sdz1 is the /boot partition of the target drive and /dev/sdz2 is the / partition...

1. mount /dev/sdz2  /mnt/rescue
2. mount /dev/sdz1 /mnt/rescue/boot
3. mount --bind /dev /mnt/rescue/dev
   mount --bind /proc /mnt/rescue/proc
4. chroot /mnt/rescue
5. now run grub-mkconfig, install RPMs, etc
6. exit chroot
7. umount /mnt/rescue/dev /mnt/rescue/proc /mnt/rescue/boot /mnt/rescue

On 9/5/20 10:14, Claude Robitaille wrote:
I understand the fact that the foreign grub.cfg is used as a source; but if the 
UUIDs for the other non kernel command line items are changed why not changing 
the command line itself, if the UUID matches? I understand that some menuentry 
may be special and have very weird kernel command lines but by matching the 
UUID value all shold be good.

Changing the original grub.cfg  can not be done with grub tools; chroot and 
then run grub-mkconfig fails due to lack of a valid /dev and possibly other 
missing proc entries. Reverting to manually modify it can be done on the 
grub.cfg in the new partition.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]