Comment 554 for bug 1734147

Revision history for this message
gamdow (gamdow) wrote :

> #548
> Is it possible to create some sort of persistence on the liveusb, install the latest kernel, then change my settings upon reboot?

So I had the variety of this issue where I could only boot from the particular Ubuntu 17.10 Live USB I did the original install with (BIOS locked to a particular vendor/iso ID?). After quite a wild journey trying to find a way to update the Live USB kernel (without modifying the ID) I discovered a far simpler solution.

0. Presumably you have an installation of the bad 17.10 on the laptop HDD. If not, use the Live USB to do that (or another USB stick if you like)
1. Boot from the Live USB. When you reach the grub boot menu, hit 'c' to access the grub terminal.
2. Try to find the device id of the partition (e.g. '(hd0,1)') where the Ubuntu installation is located. Probe around with commands like 'ls (hd0,1)', 'ls (hd1,2)', etc. If SecureBoot is preventing you from using 'ls' try 'cat (hd0,1)/etc/issue', it should return something like 'Ubuntu 17.10 \n \l'.
3. Now issue the following commands to set and boot boot from that installation;
  'grub> set root=(hd1,2)' # replace with the id you found in step 2
  'grub> linux /vmlinuz root=/dev/sda2' # While sdb2 is the equivalent of (hd1,2), the root for this command is not necessarily the same as the previous one. The boot drive will be promoted to sda, replacing the USB stick. So root here should be sda2 for an installation with the default partitioning. Getting this wrong will result in init script error along the lines of 'can't mount /dev to /root/dev'. You may be able to figure out the correct root from the (initrmfs) terminal you end up in, try 'ls' there.
  'grub> initrd /initrd.img'
  'grub> boot'
4. Follow the OP's instructions for updating the Kernel, up to and including the reboot. However, you will end up back at the Live USB grub menu, but this is fine an you are nearly done.
5. Execute steps 1 to 3 again. This will boot the installation with the new kernel.
6. Reboot, access BIOS menu and check you can modify settings.
7. Pull the Live USB and burn it in a fire.

At this point, my BIOS was fixed, but I was still booting to the grub menu. So I just did a fresh install of the fixed Ubuntu (17.10.1).