when I restart my computer, it boots to ubuntu 18.10 on sda4. I don't want that. I want to boot to 18.04 on sda2. I can do this by selecting from the list of oses during the boot process, but if i have a power outage, it boots to the wrong os. What to do?
Model: ATA WDC WD1001FALS-0 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 537GB 536GB ext4
3 537GB 537GB 1049kB bios_grub
4 537GB 1000GB 464GB ext4
jcg@jcg-hp:/boot$ sudo dpkg-reconfigure grub-efi-amd64
[sudo] password for jcg:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-041500rc6-generic
Found initrd image: /boot/initrd.img-4.15.0-041500rc6-generic
Found linux image: /boot/vmlinuz-4.15.0-72-generic
Found initrd image: /boot/initrd.img-4.15.0-72-generic
Found linux image: /boot/vmlinuz-4.15.0-70-generic
Found initrd image: /boot/initrd.img-4.15.0-70-generic
Found linux image: /boot/vmlinuz-4.13.0-37-generic
Found initrd image: /boot/initrd.img-4.13.0-37-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Found linux image: /boot/vmlinuz-4.13.0-31-generic
Found initrd image: /boot/initrd.img-4.13.0-31-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 18.10 (18.10) on /dev/sda4
done
Processing triggers for shim-signed (1.37~18.04.3+15+1533136590.3beb971-0ubuntu1) ...
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
jcg@jcg-hp:/boot$
sudo update-grub
when you are in 18.04. – crip659 Dec 02 '19 at 15:42sudo parted -l
andgedit /boot/grub/grub.cfg
. – Paul Benson Dec 02 '19 at 16:15sudo dpkg-reconfigure grub-efi-amd64
https://askubuntu.com/questions/1054032/grub-loads-instead-of-ubuntu-whenever-my-hp-streambook-reboots Shows 3 line grub.cfg in ESP: https://askubuntu.com/questions/1001426/how-to-remove-separate-boot-partition-on-uefi-system – oldfred Dec 02 '19 at 17:33sudo gedit /boot/efi/EFI/ubuntu/grub.cfg
. Alter the UUID to that of sda2 and followed byroot hd0,gpt2
then save and reboot. If you get a black screen with a grub prompt it's easily fixed from there. – Paul Benson Dec 02 '19 at 18:12