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
- Install Qubes on the first SSD (Not where the original Qubes installation is, make sure you select the right device!)
- After installation, boot into Qubes rescue and select option 3 to drop into shell
- 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
- 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 - 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 - Execute the command
exit
to leave chroot - Copy modules folder from Qubes install USB (Use tab to complete the src folder name to get the version you have)
My actual command:cp -r /lib/modules/5.15(tab-to-complete) /mnt/lib/modules
cp -r /lib/modules/5.15.52-1.fc32.qubes.x86_64/ /mnt/lib/modules
- Chroot back into original Qubes -
chroot /mnt
- Execute the following (tab to complete again)
My actual command:dracut -vf /boot/init(tab-to-complete)
dracut -vf /boot/initramfs-5.15.52-1.fc32.qubes.x86_64.img
- Execute the command
exit
to leave chroot - 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
- Reboot and choose “Qubes OS” in EFI menu