grub-tweaks icon indicating copy to clipboard operation
grub-tweaks copied to clipboard

40_custom example five additional OS in the GRUB menu

Open Axellarator opened this issue 3 years ago • 1 comments

Simple example for a modified GRUB menu. In the moment os-prober can't deliver all possible OS in your system due to security restrictions. This is a possible way to get around and not in harms way. I use /@/boot/vmlinuzand /@/boot/initrd.img as links, because if a kernel update is needed, everything points correctly to the latest (updated) version.


\#! /usr/bin/sh exec tail -n +3 $0 \# This file provides an easy way to add custom menu entries. Simply type the \# menu entries you want to add after this comment. Be careful not to change \# the 'exec tail' line above.'''

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

menuentry "LM 21 Mate" --class linuxmint --class gnu-linux --class gnu --class os { # DEVICE="/dev/nvme0n1p5" UUID_BTRFS=714517ab-c90d-42ca-a492-245053ae57fd load_video gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod part_gpt insmod btrfs search --no-floppy --fs-uuid --set=root ${UUID_BTRFS} linux /@/boot/vmlinuz root=UUID=${UUID_BTRFS} ro rootflags=subvol=@ ${GRUB_CMDLINE_LINUX } ${GRUB_CMDLINE_LINUX_DEFAULT} initrd /@/boot/initrd.img } menuentry "LM 21 Cinnamon" --class linuxmint --class gnu-linux --class gnu --class os { # DEVICE="/dev/nvme0n1p6" UUID_BTRFS=6bf64ce2-c8a5-4dda-b8f8-491615008b43 load_video gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod part_gpt insmod btrfs search --no-floppy --fs-uuid --set=root ${UUID_BTRFS} linux /@/boot/vmlinuz root=UUID=${UUID_BTRFS} ro rootflags=subvol=@ ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} initrd /@/boot/initrd.img } menuentry "LMDE 5 Elsie" --class linuxmint --class gnu-linux --class gnu --class os { # DEVICE="/dev/nvme0n1p7" UUID_BTRFS=35c3a7e0-1aa7-4a70-9e87-18d2a0acce4b load_video insmod gzio insmod part_msdos insmod part_gpt insmod btrfs search --no-floppy --fs-uuid --set=root ${UUID_BTRFS} linux /@/vmlinuz root=UUID=${UUID_BTRFS} ro rootflags=subvol=@ ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} initrd /@/initrd.img } menuentry 'LM 20.3 Mate' --class linuxmint --class gnu-linux --class gnu --class os { # DEVICE="/dev/nvme0n1p8" UUID_BTRFS=138cabd1-b0de-4b57-a9f4-338970fe7df0 load_video gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod part_gpt insmod btrfs search --no-floppy --fs-uuid --set=root ${UUID_BTRFS} linux /@/boot/vmlinuz root=UUID=${UUID_BTRFS} ro rootflags=subvol=@ ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} initrd /@/boot/initrd.img } menuentry "LM 20.3 Zimt" --class linuxmint --class gnu-linux --class gnu --class os { # DEVICE="/dev/nvme0n1p9" UUID_BTRFS=2f5717f8-09e6-44b1-a836-a9eb8238efc4 load_video gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod part_gpt insmod btrfs search --no-floppy --fs-uuid --set=root ${UUID_BTRFS} linux /@/boot/vmlinuz root=UUID=${UUID_BTRFS} ro rootflags=subvol=@ ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} initrd /@/boot/initrd.img }`

Axellarator avatar Sep 06 '22 20:09 Axellarator

Hey @Axellarator The entire grub menu section was written by @Jacksaur, so I don't have much experience with it, if you think there should be some changes or if you want to add to it, please make a PR with the necessary changes

VandalByte avatar Sep 08 '22 14:09 VandalByte