1

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

2
  • 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!
    – unmesh59
    Jun 21, 2021 at 2:47
  • 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. Jun 21, 2021 at 3:10

1 Answer 1

0

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.

3
  • 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
    – unmesh59
    Jun 21, 2021 at 15:54
  • @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: 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. Jun 22, 2021 at 2:00
  • 1
    This has been a great education on the OS boot process. Thanks and I have marked the answer appropriately now.
    – unmesh59
    Jun 22, 2021 at 20:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .