Hello,
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.