Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 64

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

  1. #41
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,161
    Blog Entries
    3

    Default Re: Drive Partition Rules (Windows Boot)

    Quote Originally Posted by karlmistelberger View Post
    Note For Advanced Format 4K Native drives (4-KB-per-sector) drives, the minimum size is 260 MB, due to a limitation of the FAT32 file format. The minimum partition size of FAT32 drives is calculated as sector size (4KB) x 65527 = 256 MB.
    Thanks for quoting this.

    The openSUSE partitioner might be using this when it tries to insist on a 256M minumum size for the EFI partition.

    Advanced Format 512e drives are not affected by this limitation, because their emulated sector size is 512 bytes. 512 bytes x 65527 = 32 MB, which is less than the 100 MB minimum size for this partition.
    Maybe they missed this part.
    openSUSE Leap 15.1; KDE Plasma 5;

  2. #42
    Join Date
    Jul 2018
    Location
    US
    Posts
    71

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

    Quote Originally Posted by mrmazda View Post
    I haven't installed Windows first in nearly two decades, and that was probably a Windows-only installation. While it's perfectly reasonable to install Windows first, with proper understanding and planning, there's absolutely no compulsion to adhere to this too popular fairy tale of need. Strictly adhering to such logic, all operating systems would need reinstallation following each Windows reinstallation.

    260M is perfectly reasonable, probably the ideal recommendation for size on a virgin or freshly wiped disk.

    Utter nonsense....

    I have two UEFI systems with 6 or more installed operating systems. One has 6, with ESP partition using a mere 19M, which would be only 19% of a 100M partition. The other has 9, using 22M on ESP, which is probably about twice as much as needed due to in place backups/archives.

    There do exist circumstances that dictate a minimum ESP partition size of 260M. That is in the AFAIK as yet unsupported configuration of ESP partition living on a device with 4k logical sector size as well as physical sector size. Anyone else would be very hard pressed to install, much less maintain, enough operating systems to exhaust a 100M ESP partition's freespace.

    Those installers that claim that 100M or 128M is inadequate for ESP are quite simply broken.
    You are the only person, in my 10 years of Linux experience, that I have ever heard say that windows does not have to be installed first. I have never in my life had to re-install Windows, so I'm not worried about that.
    I am not doubting that it can be done I'm doubting why anyone would want/need to do that.

    I did not calculate the space each installation would take up, I just did not want to run out of room because once that partition is installed, it is not possible to increase it's size.
    Nor do I know how many systems I want to install on this drive; I left open the possibility that I could install a whole bunch more that the 4 I have at present, since efi does not limit partitions to 4 like the legacy/MBR system did.

    Is half a GB going to impair the space on your the drive? I doubt it. I think this is just water under the bridge. I am currently using 120MB but, have ran out of room before trying to re-install grub to another partition.
    Like I said it was just dump files that caused it. You said you use a grub version that is "0.97-203.7 or older". I prefer to use and contribute to the new grub 2.0.
    I opened a bug in openSUSE the Arch Linux menuentry not adding the 2nd img to the
    initrd /intel-ucode.img /initramfs-linux.img and that was fixed. That makes 1 non-Arch Linux distribution that correctly boots Arch without modification.

    Why does so much animosity need to creep into this thread? It is supposed to be about "
    How to have a custom UEFI grub menu for a multiboot system" using my method of using UUIDs that works every single time.
    It's not about opinions of what I did wrong. Or that I am a fool for making such a "huge" efi partition.

    Let's stick to the title of the thread please...

    I tried using config files and using labels in grub but, that did not work for me. What did work every time on every distribution I've ever used is using UUIDs like in the 1st post.

    I have used that on all of the Linux systems listed in my signature and they all work during every boot, better than using the default grub.

    When I install a system I have to get that /etc/grub.d/06_custom file in place so I can get to my other systems.
    Because trying and failing on the several options to boot into another system besides the one I just installed is futile and a huge waste of time.

    While I admit that it is a hassle setting it up initially, it is nothing compared to other things Linux.

    I spent a week and a half resizing several conkys from a 1440p monitor to a 2160p monitor and trust me I'd take the grub hassle any day of the week.

    Here it is if you want a look: https://imgur.com/4jAmXGy
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series, HD: Western Digital 1TB SSD, OCZ 500GB SSD, 2 Toshiba 2TB SATA HD

  3. #43
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,580

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

    Since EFI the install order is much less important. In the past using MBR booting Windows tended to take over the MBR and thus the boot. Even then you could reinstall grub to rest control back from Windows. Today this is not a problem since the UEFI manages the boot. Note as a general rule the last OS installed sets the UFI to boot to itself. But you can always change that or use the UEFI boot menu to choose OS

    As to EFI boot size the files used by each OS are actually rather small so you can easily install many OS and the 250Meg size is a special consideration for certain drive configuration. And is just a warning in the Installer not a requirement. Note if you install many OS and remove you may end up leaving trash behind in the EFI boot that should be cleaned up and also the UEFI flash should be cleaned of any removed OS.entries. In fact you may run into UEFI flash space problems before running int space problems in the EFI boot. At the moment I know of no program that will clean things up for you

  4. #44
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,469

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

    Quote Originally Posted by gogalthorp View Post
    In the past using MBR booting Windows tended to take over the MBR and thus the boot.
    This overwhelming tendency is indeed historically true, and continues in the declining context of MBR multiboot. It is a result of Linux installers doing the same thing Windows installers did, and with MBR still do, usurping the the existing boot code without asking permission. That Linux installers have applied replacement code has in most cases been entirely unnecessary. In most cases, Linux installation could have placed the bootloader on a primary partition, leaving the existing MBR code intact, in what may be termed neutral.

    Even then you could reinstall grub to rest [sic] control back from Windows.
    With a neutral boot configuration, getting control back from Windows is a very much simpler process of changing the MBR's boot flag, a process that can readily be performed from within Windows as well as without.
    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,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  5. #45
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,469

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

    Quote Originally Posted by Cavsfan View Post
    You are the only person, in my 10 years of Linux experience, that I have ever heard say that windows does not have to be installed first.
    I've been multibooting over 25 years. My problem is with the assertion of need rather than option. It cannot be installed first in a reinstallation situation (after it was first installed, followed by installing something else).

    I have never in my life had to re-install Windows, so I'm not worried about that.
    Is this a mere narrative, or a HOWTO? The thread topic starts with the words:
    How to
    I and I'm sure others took and take it to mean intent to well instruct others as a HOWTO, with hope that it will ultimately be recognized by the admins as worthy of removal to FAQ status and more ready discovery by any searching for such.

    Why does so much animosity need to creep into this thread?
    I am sorry you see animosity. None is intended. Intended is only to make for a better HOWTO, especially by exposing any complicating implied or express assertion of necessity, as in "will want", as the myth that necessity is.

    It is supposed to be about "[/COLOR]How to have a custom UEFI grub menu for a multiboot system" using my method of using UUIDs that works every single time.
    Of course.

    It's not about opinions of what I did wrong. Or that I am a fool for making such a "huge" efi partition.
    Best to state the facts as facts rather than opinion as fact. Subjectivity should be made clear in a HOWTO context.

    Let's stick to the title of the thread please...
    With emphasis on how to.

    Here it is if you want a look: https://imgur.com/4jAmXGy
    Please use susepaste, either via web or cli, or present as I do, on my own openSUSE/Apache server. imgur.com does not work for everyone, including me.
    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,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  6. #46
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,161
    Blog Entries
    3

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

    Quote Originally Posted by mrmazda View Post
    It is a result of Linux installers doing the same thing Windows installers did, and with MBR still do, usurping the the existing boot code without asking permission. That Linux installers have applied replacement code has in most cases been entirely unnecessary. In most cases, Linux installation could have placed the bootloader on a primary partition, leaving the existing MBR code intact, in what may be termed neutral.
    I normally install boot code on a partition, rather than in the MBR. And openSUSE is one of the few distros that still allow this.

    I think we are drifting off-topic (from the original UEFI question).
    openSUSE Leap 15.1; KDE Plasma 5;

  7. #47
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    813

    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.
    There is a bug open because openSUSE (and every other Linux system) does not correctly add the 2nd part of the Arch Linux initrd line. So, if you have Arch and do not want to edit that line every time you boot into Arch, this is the answer.
    It is totally maintenance free; it does not need any updating when a new kernel is installed, it just always works. The only time you would ever need to touch this file is if you added/removed an OS, or if a UUID changed.
    I tried installing Debian Testing on this system about 4 times and each time it would change the swap UUID causing major problems with all of my other systems. Needless to say I dropped that quest.
    Just a few thoughts:

    I doubt that your solution is indeed maintenance free in the long term.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  8. #48
    Join Date
    Jul 2018
    Location
    US
    Posts
    71

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

    Quote Originally Posted by karlmistelberger View Post
    I doubt that your solution is indeed maintenance free in the long term.
    The 06_custom file is taken from the 40_custom file as follows and is saved as 06_custom so that it appears at the top of the grub menu:
    The +3 is changed to +4 so that execution begins at the 4th line down instead of the 3rd and lets you list the operating systems in the output of grub-mkconfig.
    Code:
    #!/bin/sh
    echo 1>&2 "Adding blah, blah, blah, and blah blah blah"
    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.
    And yes it absolutely is "maintenance free" once you set it; it's done.
    If you change a UUID for anything, then it's up to you to update the 06_custom file.

    Just like it's up to you to change the file if you add or remove an operating system.

    But, other than what you do to your system it is totally maintenance free.
    If you do not do any of the above, you never have to touch anything and your system will multi boot systems much better than without it.
    If you have one Linux system, this is not worth your time but, if you have Windows 10 and several Linux systems it is well worth the effort.

    All these systems symlink the kernels to the initrd and vmlinuz so they need no modification when a new kernel gets installed, which is the primary purpose I did this in the first place.

    That is all except one - Fedora does not use or create symlinks for it's kernels. However, I created a script that does that for you.

    I re-installed Fedora 29 not too long ago and my grub moved to Fedora but, since this is openSUSE I will not post any of that as it would be off topic if I haven't already.
    But, here is my list of partitions and openSUSE TW custom grub file and besides changing the UUID for Fedora when I re-installed it, nothing and I mean nothing has changed on it:
    Code:
    /dev/sdc1: UUID="688D-126B" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="3c1b6d6f-8a24-43da-b595-8c304ceee48d"
    /dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="49992d5b-79cd-4934-a12f-11782bb345bd"
    /dev/sdc3: LABEL="C:" UUID="C4968A52968A44C0" TYPE="ntfs" PARTLABEL="Windows_10" PARTUUID="345c85f4-bce7-4bc7-bbe0-db03eb319cad"
    /dev/sdc4: UUID="bbc771f8-ba61-4e50-aeca-d2754b112aee" TYPE="swap" PARTLABEL="swap" PARTUUID="c39d976b-91cd-4d59-a270-91398b764d3f"
    /dev/sdc5: LABEL="ArchLinux" UUID="bbca28b2-503e-4dc8-9850-c54bd0492da8" TYPE="ext4" PARTLABEL="Arch_Linux" PARTUUID="5312b771-0835-4957-80a6-9a8a7107f24a"
    /dev/sdc6: LABEL="Media" UUID="840ac879-510a-4b8d-be01-9d3a5f37dbb2" TYPE="ext4" PARTLABEL="Media" PARTUUID="61e2e7f9-1a98-44f7-881e-ae85fceaf994"
    /dev/sdc7: LABEL="openSUSE" UUID="545d0f15-9570-44ee-8404-9885bdc38dfc" TYPE="ext4" PARTLABEL="openSUSE" PARTUUID="6c7b8cd9-4350-4600-8e9e-ff1eb2933c9f"
    /dev/sdc8: LABEL="Fedora" UUID="1216e907-e6c7-4791-841d-a2d2d7a4dcfc" TYPE="ext4" PARTLABEL="Fedora" PARTUUID="887a3d2f-73ed-4894-b566-3e37294757e7"
    /dev/sdc9: LABEL="Bionic" UUID="833501fb-4f83-4d51-9903-685d56cb6891" TYPE="ext4" PARTLABEL="Bionic" PARTUUID="2edba524-105d-40b4-9242-530ca362a32a"
    Code:
    #!/bin/sh
    echo 1>&2 "Adding Arch Linux, Fedora (Workstation), openSUSE Tumbleweed, Xubuntu (18.04) 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' --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) 29' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-advanced-2327668d-fb7f-4e44-9462-cd72af7a2873' {
        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
        linux  /boot/vmlinuz root=UUID=2327668d-fb7f-4e44-9462-cd72af7a2873 ro resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet nouveau.modeset=0 
        initrd /boot/initrd.img
    }
    menuentry 'openSUSE Tumbleweed'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-545d0f15-9570-44ee-8404-9885bdc38dfc' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt7'
        search --no-floppy --fs-uuid --set=root 545d0f15-9570-44ee-8404-9885bdc38dfc
        linux /boot/vmlinuz root=UUID=545d0f15-9570-44ee-8404-9885bdc38dfc  splash=silent resume=/dev/disk/by-uuid/bbc771f8-ba61-4e50-aeca-d2754b112aee quiet
        initrd /boot/initrd
    }
    menuentry 'Xubuntu (18.04) LTS' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-833501fb-4f83-4d51-9903-685d56cb6891' {
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt9'
        search --no-floppy --fs-uuid --set=root 833501fb-4f83-4d51-9903-685d56cb6891
        linux /vmlinuz root=UUID=833501fb-4f83-4d51-9903-685d56cb6891 ro quiet resume=/dev/disk/by-uuid/bbc771f8-ba61-4e50-aeca-d2754b112aee splash $vt_handoff
        initrd /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
    }
    I maintain a Wiki for Ubuntu on how to do this with Legacy/MBR partitioned drives and haven't needed to make a change to it in at least 3 years.
    It is used, I've been told my many people. If you google "how to have a custom grub" it will be near the top.

    Not intending to brag, just state a fact. While I have to dispel your statement that it is not maintenance free in the long term, I'm certain that it is indeed just that.
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series, HD: Western Digital 1TB SSD, OCZ 500GB SSD, 2 Toshiba 2TB SATA HD

  9. #49
    Join Date
    Jul 2018
    Location
    US
    Posts
    71

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

    Quote Originally Posted by mrmazda View Post
    Please use susepaste, either via web or cli, or present as I do, on my own openSUSE/Apache server. imgur.com does not work for everyone, including me.
    I'll try https://paste.opensuse.org the next time if I post a picture. Never used it before. I thought everyone could see imgur so thanks for pointing that out.

    I've had a neurological condition for the past 17 years taking a lot of meds, so I'm trying to answer the most important items. Forgive me if I left something out. I do as best as I can with what I have.

    Cheers
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series, HD: Western Digital 1TB SSD, OCZ 500GB SSD, 2 Toshiba 2TB SATA HD

  10. #50
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,469

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

    Quote Originally Posted by Cavsfan View Post
    I'll try https://paste.opensuse.org the next time if I post a picture. Never used it before. I thought everyone could see imgur so thanks for pointing that out.
    You are welcome!

    I've had a neurological condition for the past 17 years taking a lot of meds, so I'm trying to answer the most important items. Forgive me if I left something out. I do as best as I can with what I have.
    Again, no problem. I too have health issues that interfere with productivity & efficiency. Interruptions cause an obscene amount of wasted time and delay here.
    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,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

Page 5 of 7 FirstFirst ... 34567 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
  •