I installed windows 11 on another hard disk, then the uefi boot entry for qubes disappeared, I used efibootmgr to add the boot entry, but the newly added boot entry can’t access the device after booting, and I can’t boot the device directly, error message: Loading Xen 4.14.6 error: file /xen-4.14.6. gz’ not found. Linux 6.1.43.qubes.fc32.x86_64 error: you need Loading load the kernel first. initial ramdisk Loading error: Press any key to continue … you need to load the kernel first.
Hint: I used lvm and luks for my device.
Is anyone willing to help me? I’m really in a hurry. If someone can help me, I’ll give him Monero coins.
What’s the content of your boot and EFI System partitions (e.g. /dev/sda1 and /dev/sda2)?
Maybe they were formatted by Windows.
It’s not formatted, I chrooted in to see that grubx64.efi is still there, and by the way one more thing, my last shutdown was an accidental power failure shutdown.
So EFI System partition is OK.
What about /boot partition? Do you see xen-*, initramfs-*, vmlinuz-* files there?
yes
What’s the message when you try to boot from newly created EFI boot entry?
This one as well?
error message: Loading Xen 4.14.6 error: file /xen-4.14.6. gz’ not found. Linux 6.1.43.qubes.fc32.x86_64 error: you need Loading load the kernel first. initial ramdisk Loading error: Press any key to continue … you need to load the kernel first.
Or it’s just not trying to boot anything?
This is what you get after booting from a newly created startup item, the system fails to boot and the screen goes black showing only these lines of code.
The only thing inside /boot is vmlinuz and init for version 5.15, version 6.1 has mysteriously disappeared.
No, I’m reading it wrong, there’s nothing inside the /boot partition! There’s only an efi.
What’s your Qubes OS drive partitions look like?
fdisk -l /dev/sda
Change sda to your Qubes OS drive name.
Check if your /boot partition is present and it’s not formatted by Windows or something.
I can’t boot that system now, I’ve mounted that system on another system and the /boot partition only has the efi partition inside it
You can check it on another system as well.
I checked, with cd and ls, /boot is empty, only the efi partition, inside the efi partition there are only boot parameters, but I have a second qubes OS to boot, is there any way to rescue it?
How did you mount your /boot and EFI partitions to check it?
Assuming your Qubes OS drive name is /dev/sda (change it to your own) the default Qubes OS partitioning is (you can check your own with sudo fdisk -l
):
/dev/sda1 - EFI System partition
/dev/sda2 - ext4 /boot partition
/dev/sda3 - encrypted/unencrypted LVM
If you boot in another system you need to mount /dev/sda2 somewhere to check its content, e.g.:
sudo mount /dev/sda2 /mnt
ls /mnt
I checked it right. I went into chroot.
I got into chroot, I was sudo /boot nothing, I copied the /boot from another qubes inside here, restarted the computer I can see the blue boot screen now, but I can’t access it further, I think it’s caused by the wrong version of the grub file, I’m using a lower version for my other qubes, how do I update the grub?
So you only had the empty efi directory in /boot? Did you create it manually or else that’s strange why it’s there.
To mount your Qubes OS drive for chroot you’d have to mount it like this:
cryptsetup luksOpen /dev/sda3 luks-qubes
vgchange -ay
mkdir /mnt/qubes
mount /dev/qubes_dom0/root /mnt/qubes
cd /mnt/qubes
mount /dev/sda2 boot
mount /dev/sda1 boot/efi
But if the /boot was empty then there would be no /boot/efi directory to mount.
Yes, I did, /proc those files I have installed
Originally there was something in /boot/efi, but I put something from another qubes in /boot, after reboot I could see the blue boot screen, but I couldn’t go further because the version number didn’t match, and after reboot I realized that /boot/efi became empty.
/Before /boot was empty, there was only /efi, /efi had all kinds of boot configuration files in it, now /boot is empty after I put all kinds of files in it.