Booting fails after changing root partition

I had trouble with lvm, thus I changed the root partition to be a normal partition with lvm. I first tried to move everything to an ext4 partition, and now switched back to xfs. I updated grub with grubby and /etc/fstab to include the root=UUII would like to avoid going back to a D=... with the new UUID, but the boot fails and it prints an error that it is unable to find /dev/disk/by-uuid/.... The UUID is correct as far as I can tell, if I put the microSD into a different computer it is shown with that name.

I thought ext4 might not be working because the ext4 driver may not be in the kernel image, but it should be working with xfs?

Am I missing something? Is it not possible to modify the image to not use lvm?

Reconfigure GRUB:

  • After updating the /etc/default/grub file, you should regenerate the GRUB configuration using:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Regenerate Initramfs:

  • As mentioned earlier, regenerate the initramfs for your kernel. In Fedora, this is typically done using dracut:

sudo dracut -f /boot/initramfs-<kernel-version>.img <kernel-version>

If it’s still an issue, run this :

sudo journalctl -xe | grep dracut

I probably should add that I do not manage to run a livefs on the raspberry pi, but rather take the microSD and put it in a x86_64 computer; thus everything I do to fix it, is done using qemu.

I have been running both commands, but the error still remains.

I tried looking at journalctl from the chroot, but obviously, there are no relevant entries.

I am unable to get any logs from the failed boot, as the keyboard is ignored during boot.
I am not sure whether this is related. During grub the keyboard is still working.

When I need to change the patitioning on a sdcard for the RPi.
I use my desktop system to do it. Not sure why you have qemu involved.
Just run the partition tools directly on the sdcard then test boot to check that all is well on the RPi itself.

When I need to change the patitioning on a sdcard for the RPi.
I use my desktop system to do it. Not sure why you have qemu involved.

It is used when I chroot into my RPi image. For example to run grubby to
update the root= parameter.

Just run the partition tools directly on the sdcard then test boot to
check that all is well on the RPi itself.

How do you test boot? Plug it into the RPi?
Any suggestions on how to proceed if it does not work?
Should a USB Keyboard be working if the boot gets stuck in the dracut stage?
Should I open a new question for that? I assume that if I would be able
to get that working, I could figure out what is going wrong and fixing
it …

So far the changes I made only needed simple text edits of config files.

I cannot recall if i needed to change root= but would have done that with a text editor.

No need to run grubby so far for me.