How do I know which grub version is used and how to configure it?
Bo Berglund
bo.berglund at gmail.com
Tue Dec 17 14:03:07 UTC 2024
On Tue, 17 Dec 2024 11:48:16 +0100, Ralf Mardorf via ubuntu-users
<ubuntu-users at lists.ubuntu.com> wrote:
>On Tue, 2024-12-17 at 11:24 +0100, Bo Berglund wrote:
>> What is the difference grub vs. grub2 and how can I determine which is
>> in use?
>
>Hi,
>
>the menu of GRUB legacy is provided by the file /boot/grub/menu.lst .
So I have these files in /boot/grub
/boot/grub$ ll
total 2440
drwxr-xr-x 5 root root 4096 2024-12-17 10:24 .
drwxr-xr-x 5 root root 4096 2024-12-17 10:23 ..
-rw-r--r-- 1 root root 191 2018-01-30 00:58 default
drwxr-xr-x 2 root root 4096 2021-10-15 23:18 fonts
-rw-r--r-- 1 root root 712 2024-12-14 14:02 gfxblacklist.txt
-r--r--r-- 1 root root 13403 2024-12-17 10:24 grub.cfg
-rw-r--r-- 1 root root 1024 2024-12-17 10:37 grubenv
drwxr-xr-x 2 root root 20480 2024-12-14 14:02 i386-pc
drwxr-xr-x 2 root root 4096 2024-12-14 14:02 locale
-rw-r--r-- 1 root root 5292 2024-12-17 10:23 menu.lst
-rw-r--r-- 1 root root 4864 2024-12-17 10:23 menu.lst~
-rw-r--r-- 1 root root 2411806 2024-12-14 14:02 unicode.pf2
Note that partition use is:
nvme0n1p5 = desktop 20.04
nvme0n1p6 = server now at 24.04.1, was 20.04.6 before the dist-upgrade
On my system this file holds the following (active lines only and shortened
lines to fit):
default 0
timeout 0
hiddenmenu
title Ubuntu 24.04.1 LTS, kernel 6.8.0-51-generic
root (hd0)
kernel /boot/vmlinuz-6.8.0-51-generic root=UUID=ec8..ddc1 ro console=hvc0
initrd /boot/initrd.img-6.8.0-51-generic
title Ubuntu 24.04.1 LTS, kernel 6.8.0-51-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-6.8.0-51-generic root=UUID=ec0 ddc1 ro single
initrd /boot/initrd.img-6.8.0-51-generic
title Ubuntu 24.04.1 LTS, kernel 6.8.0-50-generic
root (hd0)
kernel /boot/vmlinuz-6.8.0-50-generic root=UUID=ec0..ddc1 ro console=hvc0
initrd /boot/initrd.img-6.8.0-50-generic
title Ubuntu 24.04.1 LTS, kernel 6.8.0-50-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-6.8.0-50-generic root=UUID=ec0..ddc1 ro single
initrd /boot/initrd.img-6.8.0-50-generic
title Ubuntu 24.04.1 LTS, kernel 5.15.0-126-generic
root (hd0)
kernel /boot/vmlinuz-5.15.0-126-generic root=UUID=ec0..ddc1 ro console=hvc0
initrd /boot/initrd.img-5.15.0-126-generic
title Ubuntu 24.04.1 LTS, kernel 5.15.0-126-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-5.15.0-126-generic root=UUID=ec08...ddc1 ro single
initrd /boot/initrd.img-5.15.0-126-generic
>The menu of GRUB 2 is provided by the file /boot/grub/grub.cfg .
This file is *a lot* more difficult to read than the one above, but if I read
down it I find something I recognize as follows:
Please note:
I have shortened the lines so they will fit here.
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 42BE-49BB
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry 'Ubuntu 20.04.6 LTS (20.04) (on /dev/nvme0n1p5)' --class ubuntu --c
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 3d88bb41-a2e7-43ae-acba-24c06
linux /boot/vmlinuz-5.15.0-126-generic root=UUID=3d88bb41-a2e7-43ae-a
initrd /boot/initrd.img-5.15.0-126-generic
}
submenu 'Advanced options for Ubuntu 20.04.6 LTS (20.04) (on /dev/nvme0n1p5)'
menuentry 'Ubuntu (on /dev/nvme0n1p5)' --class gnu-linux --class gnu
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 3d88bb41-a2e7-43ae-ac
linux /boot/vmlinuz-5.15.0-126-generic root=UUID=3d88bb41-a2e
initrd /boot/initrd.img-5.15.0-126-generic
}
menuentry 'Ubuntu, with Linux 5.15.0-126-generic (on /dev/nvme0n1p5)'
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 3d88bb41-a2e7-43ae-ac
linux /boot/vmlinuz-5.15.0-126-generic root=UUID=3d88bb41-a2e
initrd /boot/initrd.img-5.15.0-126-generic
}
menuentry 'Ubuntu, with Linux 5.15.0-126-generic (recovery mode) (on
/dev/nvme0n1p5)
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 3d88bb41-a2e7-43ae-ac
linux /boot/vmlinuz-5.15.0-126-generic root=UUID=3d88bb41-a2e
initrd /boot/initrd.img-5.15.0-126-generic
}
menuentry 'Ubuntu, with Linux 5.11.0-27-generic (on /dev/nvme0n1p5)'
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 3d88bb41-a2e7-43ae-ac
linux /boot/vmlinuz-5.11.0-27-generic root=UUID=3d88bb41-a2e7
initrd /boot/initrd.img-5.11.0-27-generic
}
menuentry 'Ubuntu, with Linux 5.11.0-27-generic (recovery mode) (on
/dev/nvme0n1p5)
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 3d88bb41-a2e7-43ae-ac
linux /boot/vmlinuz-5.11.0-27-generic root=UUID=3d88bb41-a2e7
initrd /boot/initrd.img-5.11.0-27-generic
}
Here I see what is on the grub start menu when I restart the box (Windows and
Ubuntu 20.04.6 LTS which is no longer existing after the upgrade) and it makes
no sense to me since neither the Ubuntu version nor the kernel versions match
up.
But if I select the line "Ubuntu 20.04.6 LTS (20.04)" my Server 24.04.1 starts!
And in the submenu everything refers to the desktop Ubuntu on /dev/nvme0n1p5!
And at the bottom I found this:
### BEGIN /etc/grub.d/60_grub-imageboot ###
menuentry "Bootable ISO Image: gparted-live-1.6.0-10-i686" {
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root
ec0e8708-8a6a-4bbf-93ba-0a09b1e2ddc1
linux16 /boot/memdisk iso
initrd16 /boot/images/gparted-live-1.6.0-10-i686.iso
}
This is an updated GParted Live I put there to use but instead the boot menu
offers the 3 years old version I used before....
>In the BIOS/UEFI menu you can see the order of the boot devices. There
>you can see which GRUB your BIOS/UEFI is targeting.
Where do I find the BIOS/UEFI file?
Seems not to exist here....
>Regards,
>Ralf
Thanks for your input!
Still wondering if I have a broken system and what to do about it.
In the end I want it to "just work" and then I will move the server partitions
to a NUC box I have assembled (without the Windows stuff).
I could also install an Ubuntu desktop or maybe a Mint desktop to have a linux
with desktop on the new system, not just the server...
At the moment the NUC is not started yet.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list