Unable to boot into Qubes

Oh sorry that’s my bad. The solution was the following.

Context
I was missing the boot partition on the drive my Qubes was on. So I installed a new Qubes on the first SSD and then used the boot and efi partition from that to repair my Original Qubes.

My original Qubes is on /dev/nvme1n1 (second SSD) and my new (temp) Qubes is on /dev/nvme0n1 (first SSD)

Instructions

  1. Install Qubes on the first SSD (Not where the original Qubes installation is, make sure you select the right device!)
  2. After installation, boot into Qubes rescue and select option 3 to drop into shell
  3. Mount original Qube’s EFI partition and filesystem from the second SSD (Replace drive number below)
    cryptsetup luksOpen /dev/nvme1n1p2 luks-root
    vgchange -ay
    mount /dev/qubes_dom0/root /mnt
    mount /dev/nvme0n1p2 /mnt/boot
    mount /dev/nvme0n1p1 /mnt/boot/efi
    mount -B /dev /mnt/dev
    mount -B /proc /mnt/proc
    mount -B /sys /mnt/sys
    chroot /mnt
    
  4. Use the output of blkid -o value -s UUID /dev/nvme0n1p2 (new Boot partition) and replace the UUID in /etc/fstab on the /boot line
  5. Use the output of blkid -o value -s UUID /dev/nvme0n1p1 (new EFI partition) and replace the UUID in /etc/fstab on the /efi line
  6. Execute the command exit to leave chroot
  7. Copy modules folder from Qubes install USB (Use tab to complete the src folder name to get the version you have)
    cp -r /lib/modules/5.15(tab-to-complete) /mnt/lib/modules
    
    My actual command:
    cp -r /lib/modules/5.15.52-1.fc32.qubes.x86_64/ /mnt/lib/modules
    
  8. Chroot back into original Qubes - chroot /mnt
  9. Execute the following (tab to complete again)
    dracut -vf /boot/init(tab-to-complete)
    
    My actual command:
    dracut -vf /boot/initramfs-5.15.52-1.fc32.qubes.x86_64.img
    
  10. Execute the command exit to leave chroot
  11. Create a new EFI entry for the first SSD (new Qubes installation) - efibootmgr -v -c -u -L "Qubes OS" -l /EFI/qubes/grubx64.efi -d /dev/nvme0n1 -p 1
  12. Reboot and choose “Qubes OS” in EFI menu
4 Likes