I have Ubuntu 16.04, Ubuntu 18.04, and Windows 10 installed on my machine. I want to update the order of entries in the grub menu so that the default (first) entry is Ubutnu 18.04. The solutions available online suggest manually changing the default to a specific entry, with a specific kernel version. However, after kernel update, won't I need to again change the order to put the latest version on top?
I notice I have this kind of "generic" entry (the first entry, called "Ubuntu") which always loads the last kernel version available of Ubuntu 16.04. How can I have an entry with the same behavior for Ubuntu 18.04 and move it to the top? Also, could someone explain how this entry works? I couldn't find anything online about it.
P.S: I tried changing the order and saving with Grub-customizer, but it didn't actually change it! Also, it seems to be inconsistent, because in the first entry named "Ubuntu", when I click edit, I find that it has this part "linux /boot/vmlinuz-4.18.0-25-generic". So, it seems to be referring to Ubuntu 18.04 kernel, but when I open the same entry from boot menu, it opens Ubuntu 16.04 instead.
Thank you.
grub-customizer
or make changes on the system that owns the MBR. If it's 16.04, changes made in 18.04 will be unused and vice-versa. Changes made to /boot/grub/grub.cfg will be overwritten on nextupdate-grub
(including kernel updates), but changes made to /etc/default/grub will not be lost (ie. that's where to make changes, but you need to runupdate-grub
to see the changes copied to your grub.cfg file). – guiverc Jul 23 '19 at 11:14grep -i "menuentry '" /boot/grub/grub.cfg|sed -r "s|--class .*$||g"|nl -v 0
– nobody Jul 23 '19 at 12:13fdisk -l 2>/dev/null | egrep "Disk /|/dev/" | sed "s#^/dev/#Part /dev/#" | awk '{print $2}' | sed 's/://' | xargs -n1 -IX sudo sh -c "hexdump -v -s 0x80 -n 2 -e '2/1 \"%x\" \"\\n\"' X | xargs -n1 -IY sh -c \"case \"Y\" in '48b4') echo X: GRUB 2 v1.96 ;; 'aa75' | '5272') echo X: GRUB Legacy ;; '7c3c') echo X: GRUB 2 v1.97 oder v1.98 ;; '020') echo X: GRUB 2 v1.99 ;; *) echo X: Kein GRUB Y ;; esac\""
– nobody Jul 23 '19 at 12:59