Skip to content

Instantly share code, notes, and snippets.

Last active November 5, 2023 12:02
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
re-install grub using Fedora Live CD. Fedora was installed with LVM. The system dual boots Ubuntu and Fedora.
mkdir /mnt/root
# You may use fdisk -l to list the devices
mount /dev/mapper/fedora-root /mnt/root
# Mount the boot partition, maybe /dev/sda1
# As the system has both Ubuntu and Fedora installed,
# so sda3 in my case
mount /dev/sda<3> /mnt/root/boot
mount -t proc none /mnt/root/proc
mount -o bind /dev /mnt/root/dev
# change root directory
chroot /mnt/root /bin/bash
# [Re]install grub
grub2-install /dev/sda
# References:
Copy link

albfan commented Nov 5, 2023

If you wonder where is your fedora-root you might need to enable first:

$ sudo vgscan
Found volume group "fedora_localhost-live" using metadata type lvm2
$ sudo vgchange -ay fedora_localhost-live
3 logical volume(s) in volume group "fedora_localhost-live" now active

those should be typically root, home and swap, available now on /dev/mapper/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment