Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Ubuntu UEFI grub does not add Arch Linux correctly

  1. #11
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Ubuntu UEFI grub does not add Arch Linux correctly

    Quote Originally Posted by Dennis N View Post
    I agree. This is the only way I know to have a maintenance-free UEFI multiboot setup that includes Fedora. Works with other OS too. In particular, I also use it for Arch-based Manjaro. This was discussed extensively last year in this thread:
    https://ubuntuforums.org/showthread.php?t=2355551
    If you should have two Fedora installations, you can still make the custom menu totally maintenance-free by using two EFI system partitions!
    My own working entry:
    Code:
    #!/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.
    menuentry 'FEDORA 28            lvm - menu' {
    insmod part_gpt 
    insmod fat
    search --no-floppy --fs-uuid --set=root DE47-135A
    chainloader /EFI/fedora/shimx64.efi 
    }
    This method was proposed for multi-booting by J.A. Watson in his ZDNet columns:
    https://www.zdnet.com/blog/jamies-mostly-linux-stuff/
    In particular, see the Mar. 24,26,30, 2015 columns.
    Also Fedora does not generate a generic symlink for initrd and vmlinuz like every other Linux OS does just after a new kernel is installed.
    So, I created a script to run when a new kernel is installed. I'm running it manually now but, I am very close to getting it right.

    But, I've got some reading to do it looks like.

    Thanks for all of the input.

  2. #12
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Ubuntu UEFI grub does not add Arch Linux correctly

    I also had Sabayon Linux installed for a while and had the grub customized with the UUIDs but, I did not like it much. It failed the 2 .img entries for Arch test just like the rest.

    But, so much was missing it wasn't worth the effort to get it right. It's Gentoo-based as it uses Entropy (Equo, Rigo) / Emerge as package managers.

    I didn't even save anything on that partition, I just put Xubuntu 18.04 in it's place.

  3. #13
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    4,143

    Re: Ubuntu UEFI grub does not add Arch Linux correctly

    Quote Originally Posted by Cavsfan View Post
    Also Fedora does not generate a generic symlink for initrd and vmlinuz like every other Linux OS does just after a new kernel is installed.
    So, I created a script to run when a new kernel is installed. I'm running it manually now but, I am very close to getting it right...
    Symbolic link needed in Fedora? The chain loading in the quoted text would always boot the latest kernel without any symbolic link in Fedora since the newest kernel is always placed first in the Fedora grub menu. That's the advantage of doing it this way, and makes it maintenance free.

  4. #14
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Ubuntu UEFI grub does not add Arch Linux correctly

    Quote Originally Posted by Cavsfan View Post
    Also Fedora does not generate a generic symlink for initrd and vmlinuz like every other Linux OS does just after a new kernel is installed.
    So, I created a script to run when a new kernel is installed. I'm running it manually now but, I am very close to getting it right.
    Quote Originally Posted by Dennis N View Post
    Symbolic link needed in Fedora? The chain loading in the quoted text would always boot the latest kernel without any symbolic link in Fedora since the newest kernel is always placed first in the Fedora grub menu. That's the advantage of doing it this way, and makes it maintenance free.
    I got the script perfected a while ago, forgot to post it here. Adding this script to /etc/kernel/postinst.d/ also boots into the last installed kernel every time.
    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
    I just called it symlink-kernel in my home directory.
    You install the script with this command:
    Code:
    sudo install symlink-kernel /etc/kernel/postinst.d/symlink-kernel
    This is my Fedora grub menuentry in Xubuntu 18.04. I've got all of my systems customized because if grub is updated on another system, grub moves to that system.
    Arch Linux, Fedora 29, openSUSE TW and Xubuntu 18.04 LTS all have a working 06_custom file

    Code:
    menuentry 'Fedora 29 (Workstation)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-advanced-1216e907-e6c7-4791-841d-a2d2d7a4dcfc' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt8'
        search --no-floppy --fs-uuid --set=root 1216e907-e6c7-4791-841d-a2d2d7a4dcfc
        linux  /boot/vmlinuz root=UUID=1216e907-e6c7-4791-841d-a2d2d7a4dcfc ro resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet nouveau.modeset=0 LANG=en_US.UTF-8
        initrd /boot/initrd.img
    }
    Code:
    [cavsfan@fedora ~]$ sudo blkid | grep -e "Fedora" -e "swap"
    /dev/sdc4: UUID="bbc771f8-ba61-4e50-aeca-d2754b112aee" TYPE="swap" PARTLABEL="swap" PARTUUID="c39d976b-91cd-4d59-a270-91398b764d3f"
    /dev/sdc8: LABEL="Fedora" UUID="1216e907-e6c7-4791-841d-a2d2d7a4dcfc" TYPE="ext4" PARTLABEL="Fedora" PARTUUID="887a3d2f-73ed-4894-b566-3e37294757e7"
    I'm sure some of that is extraneous but, it works and I don't mind.

    There are many ways to skin a cat and I have the UUID method working to my satisfaction.

    If you did install the script, you would see something like this in the terminal output when a new kernel is installed:
    Code:
    Running scriptlet: kernel-core-4.20.6-200.fc29.x86_64                                                                                                                                                             169/169 
       SUCCESS: symlink initrd.img created for initramfs-4.20.6-200.fc29.x86_64.img
       SUCCESS: symlink vmlinuz created for vmlinuz-4.20.6-200.fc29.x86_64

Page 2 of 2 FirstFirst 12

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
  •