Grub Titles
Ralf Mardorf
kde.lists at yahoo.com
Sun Aug 27 17:20:15 UTC 2023
Hi,
instead of using a grub.cfg that is generated by grub, I'm using a
manually edited grub.cfg. By using grub from Arch Linux I had nothing to
do. When I was using grub from an Ubuntu flavour I probably used dpkg-
divert to replace grub-mkconfig and update-grub, at least I see this
script I've written in 2016 [1]. My current grub.cfg [2] shows that it's
not complicated to edit a grub.cfg.
You might want to take a look at hints related to /etc/lsb-release or
/etc/grub.d/ or something else, see
https://www.google.com/search?q=from+where+does+grub+os+prober+get+the+linux+names
https://www.kubuntuforums.net/forum/archives/eol-releases/-18-04/software-support-az/67784-changing-os-name-picked-up-by-os-prober?p=593552#post593552
https://www.google.com/search?q=how+to+disable+grub-mkconfig
https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html
https://www.debian.org/doc/debian-policy/ap-pkg-diversions.html
Another option is using a different bootloader. A while back I was in
favour of syslinux.
Regards,
Ralf
[1]
$ cat /mnt/moonstudio/usr/src/dpkg-divert-grub.sh
#!/bin/bash
divert () {
cat<<EOF
#!/bin/dash
name=\$(echo \$(basename \$0) | sed -e 's/[0-9]\+ *//')
printf "\n \033[7m\$(basename \$0) was renamed \$name.real\033[0m\n\n"
exit
EOF
}
case $1 in
--add)
for s in grub-mkconfig update-grub
do
s=/usr/sbin/$s
dpkg-divert --add --rename --divert $s.real $s && divert > $s
chmod a+x $s
done;;
--remove)
for s in grub-mkconfig update-grub
do
s=/usr/sbin/$s
rm $s && dpkg-divert --rename --remove $s
done;;
--list)
dpkg-divert --list | grep "local diversion of"
ls -hlv /usr/sbin/grub-mkconfig* /usr/sbin/update-grub*|grep -v "gf"
;;
*)
cat $0;
esac
exit
[2]
$ cat /boot/grub/grub.cfg
play 1920 440 1 0 1 880 2 0 1 880 1 0 1 440 2
set timeout=60
set color_normal=light-gray/black
set color_highlight=white/light-gray
set menu_color_normal=light-gray/black
set menu_color_highlight=white/light-gray
set default="1"
insmod efi_gop
menuentry " -- HAL 9000-m1 -----------------------------------------------------------------" {
true
}
menuentry " MemTest86 V10+ Free" {
search --set=root --no-floppy --fs-uuid 3F5B-F698
chainloader /EFI/memtest86/memtestx64.efi
}
menuentry " -- Arch Linux ------------------------------------------------------------------" {
true
}
menuentry " Arch Linux threadirqs" {
search --no-floppy --set=root --label m1.archlinux
linux /boot/vmlinuz-linux root=/dev/disk/by-label/m1.archlinux ro threadirqs ibt=off ipv6.disable=1
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry " Arch Linux" {
search --no-floppy --set=root --label m1.archlinux
linux /boot/vmlinuz-linux root=/dev/disk/by-label/m1.archlinux ro ibt=off ipv6.disable=1
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry " Arch Linux Longterm" {
search --no-floppy --set=root --label m1.archlinux
linux /boot/vmlinuz-linux-lts root=/dev/disk/by-label/m1.archlinux ro ibt=off ipv6.disable=1
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
menuentry " Arch Linux Rt" {
search --no-floppy --set=root --label m1.archlinux
linux /boot/vmlinuz-linux-rt root=/dev/disk/by-label/m1.archlinux ro ibt=off ipv6.disable=1
initrd /boot/intel-ucode.img /boot/initramfs-linux-rt.img
}
menuentry " -- Other Linux -----------------------------------------------------------------" {
true
}
menuentry " Alpine Linux" {
search --no-floppy --set=root --label m1.alpine
linux /boot/vmlinuz-lts root=/dev/disk/by-label/m1.alpine ro modules=ext4
initrd /boot/initramfs-lts
}
menuentry " Xubu 20.04 Linux 6.2.9-custom" {
search --no-floppy --set=root --label m1.xubu20.04
linux /boot/vmlinuz-6.2.9-custom root=/dev/disk/by-label/m1.xubu20.04 ro
initrd /boot/initrd.img-6.2.9-custom
}
menuentry " Ubuntu X Moon Studio lowlatency" {
search --no-floppy --set=root --label m1.archlinux
linux /.boot/ubuntu_moonstudio/boot/vmlinuz-lowlatency root=/dev/disk/by-label/moonstudio ro
initrd /.boot/ubuntu_moonstudio/boot/initrd.img-lowlatency
}
submenu " *buntu -- Submenu --" {
menuentry " Xubu 20.04 Linux 6.2.9-custom (recovery mode)" {
search --no-floppy --set=root --label m1.xubu20.04
linux /boot/vmlinuz-6.2.9-custom root=/dev/disk/by-label/m1.xubu20.04 ro recovery nomodeset
initrd /boot/initrd.img-6.2.9-custom
}
menuentry " Xubu 20.04 Linux 5.4.0-42-generic" {
search --no-floppy --set=root --label m1.xubu20.04
linux /boot/vmlinuz-5.4.0-42-generic root=/dev/disk/by-label/m1.xubu20.04 ro
initrd /boot/initrd.img-5.4.0-42-generic
}
menuentry " Xubu 20.04 Linux 5.4.0-42-generic (recovery mode)" {
search --no-floppy --set=root --label m1.xubu20.04
linux /boot/vmlinuz-5.4.0-42-generic root=/dev/disk/by-label/m1.xubu20.04 ro recovery nomodeset
initrd /boot/initrd.img-5.4.0-42-generic
}
menuentry " Ubuntu X Moon Studio liquorix threadirqs" {
search --no-floppy --set=root --label m1.archlinux
linux /.boot/ubuntu_moonstudio/boot/vmlinuz-liquorix root=/dev/disk/by-label/moonstudio ro threadirqs
initrd /.boot/ubuntu_moonstudio/boot/initrd.img-liquorix
}
}
menuentry " -- System ----------------------------------------------------------------------" {
true
}
menuentry " UEFI Firmware Settings" --id 'uefi-firmware' {
fwsetup
}
menuentry " Restart" {
reboot
}
menuentry " Shutdown" {
halt
}
menuentry " --------------------------------------------------------------------------------" {
true
}
More information about the ubuntu-users
mailing list