0

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$ 
  • I imagine that 18.10 is first in grub order, but you want 18.04 to be first. Can try updating grub in 18.04, if that does not work, can do a google search on how to adjust grub order. – crip659 Dec 02 '19 at 15:22
  • @ Doug Smythies Most bios will only choose which drive is first booted, not which partition on a drive( the few I know of). – crip659 Dec 02 '19 at 15:25
  • I can't seem to get bios to change this. In Grub Customizer I don't seem to have any entries for 18.04, just 18.10 (sda4). The way I boot is from list that shows up during boot process – joel goldstick Dec 02 '19 at 15:30
  • Bios won't, have you tried sudo update-grub when you are in 18.04. – crip659 Dec 02 '19 at 15:42
  • yes, just did that.. no change – joel goldstick Dec 02 '19 at 15:47
  • Are you saying that if you choose 18.04 in grub you still boot to 18.10? – Paul Benson Dec 02 '19 at 15:50
  • if i choose 18.04 i get 18.04, but I can't make it the default – joel goldstick Dec 02 '19 at 15:51
  • Can check this link, quite a lot of info. https://askubuntu.com/questions/100232/how-do-i-change-the-grub-boot-order – crip659 Dec 02 '19 at 15:56
  • Need to see output of sudo parted -l and gedit /boot/grub/grub.cfg. – Paul Benson Dec 02 '19 at 16:15
  • I think /boot/grub/grub.cfg is too long to post – joel goldstick Dec 02 '19 at 16:55
  • 1
    The 18.04 update-grub does nothing but rewrite the (unused) grub.cfg. Run sudo grub-install /dev/sda from 18.04 to fix that. (Or just copy the 18.04 to the 18.10 location) Assuming you are booting legacy. – ubfan1 Dec 02 '19 at 16:58
  • 1
    You need to edit /boot/efi/EFI/ubuntu/grub.cfg. You may have to reset permissions or use live installer. Or totally reinstall grub from 18.04. Only one Ubuntu version is default in UEFI. Even renaming does not work, but I have not tested with 2.04, yet. Try this also: sudo 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:33
  • I can't get to that file but I did run dpkg-reconfigure.. see updated question – joel goldstick Dec 02 '19 at 18:10
  • You could start by doing what oldfred suggests - sudo gedit /boot/efi/EFI/ubuntu/grub.cfg. Alter the UUID to that of sda2 and followed by root 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
  • 2

0 Answers0