Installation not booting

I have a laptop, with some irrelevant operating system installed on its internal drive. I also have an external USB-C SSD drive with Fedora 38 installed. I know 38 recently went EOL - ironically, i was putting off upgrading because i didn’t want to risk breaking it!

A few days ago, i plugged the external drive in and booted from it, all fine. Last night i shut down and detached the disk. Today, i plugged in and booted again, but this time, the machine would not boot from the external drive. It flashed up a message too quickly for me to read, then went on to boot from the internal drive. I checked the boot order in the BIOS, and the external drive has priority, which suggests that the drive is somehow not bootable.

I plugged the drive into another machine (running Fedora 39), and booted a VM on it like so:

sudo qemu-system-x86_64 \
  -enable-kvm \
  -m 1024 \
  --bios /usr/share/OVMF/OVMF_CODE.fd \
  -drive file=/dev/sda

I know almost nothing about QEMU, so maybe this is the wrong way to do it, but it seemed to work.

In the VM, the bootloader runs, and i get to pick which kernel to boot with (i don’t get this far on the physical machine!). But after picking one (i have only tried the most recent), there is some sort of problem, and i am dropped into the dracut emergency shell:

I have no idea if this is related to the reason this drive won’t boot on a physical machine, or is somehow related to the fact that it is running in a VM.

I mounted the boot partition in the emergency shell (using blkid to list the partitions, then a normal mount to mount them), and copied over this rdsosreport.txt file, and also a dump of the system journal. These can be seen here: Installation not booting · GitHub

I am a bit baffled. I don’t know why this installation did not boot on the physical machine, and i don’t know how to debug that directly, given that it does not produce any output. I don’t know why this installation does not boot in a VM, and i don’t know if it’s for the same reason it doesn’t boot on the physical machine!

Does anyone have any thoughts on what might be going wrong? Or how i could investigate further?

Added boot, dracut

Why did you add the f39 tag? Were you doing an upgrade?

It might be that you thought you turned off the PC, but actually it rebooted, started the offline upgrade and you pulled out the drive.

Thats why having full system snapshots before an upgrade (on traditional, not rpm-ostree Fedora) is crucial…

Likely some random files where half written and then corrupted, so you will need to replace them one by one. I think backing up the home stuff and doing a clean F40 install is the better option.

Without having looked at the logs

1 Like

I would guess from what I see there that you have an encrypted device?

[    3.570033] rife systemd[1]: Reloading requested from client PID 397 (unit dracut-initqueue.service)...
[    3.571620] rife systemd[1]: Reloading...
[    4.590307] rife systemd[1]: Found device dev-disk-by\x2duuid-53565114\x2dc06e\x2d4499\x2d9365\x2d4302e0eb1b2c.device - QEMU_HARDDISK 3.
[    4.592777] rife systemd[1]: Reloading finished in 1020 ms.
[    4.671163] rife systemd[1]: Starting systemd-cryptsetup@luks\x2d53565114\x2dc06e\x2d4499\x2d9365\x2d4302e0eb1b2c.service - Cryptography Setup for luks-53565114-c06e-4499-9365-4302e0eb1b2c...
[    4.821975] rife kernel: random: crng init done
[    4.828518] rife systemd[1]: Started systemd-ask-password-plymouth.service - Forward Password Requests to Plymouth.
[    6.676437] rife rngd[193]: [jitter]: Unable to obtain AES key, disabling JITTER source
[    6.678091] rife rngd[193]: [jitter]: Initialization Failed
[    6.678343] rife rngd[193]: [pkcs11]: Unable to load pkcs11 engine: could not load the shared library
[    6.678380] rife rngd[193]: [pkcs11]: Initialization Failed
[    6.678806] rife rngd[193]: [rtlsdr]: Initialization Failed
[    6.678850] rife rngd[193]: Can't open any entropy source
[    6.678874] rife rngd[193]: Maybe RNG device modules are not loaded
[    6.679805] rife systemd[1]: rngd.service: Main process exited, code=exited, status=1/FAILURE
[    6.680412] rife systemd[1]: rngd.service: Failed with result 'exit-code'.
[    6.680763] rife systemd[1]: rngd.service: Consumed 2.668s CPU time.
[   85.633544] rife kernel: __vm_enough_memory: pid: 442, comm: systemd-cryptse, not enough memory for the allocation
[   85.633552] rife kernel: __vm_enough_memory: pid: 442, comm: systemd-cryptse, not enough memory for the allocation
[   85.633554] rife kernel: __vm_enough_memory: pid: 442, comm: systemd-cryptse, not enough memory for the allocation
[   85.629187] rife systemd-cryptsetup[442]: Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/disk/by-uuid/53565114-c06e-4499-9365-4302e0eb1b2c.
[   85.629522] rife systemd-cryptsetup[442]: Not enough available memory to open a keyslot.
[   85.629556] rife systemd-cryptsetup[442]: Failed to activate with specified passphrase: Cannot allocate memory
[   85.632387] rife systemd[1]: systemd-cryptsetup@luks\x2d53565114\x2dc06e\x2d4499\x2d9365\x2d4302e0eb1b2c.service: Main process exited, code=exited, status=1/FAILURE
[   85.632696] rife systemd[1]: systemd-cryptsetup@luks\x2d53565114\x2dc06e\x2d4499\x2d9365\x2d4302e0eb1b2c.service: Failed with result 'exit-code'.
[   85.632813] rife systemd[1]: Failed to start systemd-cryptsetup@luks\x2d53565114\x2dc06e\x2d4499\x2d9365\x2d4302e0eb1b2c.service - Cryptography Setup for luks-53565114-c06e-4499-9365-4302e0eb1b2c.
[   85.632966] rife systemd[1]: Dependency failed for cryptsetup.target - Local Encrypted Volumes.
[   85.633429] rife systemd[1]: cryptsetup.target: Job cryptsetup.target/start failed with result 'dependency'.
[  216.650624] rife dracut-initqueue[378]: Warning: dracut-initqueue: timeout, still waiting for following initqueue hooks:
[  216.653763] rife dracut-initqueue[378]: Warning: /lib/dracut/hooks/initqueue/finished/90-crypt.sh: "[ -e /dev/disk/by-id/dm-uuid-CRYPT-LUKS?-*53565114c06e449993654302e0eb1b2c*-* ] || exit 1"
[  216.654061] rife dracut-initqueue[378]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2ffedora_localhost-live\x2froot.sh: "[ -e "/dev/fedora_localhost-live/root" ]"
[  216.655973] rife dracut-initqueue[378]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2ffedora_localhost-live\x2fswap.sh: "[ -e "/dev/fedora_localhost-live/swap" ]"
[  216.658071] rife dracut-initqueue[378]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fmapper\x2ffedora_localhost--live-root.sh: "if ! grep -q After=remote-fs-pre.target /run/systemd/generator/systemd-cryptsetup@*.service 2>/dev/null; then
[  216.658071] rife dracut-initqueue[378]:     [ -e "/dev/mapper/fedora_localhost--live-root" ]
[  216.658071] rife dracut-initqueue[378]: fi"

and the device is not able to be decrypted with the methond you are using to boot.

The first message at 85 seconds also hints at not enough memory allocated to the VM.

1 Like

This post isn’t tagged f39. I haven’t started the upgrade process for the installation with the problem - it’s still just Fedora 38.

1 Like

Aha, interesting, thanks. Yes, i have an encrypted partition with everything except the boot sector. I was prompted for a password for that during boot inside the VM, so i assumed that was unlocked. I will look into that. And i can easily increase the memory!

1 Like

Learning to read the logs can assist in troubleshooting. :+1:

Probably at least 4096 for memory would be a start. I usually use 8192 with 2 CPUs.

1 Like

Added luks2, systemd

The OP said he used an f39 machine to try booting the drive into a VM in the very first post.

1 Like