Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: How to have a custom UEFI grub menu for a multiboot system

  1. #11
    Join Date
    Jul 2018
    Location
    Florida, US
    Posts
    32

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    I've been trying to change the theme to a backgound and font colors on openSUSE but, haven't quit gotten there yet.

    In /etc/default/grub I commented out the theme and added a background but, nothing changed. I still had a theme.

    Took a look at /etc/grub.d/00_header and seen that is where the theme is coming from. So, I'll have to do some more research...

    I've never seen a file like 00_header on any other Linux system so far. But, nothing is impossible.

    Lemme see...
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB,
    HD: OCZ VERTEX460 480GB SSD, 2 Toshiba 2TB SATA drives configured RAID 0, Sound Blaster Audigy Series

  2. #12
    Join Date
    Jul 2018
    Location
    Florida, US
    Posts
    32

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    Ok, I got a grub picture. It changed to the background on next boot. But, I was not able to get font colors, at least not yet.
    I'll edit the 1st post to include how I got this.

    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB,
    HD: OCZ VERTEX460 480GB SSD, 2 Toshiba 2TB SATA drives configured RAID 0, Sound Blaster Audigy Series

  3. #13
    Join Date
    Jul 2018
    Location
    Florida, US
    Posts
    32

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    While I was in screen Grub2 screen, I entered "c" to get a command line and vbeinfo is supposed to list the acceptable video resolutions but, it just gave an error, so I entered videoinfo which listed the resolutions available in openSUSE.

    The biggest picture I could use was 1280x1024x32 so I edited /etc/default/grub and entered the blue lines.
    Entering the background and commenting out the theme line. Then the picture appeared with the custom entries.

    Code:
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    GRUB_GFXMODE=1280x1024x32
    
    
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID=true
    
    
    # Uncomment to disable generation of recovery mode menu entries
    #GRUB_DISABLE_RECOVERY="true"
    
    
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
    GRUB_BACKGROUND=/boot/grub2/opensuse-black-1280x1024.png
    #GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
    It stretches the background to cover the whole screen. So, that will provide a custom background.
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB,
    HD: OCZ VERTEX460 480GB SSD, 2 Toshiba 2TB SATA drives configured RAID 0, Sound Blaster Audigy Series

  4. #14
    Join Date
    Jul 2018
    Location
    Florida, US
    Posts
    32

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    I installed Fedora 28, which indeed has a working Fusion-Icon (funny how one's standards change).
    Fought with it for a few days; things were strange to say the least, e.g. installed Xfce and mousepad did not behave the way it should. For example you highlight text and it does not become highlighted and you cannot tell what you have until you paste what you copied.
    Still trying to figure that out.

    Anyway, it did not have a symbolic link to the 2 kernel parts like most systems do that gets updated when a new kernel gets installed. This permits a custom grub menu without having to mess with it.

    I'm pretty sure that after a while the new OS creates the symbolic links. So, I didn't want to wait and created symbolic links in /boot for the latest kernel. Then I changed the custom grub menuentry to something I hope that I will not need to touch again.
    I had this (notice the blue hard coding it to the kernel):
    Code:
    menuentry 'Fedora 28 4.18.10-200.fc28.x86_64 (Workstation Edition) (on /dev/sdc8)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.18.10-200.fc28.x86_64-advanced-9084e0b8-b05b-41af-a4eb-902a0bebe70a' {
            load_video
            set gfxpayload=keep
            insmod gzio
            insmod part_gpt
            insmod ext2
            set root='hd2,gpt8'
            search --no-floppy --fs-uuid --set=root 9084e0b8-b05b-41af-a4eb-902a0bebe70a
            linux /boot/vmlinuz-4.18.10-200.fc28.x86_64 root=UUID=9084e0b8-b05b-41af-a4eb-902a0bebe70a ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet
            initrd /boot/initramfs-4.18.10-200.fc28.x86_64.img
    }
    to this - symbolic links and UUID:
    Code:
    menuentry 'Fedora (Workstation)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-9084e0b8-b05b-41af-a4eb-902a0bebe70a' {
            load_video
            set gfxpayload=keep
            insmod gzio
            insmod part_gpt
            insmod ext2
            set root='hd2,gpt8'
            search --no-floppy --fs-uuid --set=root 9084e0b8-b05b-41af-a4eb-902a0bebe70a
            linux /boot/vmlinuz root=UUID=9084e0b8-b05b-41af-a4eb-902a0bebe70a ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet
            initrd /boot/initrd
    }
    Bam! It booted first time. I was amazed as I had never done this before.

    For some odd reason when it got that new kernel, grub dropped the "ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet" part.
    The resume parameter is important as I do not like having it not wake from suspend. I've created scripts on many systems that get executed at boot to enable my USB ports so my USB mouse and keyboard can wake it up.

    Otherwise I see the pc start back up but, the monitor just says "no signal" and goes back to sleep" and I have to hit the reset button.
    I really like the "resume=UUID=" parameter as it wakes it from suspend without a problem.

    So, this is what I now have all in alphabetical order, hopefully maintenance free:
    Code:
    #!/bin/sh
    echo 1>&2 "Adding Arch Linux, Fedora 28 (Workstation), openSUSE Tumbleweed and Windows 10"
    exec tail -n +4 $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.
    menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
           load_video
           set gfxpayload=keep
           insmod gzio
           insmod part_gpt
           insmod fat
           set root='hd2,gpt1'
           search --no-floppy --fs-uuid --set=root 688D-126B
           linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
           initrd    /intel-ucode.img /initramfs-linux.img
    }
    menuentry 'Arch Linux (fallback kernel)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
           load_video
           set gfxpayload=keep
           insmod gzio
           insmod part_gpt
           insmod fat
           set root='hd2,gpt1'
           search --no-floppy --fs-uuid --set=root 688D-126B
           linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
           initrd    /initramfs-linux-fallback.img
    }
    menuentry 'Fedora (Workstation)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-9084e0b8-b05b-41af-a4eb-902a0bebe70a' {
            load_video
            set gfxpayload=keep
            insmod gzio
            insmod part_gpt
            insmod ext2
            set root='hd2,gpt8'
            search --no-floppy --fs-uuid --set=root 9084e0b8-b05b-41af-a4eb-902a0bebe70a
            linux /boot/vmlinuz root=UUID=9084e0b8-b05b-41af-a4eb-902a0bebe70a ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet
            initrd /boot/initrd
    }
    menuentry 'openSUSE Tumbleweed' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-274e3321-d7af-4544-9afa-b1b3c118c325' {
           insmod part_gpt
           insmod ext2
           set root='hd2,gpt7'
           search --no-floppy --fs-uuid --set=root 274e3321-d7af-4544-9afa-b1b3c118c325
           linux /boot/vmlinuz root=/dev/sdc7 splash=silent resume=/dev/disk/by-uuid/bbc771f8-ba61-4e50-aeca-d2754b112aee quiet
           initrd /boot/initrd
    }
    menuentry 'Windows 10' --class windows --class os $menuentry_id_option 'osprober-efi-688D-126B' {
            insmod part_gpt
            insmod fat
            set root='hd2,gpt1'
            search --no-floppy --fs-uuid --set=root 688D-126B
            chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
    Last edited by Cavsfan; 07-Oct-2018 at 16:17. Reason: alignment
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB,
    HD: OCZ VERTEX460 480GB SSD, 2 Toshiba 2TB SATA drives configured RAID 0, Sound Blaster Audigy Series

  5. #15
    Join Date
    Jul 2018
    Location
    Florida, US
    Posts
    32

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    @mrmazda, I tried doing this like you are with labels and it failed miserably. A Grub guy I know uses config files for the entries and it works for him but, I have not gotten it to work for me.

    Although, there is some work to initially get my version in place, it requires zero maintenance. I do want resume to work and have added the resume= line to Ubuntu 18.04 LTS.
    It allows the system to wake from suspend. Other wise it just wakes up, displays "no signal" and requires the reset button to be pressed to reboot the machine. It's that way by default.
    There is one way I know of to wake Ubuntu after suspend without a kernel boot line and that is to have a script enable the USB ports.

    But, the 2 kernel lines linux and initrd are symlinks that are always updated to point to the lastly installed kernel. So, that is constant and never needs changed.

    Fedora is the only Linux system I have found that does not create those 2 symlinks. I created a script to do so after a new kernel is installed. It works magnificently.

    I call the script symlink-kernel and here it is:
    Code:
    #!/bin/bash
    #
    
    
    # We're passed the kernel version being installed
    KERNEL_VERSION="$1"
    
    
    ln -s -f "initramfs-"$1".img" /boot/initrd.img
    
    
    ln -s -f "vmlinuz-"$1 /boot/vmlinuz
    
    
    echo "   SUCCESS: symlink initrd.img created for "initramfs-"$1".img"" >&2
    echo "   SUCCESS: symlink vmlinuz created for "vmlinuz-"$1" >&2
    
    
    exit 0
    You make it executable sudo chmod +x symlink-kernel.

    Then you install it on Fedora like this:
    Code:
    sudo install symlink-kernel /etc/kernel/postinst.d/symlink-kernel
    So, as long as the UUIDs for the system partitions and the swap UUID are in this, it works to my satisfaction. No further maintenance required unless you remove or replace a system.

    Here is my current 06_custom file and I do keep everything else executable too.
    Code:
    #!/bin/sh
    echo 1>&2 "Adding Arch Linux, Fedora 28 (Workstation), openSUSE Tumbleweed, Xubuntu 18.04.1 LTS (18.04) and Windows 10"
    exec tail -n +4 $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.
    menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod fat
        set root='hd2,gpt1'
        search --no-floppy --fs-uuid --set=root 688D-126B
        linuxefi  /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
        initrdefi /intel-ucode.img /initramfs-linux.img
    }
    menuentry 'Arch Linux (fallback kernel)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod fat
        set root='hd2,gpt1'
        search --no-floppy --fs-uuid --set=root 688D-126B
        linuxefi  /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
        initrdefi /initramfs-linux-fallback.img
    }
    menuentry 'Fedora (29 (Twenty Nine)' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt8'
        search --no-floppy --fs-uuid --set=root 2327668d-fb7f-4e44-9462-cd72af7a2873
        linuxefi  /boot/vmlinuz root=UUID=2327668d-fb7f-4e44-9462-cd72af7a2873 ro resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet nouveau.modeset=0
        initrdefi /boot/initrd.img
    }
    menuentry 'openSUSE Tumbleweed' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-06d2aa5d-5c70-4916-9f8f-219f93668d52' {
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt7'
        search --no-floppy --fs-uuid --set=root 06d2aa5d-5c70-4916-9f8f-219f93668d52
        linuxefi  /boot/vmlinuz root=/dev/sdc7 splash=silent resume=/dev/disk/by-uuid/bbc771f8-ba61-4e50-aeca-d2754b112aee quiet
        initrdefi /boot/initrd
    }
    menuentry 'Xbuntu 18.04' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-833501fb-4f83-4d51-9903-685d56cb6891' {
        set root='hd2,gpt9'
        search --no-floppy --fs-uuid --set=root 833501fb-4f83-4d51-9903-685d56cb6891
        linuxefi  /vmlinuz root=UUID=833501fb-4f83-4d51-9903-685d56cb6891 ro resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee quiet splash
        initrdefi /initrd.img
    }
    menuentry 'Windows 10' --class windows --class os $menuentry_id_option 'osprober-efi-688D-126B' {
        insmod part_gpt
        insmod fat
        set root='hd2,gpt1'
        search --no-floppy --fs-uuid --set=root 688D-126B
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
    Even with the obfuscatory options and human immemorable UUIDs included. Why? Because it works with them in there and zero future maintenance is required.
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB,
    HD: OCZ VERTEX460 480GB SSD, 2 Toshiba 2TB SATA drives configured RAID 0, Sound Blaster Audigy Series

  6. #16
    Join Date
    Jul 2018
    Location
    Florida, US
    Posts
    32

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    I stand corrected. There were no symlinks in openSUSE just like in Fedora, although I sure thought there were. So, the custom entry above this post would not work until I did this:

    Code:
    cd /boot/
    
    sudo ln -s -f initrd-4.19.5-1-default initrd
    
    sudo ln -s -f vmlinuz-4.19.5-1-default vmlinuz
    Now I just need to find where a script can be placed so it runs when a kernel gets installed, manually creating the symlinks until then...
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB,
    HD: OCZ VERTEX460 480GB SSD, 2 Toshiba 2TB SATA drives configured RAID 0, Sound Blaster Audigy Series

  7. #17
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    808

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    I've been using *SUSE for far more than a decade than I can remember. I've never seen a new kernel installation not produce symlinks vmlinuz and initrd for the newest kernel and initrd.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2) & 42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,others on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,GT218 &&&&

  8. #18
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    526

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    Quote Originally Posted by Cavsfan View Post
    I have an UEFI system with a custom grub that currently boots Arch Linux, Windows 10 and openSUSE Tumbleweed.
    ...
    I hope that I have presented this in a way that is easily understandable. If you have any questions let me know.
    I converted all my systems to gpt/efi some time ago. Grub2 does pretty with all OSs installed on the machines:

    Code:
    openSUSE Tumbleweed
    Erweiterte Optionen für openSUSE Tumbleweed
        openSUSE Tumbleweed, mit Linux 4.19.5-1-default
        openSUSE Tumbleweed, mit Linux 4.19.4-1-default
    
    Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)
    Erweiterte Optionen für Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)
       Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)
       Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)
    
    openSUSE Tumbleweed (auf /dev/sda3)
    Erweiterte Optionen für openSUSE Tumbleweed (auf /dev/sda3)
       openSUSE Tumbleweed (auf /dev/sda3)
       openSUSE Tumbleweed, mit Linux 4.14.5-1-default (auf /dev/sda3)
       openSUSE Tumbleweed, mit Linux 4.4.79-19-default (auf /dev/sda3)
    
    Ubuntu 18.04.1 LTS (18.04) (auf /dev/sdb2)
    Erweiterte Optionen für Ubuntu 18.04.1 LTS (18.04) (auf /dev/sdb2)
       Ubuntu (auf /dev/sdb2)
       Ubuntu, mit Linux 4.15.0-36-generic (auf /dev/sdb2)
       Ubuntu, mit Linux 4.15.0-36-generic (recovery mode) (auf /dev/sdb2)
       Ubuntu, mit Linux 4.15.0-29-generic (auf /dev/sdb2)
       Ubuntu, mit Linux 4.15.0-29-generic (recovery mode) (auf /dev/sdb2)
    
    openSUSE Tumbleweed (auf /dev/sdb3)
    Erweiterte Optionen für openSUSE Tumbleweed (auf /dev/sdb3)
       openSUSE Tumbleweed (auf /dev/sdb3)
       openSUSE Tumbleweed, with Linux 4.19.1-1-default (auf /dev/sdb3)
       openSUSE Tumbleweed, with Linux 4.18.15-1-default (auf /dev/sdb3)
    No tweaks necessary. Am I missing something?
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  9. #19
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    808

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    English please.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2) & 42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,others on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,GT218 &&&&

  10. #20
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    526

    Default Re: How to have a custom UEFI grub menu for a multiboot system

    Quote Originally Posted by mrmazda View Post
    English please.
    The above is output from:

    grep menuentry /boot/grub2/grub.cfg |cut -d \' -f 2
    Erweitert = Advanced
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •