Page 55 of 58 FirstFirst ... 5455354555657 ... LastLast
Results 541 to 550 of 580

Thread: How to have a custom Grub2 menu that is maintenance free

  1. #541
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    In Fedora and MX Linux, it does not create symlinks for the vmlinuz and initrd like most Linux systems.

    But, I created a script that will create them after the kernel is installed. If anyone wants to know how it works, I gots it.

  2. #542
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    I have 4 drives in this computer.


    1. dev/sda - TOSHIBA 2TB HDD
    2. dev/sdb - TOSHIBA 2TB HDD
    3. dev/sdc - WD Blue 1TB SSD
    4. dev/sdd - OCZ Vertex 480GB SSD


    The 2nd TOSHIBA apparently is bad because it prevented it from booting when connected.
    So, I disconnected it and sdc became sdb but, my custom grub didn't skip a beat because it is tied to UUIDs and not drives.

    I believe if I were using default grub, it would have needed some adjustments. Another reason to use a custom grub.

  3. #543
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    Anyone multi-booting with Fedora 30, I finally figured out how to produce the kernel symlinks with this script: (the one I was using in Fedora 28,29 didn't work in 30)
    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
    Save it as 52-symlink-kernel and if it's in your home directory, you would first make it executable sudo chmod +x 52-symlink-kernel
    Then to install it you would use this command:
    Code:
    sudo install 52-symlink-kernel /etc/kernel/postinst.d/52-symlink-kernel
    Then in the terminal output of a new kernel installation you will see the SUCCESS lines. You can check in /boot with ls -lA and verify that they are symlinked correctly.

    Cheers

  4. #544
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    Custom grub on Fedora 31. No background, colors or fonts; just a custom menu:



    The script above that works in 30 also works in 31 to create the kernel symlinks.

  5. #545
    Join Date
    May 2007
    Location
    albuquerque
    Beans
    581
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: How to have a custom Grub2 menu that is maintenance free

    From the linked page:

    Although it says not to, you will need to change
    exec tail -n +3 $0 to
    exec tail -n +4 $0
    Why?

  6. #546
    Join Date
    May 2007
    Location
    albuquerque
    Beans
    581
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: How to have a custom Grub2 menu that is maintenance free

    Oh, and thanks very much for all the work on that "MaintenanceFreeCustomGrub2Screen" page, and this thread -- it's all been a big help to me. I've done lots of maintenance-free grub setups in the past, dual-booting or multi-booting. I used these valuable resources most recently to set up a maintenance-free grub for dual-booting two Debian Buster systems.

  7. #547
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by malspa View Post
    From the linked page:

    Although it says not to, you will need to change
    exec tail -n +3 $0 to
    exec tail -n +4 $0
    Why?
    (1)#!/bin/sh
    (2)echo 1>&2 "Adding Bionic Beaver 18.04 LTS, Ubuntu Version name nn.nn and Windows 10"
    (3)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.


    The reason to change it to 4 is so it starts execution on the 4th line, the menuentry line if you add the echo line to get some output when you enter update-grub.

    If you do not include the echo line, the first menuentry line is the the 3rd line and you would leave it +3.

    Quote Originally Posted by malspa View Post
    Oh, and thanks very much for all the work on that "MaintenanceFreeCustomGrub2Screen" page, and this thread -- it's all been a big help to me. I've done lots of maintenance-free grub setups in the past, dual-booting or multi-booting. I used these valuable resources most recently to set up a maintenance-free grub for dual-booting two Debian Buster systems.
    Thank you for the kind words!

  8. #548
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by malspa View Post
    From the linked page:

    Although it says not to, you will need to change
    exec tail -n +3 $0 to
    exec tail -n +4 $0
    Why?
    This is my current 06_custom file - (/etc/grub.d/06_custom):
    Code:
    #!/bin/sh
    echo 1>&2 "Adding Arch Linux (rolling), Debian Buster, Debian Testing, Fedora 30 (Thirty), Fedora 31 (Thirty One), openSUSE Tumbleweed (rolling), MX Linux 18.3 Continuum, MX Linux 19 (Antix kernel) Patito Feo, MX Linux 19 Patito Feo, Xubuntu 18.04.3 Bionic Beaver LTS 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' {
        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)' {
        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 'Debian Buster' {
        search --no-floppy --fs-uuid --set=root dbbd22d7-0110-47d4-932b-2f19c83bcbca
        linux  /vmlinuz root=UUID=dbbd22d7-0110-47d4-932b-2f19c83bcbca ro quiet
        initrd /initrd.img
    }
    menuentry 'Debian Buster (recovery mode)' {
        search --no-floppy --fs-uuid --set=root dbbd22d7-0110-47d4-932b-2f19c83bcbca
        linux  /vmlinuz root=UUID=dbbd22d7-0110-47d4-932b-2f19c83bcbca ro recovery nomodeset
        initrd /initrd.img
    }
    menuentry 'Debian Testing' {
        search --no-floppy --fs-uuid --set=root 1b019591-4bf0-4781-bf86-fdc044ef8ae7
        linux  /vmlinuz root=UUID=1b019591-4bf0-4781-bf86-fdc044ef8ae7 ro quiet
        initrd /initrd.img
    }
    menuentry 'Debian Testing (recovery mode)' {
        search --no-floppy --fs-uuid --set=root 1b019591-4bf0-4781-bf86-fdc044ef8ae7
        linux  /vmlinuz root=UUID=1b019591-4bf0-4781-bf86-fdc044ef8ae7 ro recovery nomodeset
        initrd /initrd.img
    }
    menuentry 'Fedora 30 (Thirty)' {
        search --no-floppy --fs-uuid --set=root 43cd93b8-2442-42df-88a3-7bf069390d49
        linux  /boot/vmlinuz root=UUID=43cd93b8-2442-42df-88a3-7bf069390d49 ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 resume=UUID=b564ed75-b9ee-410f-9f87-04afc30a0ff4 rhgb quiet LANG=en_US.UTF-8
        initrd /boot/initrd.img
    }
    menuentry 'Fedora 31 (Thirty One)' {
        search --no-floppy --fs-uuid --set=root 3ba4cef1-ee4e-47a9-acd4-52bccb07a237
        linux  /boot/vmlinuz root=UUID=3ba4cef1-ee4e-47a9-acd4-52bccb07a237 ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 resume=UUID=b564ed75-b9ee-410f-9f87-04afc30a0ff4 rhgb quiet LANG=en_US.UTF-8
        initrd /boot/initrd.img
    }
    menuentry 'openSUSE Tumbleweed (rolling)' {
        search --no-floppy --fs-uuid --set=root 00bd1c4f-112a-493b-b956-63c414cb844a
        linux  /boot/vmlinuz root=UUID=00bd1c4f-112a-493b-b956-63c414cb844a splash=silent resume=/dev/disk/by-uuid/b564ed75-b9ee-410f-9f87-04afc30a0ff4 mitigations=auto quiet
        initrd /boot/initrd
    }
    menuentry 'MX Linux 18.3 Continuum' {
            search --no-floppy --fs-uuid --set=root e2a9be0a-6b63-40e9-9a3f-029b14c8403e
            linux  /boot/vmlinuz root=UUID=e2a9be0a-6b63-40e9-9a3f-029b14c8403e ro quiet splash
            initrd /boot/initrd
    }
    menuentry 'MX Linux 18.3 Continuum - Systemd' {
            search --no-floppy --fs-uuid --set=root e2a9be0a-6b63-40e9-9a3f-029b14c8403e
            linux  /boot/vmlinuz root=UUID=e2a9be0a-6b63-40e9-9a3f-029b14c8403e ro quiet splash init=/lib/systemd/systemd
            initrd /boot/initrd
    }
    menuentry 'MX Linux 19 (Antix kernel) Patito Feo' {
            search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
            linux  /boot/vmlinuz-antix root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash
            initrd /boot/initrd-antix.img
    }
    menuentry 'MX Linux 19 (Antix kernel) Patito Feo Systemd' {
            search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
            linux  /boot/vmlinuz-antix root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash init=/lib/systemd/systemd
            initrd /boot/initrd-antix.img
    }
    menuentry 'MX Linux 19 Patito Feo' {
            search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
            linux  /boot/vmlinuz root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash
            initrd /boot/initrd.img
    }
    menuentry 'MX Linux 19 Patito Feo Systemd' {
            search --no-floppy --fs-uuid --set=root 66eebc19-c3f8-4b17-b912-0c5099ca7ae4
            linux  /boot/vmlinuz root=UUID=66eebc19-c3f8-4b17-b912-0c5099ca7ae4 ro quiet splash init=/lib/systemd/systemd
            initrd /boot/initrd.img
    }
    menuentry 'Xubuntu 18.04.3 Bionic Beaver LTS' {
        search --no-floppy --fs-uuid --set=root 338e6d3b-cbd4-496d-9cc2-b688a90c17c3
        linux  /vmlinuz root=UUID=338e6d3b-cbd4-496d-9cc2-b688a90c17c3 ro quiet resume=/dev/disk/by-uuid/b564ed75-b9ee-410f-9f87-04afc30a0ff4 splash
        initrd /initrd.img
    }
    menuentry 'Xubuntu 18.04.3 Bionic Beaver LTS (recovery mode)' {
        search --no-floppy --fs-uuid --set=root 338e6d3b-cbd4-496d-9cc2-b688a90c17c3
        linux  /vmlinuz root=UUID=338e6d3b-cbd4-496d-9cc2-b688a90c17c3 ro recovery nomodeset
        initrd /initrd.img
    }
    menuentry 'Windows 10' {
        set root='hd2,gpt1'
        search --no-floppy --fs-uuid --set=root 688D-126B
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
    My partitions:
    Code:
    sudo blkid | grep sdc
    /dev/sdc1: UUID="688D-126B" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="15661847-bc65-401a-84b0-97a157f3949f"
    /dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="6b26da12-6fdc-4ce5-bde3-c990cdfc081b"
    /dev/sdc3: LABEL="C:" UUID="C4968A52968A44C0" TYPE="ntfs" PARTLABEL="Windows_10" PARTUUID="a76c4894-4d85-457e-8bc6-9d5308bef571"
    /dev/sdc4: UUID="9C9AE5269AE4FE20" TYPE="ntfs" PARTUUID="94858fd1-334c-47f7-bfab-266b49f0a0ba"
    /dev/sdc5: UUID="b564ed75-b9ee-410f-9f87-04afc30a0ff4" TYPE="swap" PARTLABEL="swap" PARTUUID="dc354366-1300-48d4-8a60-133aa2e2ca57"
    /dev/sdc6: LABEL="ArchLinux" UUID="bbca28b2-503e-4dc8-9850-c54bd0492da8" TYPE="ext4" PARTLABEL="Arch_Linux" PARTUUID="ea32dc7f-6d56-4a5c-b544-008abb8026e4"
    /dev/sdc7: LABEL="Media" UUID="840ac879-510a-4b8d-be01-9d3a5f37dbb2" TYPE="ext4" PARTLABEL="Media" PARTUUID="7af1d6dd-bfac-4c24-90ef-8da3d218898d"
    /dev/sdc8: LABEL="openSUSE" UUID="00bd1c4f-112a-493b-b956-63c414cb844a" TYPE="ext4" PARTLABEL="openSUSE" PARTUUID="dcaa5edb-0510-4bab-93e4-b238b329dbf7"
    /dev/sdc9: LABEL="Fedora" UUID="43cd93b8-2442-42df-88a3-7bf069390d49" TYPE="ext4" PARTLABEL="Fedora" PARTUUID="ee5e61eb-eab9-4794-aabe-a84a910fe9a0"
    /dev/sdc10: LABEL="Bionic" UUID="338e6d3b-cbd4-496d-9cc2-b688a90c17c3" TYPE="ext4" PARTLABEL="Bionic" PARTUUID="4f579967-b025-47dc-b080-64a0865d7165"
    /dev/sdc11: LABEL="rootMX18.3" UUID="e2a9be0a-6b63-40e9-9a3f-029b14c8403e" TYPE="ext4" PARTLABEL="mxlinux18" PARTUUID="e9eae6c4-f48a-4aa2-ba97-0ccadb7aa32f"
    /dev/sdc12: LABEL="Fedora31" UUID="3ba4cef1-ee4e-47a9-acd4-52bccb07a237" TYPE="ext4" PARTLABEL="Fedora31" PARTUUID="c76d0607-d89b-49b5-82fd-f0460ec47cfe"
    /dev/sdc13: LABEL="Debian-Buster" UUID="dbbd22d7-0110-47d4-932b-2f19c83bcbca" TYPE="ext4" PARTLABEL="Debian-Buster" PARTUUID="0e1cf947-9391-43d2-8d26-4384b98015a6"
    /dev/sdc14: LABEL="Debian-Testing" UUID="1b019591-4bf0-4781-bf86-fdc044ef8ae7" TYPE="ext4" PARTLABEL="Debian-Testing" PARTUUID="9b354d04-fd5e-48b3-a8f0-35cc873eb7e6"
    /dev/sdc15: LABEL="rootMX19" UUID="66eebc19-c3f8-4b17-b912-0c5099ca7ae4" TYPE="ext4" PARTLABEL="rootMX19" PARTUUID="ab7453e8-12b2-4530-9408-313bc9d8828f"
    Sort of like a puzzle to be setup once.

  9. #549
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    It took me awhile but, I finally figured out what most people probably already knew.

    When I customized Xubuntu 20.04 grub the menu would always never show, so rather than delving in to see what the problem was I had my grub on another system that didn't do that.

    Anyway, I err um, stumbled upon the fact that if I pressed the ESC key the menu would show. Figured out why that was in /etc/default/grub:
    Just needed to change this:
    Code:
    GRUB_TIMEOUT_STYLE=hidden
    to this:
    Code:
    GRUB_TIMEOUT_STYLE=menu
    Then everything worked like it should.

  10. #550
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    on Xubuntu 20.04:


Page 55 of 58 FirstFirst ... 5455354555657 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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