Re: How do I rebuild Grub/Boot/initramfs from a Live USB?

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

 



On Fri, 28 Oct 2022 18:31:41 -0000
"Jake D" <techsupport_accounts@xxxxxxxxxx> wrote:

> I have an internal drive that used to successfully dual boot windows
> and a LUKS-encrypted F36 installation with BTRFS.
> 
> I also had some spare unpartitioned space, which I used to fully
> install some other linux distros (including another F36 installation)
> to troubleshoot other minor problems (a tri-boot, so to speak)
> 
> **What went wrong**
> 
> The new distros installed fine, but I discovered afterwards I could
> no longer find/boot into my original LUKS F36 installation. In my
For completeness:
The new installation of F36 overwrote the /boot/efi/EFI/fedora
partition, preventing the old F36 from booting. At this point you could
have booted into the new F36, mounted the old F36, chrooted to the old
F36, by performing the steps you did from the system recovery below, 

> I’ve managed to chroot (a very dumb word) thru a LiveUSB session,
> with the following commands:
> 
> >>cryptsetup luksOpen /dev/nvme0n1p6 fedora_crypt 
> >>mount /dev/mapper/fedora_crypt /mnt/ -t btrfs -o subvol=root
> >>mount /dev/mapper/fedora_crypt /mnt/home -t btrfs -o subvol=home
> >>mount /dev/nvme0n1p5 /mnt/boot
> >>mkdir /mnt/boot/efi
> >>mount /dev/nvme0n1p1 /mnt/boot/efi
> >>mount --bind /dev /mnt/dev
> >>mount -t proc /proc /mnt/proc
> >>mount -t sysfs /sys /mnt/sys
> >>mount -t tmpfs tmpfs /mnt/run
> >>mkdir -p /mnt/run/systemd/resolve/
> >>nano /mnt/run/systemd/resolve/stub-resolv.conf (enter 'nameserver
> >>1.1.1.1', save) chroot /mnt  
> 
 
> >>dnf reinstall grub2-efi grub2-efi-modules shim  

This would have fixed the problem, allowing you to boot the original
F36, and no longer boot the new F36.

The problem is that both F36 installations used the same directory on
the ESP, and so collided.  There can only be one ESP (EFI partition)
per drive, I think that is a requirement of EFI.  So, you would have
to use either sdboot, or the technique Felix described in a later post
in order to boot multiple version of F36 using grub.  I don't think
either is trivial for a new user of Fedora, but your mileage might
differ.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux