Last active
June 16, 2024 17:02
-
-
Save nateheat/67a7aa41d7ebbd0796f15aa24f8f744c to your computer and use it in GitHub Desktop.
re-install grub using Fedora Live CD. Fedora was installed with LVM. The system dual boots Ubuntu and Fedora.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su | |
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: | |
# http://thecreationist.expertscolumn.com/article/recover-grub-using-fedora-live-cd | |
# https://ask.fedoraproject.org/en/question/40578/how-to-reinstall-or-fix-grub-in-fedora-without-a-recovery-option-on-the-live-cd/?answer=40593#post-id-40593 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you wonder where is your fedora-root you might need to enable first:
those should be typically root, home and swap, available now on /dev/mapper/*