New Install of Neon over Kubuntu and GRUB won't load Neon

Hello!

I’ve just installed KDE Neon over my Kubuntu installation after an update gone bad. Now at the GRUB menu when I select “Ubuntu” I get to a Kernel Panic error screen that says it can’t locate block dev. I am really a novice when it comes to Linux, and for the life of me I cannot figure out how to edit or fix GRUB. I’ve searched and tried various guides all with out success. So far I can only run it from the live version from USB. It can see all my drives and partitions, but I don’t even know how to find where GRUB is much less do anything!

Booting into Windows works fine from the GRUB menu.

Any help is greatly appreciated!

With the live version of the USB running open Konsole then run the following commands by typing them in and hitting the enter key putting sudo in front of them as I have enabled root and do not need it.

root@9600k:~# blkid | grep nvme
/dev/nvme1n1p4: LABEL="SPNVMEBackup" UUID="b06f2ccc-2628-414d-99c2-62a4168fba40" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="31a74743-d71a-4af5-a587-6e1bc7b71ce1"
/dev/nvme1n1p2: LABEL="SPNVMERoot" UUID="a4410a13-b1ea-4007-b22f-6eb9e0a2ead4" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="f979d6b1-0c46-4357-88b3-6afd8e25dfe5"
/dev/nvme1n1p3: LABEL="SPNVMEHome" UUID="1ba697ed-bde7-4bd3-b9f3-b47045b44585" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="8854aa17-12b1-464f-9abf-a686e7d64b6b"
/dev/nvme1n1p1: SEC_TYPE="msdos" LABEL_FATBOOT="SPNVMEEFI" LABEL="SPNVMEEFI" UUID="FEC4-39C0" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="254da66f-ea2b-43db-ab14-480480308d14"

This command shows what I know to be my nvme install drive. The important parts you want from this information when proceeding is the UUID=“???”. This tells grub where it is supposed to be looking for your install partitions to load from, this is what it cannot find at the moment with the error it gives. And the /dev/nvme1n1p? parts this is used for the mount commands to be able to mount then edit the required files.

root@9600k:~# mkdir /tmp/root
root@9600k:~# mkdir /tmp/efi
root@9600k:~# mount /dev/nvme1n1p2 /tmp/root
root@9600k:~# mount /dev/nvme1n1p1 /tmp/efi

The above command shows what I just did no more than half an hour ago when I mounted then cloned the install I was running from external SSD to test the new install of Kubuntu 24.04 I have been running for days to my internal nvme drive. To boot from there as I now am. The files needing to be edited if wrong are the /tmp/efi/EFI/ubuntu/grub.cfg and /tmp/root/boot/grub/grub.cfg with possibly the /tmp/root/etc/fstab to check the partitions have been put into it correctly.

root@9600k:~# cat /tmp/efi/EFI/ubuntu/grub.cfg 
search.fs_uuid a4410a13-b1ea-4007-b22f-6eb9e0a2ead4 root  
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

This shows the first file grub will load to try and boot the system in the EFI directory on the drive. If you use MBR I have no clue on it as I have never done this with such a system. You see the uuid in it matches the UUID=“???” of the /dev/nvme1n1p2 in the output of the blkid I show first. Then you need to check the /tmp/root/boot/grub/grub.cfg to see if the correct uuid is in there as this the second file grub used to boot the system. And of course the /tmp/root/etc/fstab for the same UUID=??? for the /. With all three of these correct it should just be booting for you if GRUB got installed correctly to the drive. As I have said it just did for me when I did it few minutes ago. If all this seems a bit much then use this page to do it graphically from the install USB as explained by Ubuntu.

https://help.ubuntu.com/community/Boot-Repair

Edit: oh and if needing to correct the /tmp/root/boot/grub/grub.cfg file use this command to do it.

root@9600k:~# sed -i "s/3245ec98-3b8b-4408-926e-32f95a103039/a4410a13-b1ea-4007-b22f-6eb9e0a2ead4/g" /tmp/root/boot/grub/grub.cfg

This uses sed to replace all occurrences the 3245ec98-3b8b-4408-926e-32f95a103039 in the file, my / partition on the external SSD that was copied over when cloning with the a4410a13-b1ea-4007-b22f-6eb9e0a2ead4 uuid for my nvme internal drive.

Edit2: The last command needed to edit the /tmp/root/etc/fstab since I mentioned that and may as well have it as complete for the instructions to do it.

root@9600k:~# nano /tmp/root/etc/fstab

have you ever at any point run grub customizer?

No, this is my first time using KDE Neon

I suspect you may be running into EFI issues. Under normal conditions, installers will use an existing EFI partition and not create another one, and all installed OSes will use the same partition, including windows. The problem is, this “dual boot” configuration becomes dependent on the already installed oses, and when you remove one, the system suddenly wont boot as it depends on the presence of the old OS. So likely what happened is Neon saw the EFI, saw “valid” data from ubuntu, and used it. But, as you see, that fails.

So, the easiest way to check for that issue is to try to install a truly portable version of Neon on an external drive. Just installing it on an external will not solve the problem, you need to make it actually portable as described below.

To do this, start a live USB session. When you get to the partitioner, disable the existing EFI boot flag on whichever drive it is on using the partition manager by right clicking on the partition, then click properties, and then uncheck the “boot” option. Then create your standard /efi, /boot, /swap, and data partitions on the EXTERNAL drive.

Install Neon, then BEFORE you reboot, reset the boot flag on the old EFI, then start neon from the external drive. If this works, then you have your culprit. Reboot with the external removed, and you should boot to the old EFI as per normal, and have the same issues with “ubuntu” (a properly installed neon will show “Neon” in the grub menu, not ubuntu).

If it is a single boot system, then you can simply delete the existing EFI and boot partitions, and reinstall Neon. If you are dual boot with Windows, then you will need to reset the EFI partition with Windows itself (recovery system), then install Neon as per normal.

Now, I have not tried this on internal drives, but it seems to me that deleting the existing EFI if you have windows installed, should result in grub still seeing the Windows partition and setting up grub properly. Again, I have not tested this as I solo Neon on my PC, but EFI is supposed to be independent of the OS. If you do try this on an internal drive, then ensure you know how to restore the Windows EFI using the Windows recovery system should something go amiss.

See this doc for more info on how to properly set up an portable install for Linux.

How to Create a Truly Portable Ubuntu Installation on an External USB HDD or SSD | Anthony Bouch