Score:1

Ubuntu full install to USB won't boot updated kernels

af flag

I did a full install of the latest Ubuntu desktop to a USB stick using the instructions at How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step and it boots fine

However, if I download and install the latest kernel from say https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.13-rc7/, grub2 still boots v5.11.0-18

I'm doing this because I need some new drivers. Do I need to copy boot files again as in the original install? Or is there something else like this image is unsigned and therefore doesn't even show up in grub's advanced menu even though update-grub saw all the kernel images?

Thanks

unmesh59 avatar
af flag
I booted a few different machines with this USB stick, all of which have Secure Boot turned off. Some showed the unsigned kernel in the Advanced grub menu (and booted it) while others didn't!
C.S.Cameron avatar
cn flag
I have not upgraded kernels often. I think that you probably need to copy grub.cfg from partition sdx4 /boot/grub/ to partition sdx3 /boot/grub/ overwriting the grub.cfg file one more time. You can check kernel version between the two cfg files before doing so. please let me know how it works.
Score:0
cn flag

Ubuntu Full Install to USB - Updated Kernel

Upgrading Ubuntu's kernel should add the new kernel to sdx4/boot/grub/grub.cfg menuentry.

sdx3/boot/grub/grub.cfg is not updated automatically.

Check sdx4/boot/ to confirm vmlinuz-5.13-rc7 and initrd.img-5.13-rc7-generic exist. If not reinstall the new kernel.

Check sdx4/boot/grub/grub.cfg and sdx3/boot/grub/grub.cfg to confirm vmlinuz-5.13-rc7 and initrd.img-5.13-rc7-generic are noted in the first menuentry of each cfg file.

I think that you probably need to copy grub.cfg from partition sdx4/boot/grub/ to partition sdx3/boot/grub/overwriting that grub.cfg file one more time as is required when doing a sudo update-grub.

if vmlinuz-5.13-rc7 and initrd.img-5.13-rc7-generic are not specified in either sdx3 or sdx4 GRUB, the cfg files should be backed up and edited changing 5.11.0-18 to 5.13-rc7 or whatever the latest kernel in boot is named.

unmesh59 avatar
af flag
Copying grub.cfg from sdx4 to sdx3 made it work! Why are some machines using the file from one partition and others from the other partition? Thanks
C.S.Cameron avatar
cn flag
@unmesh59: To let other people know this solution worked for you please click the curved arrow in the upper left of the answer to accept the solution. You can also click the up arrow to show the answer is useful, see: https://askubuntu.com/tour. There are two boot partitions used with this method, one for BIOS boot computers, (sdx3) and one for UEFI boot computers, (sdx4). When you update GRUB or upgrade the kernel, sdx4 grub.cfg gets modified automatically, but (sdx3) grub.cfg does not, so it must be modified by hand.
unmesh59 avatar
af flag
This has been a great education on the OS boot process. Thanks and I have marked the answer appropriately now.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.