Announcement

Collapse
No announcement yet.

Dual-booting multiple [K]Ubuntu OSs

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dual-booting multiple [K]Ubuntu OSs

    New material for UEFI for Kubuntu--simplified. And ... some dual-booting tips for Kubuntu.
    See:
    https://www.kubuntuforums.net/showth...889#post375889

    --no-uefi-secure-boot parameter

    It seems to work very well in my tests for Kubuntu and Mint, with my ASUS firmware.

    It is one solution to the problem of having only one standard directory for Ubuntu derivative OSs in the /EFI/ directory of the ESP in a UEFI-boot setup. Thus, for example, you could set up a nice, clear multi-boot with Kubuntu 14.04, Kubuntu 15.04, and Mint KDE 17.1, and each would have its own EFI boot subdirectory in the ESP under /boot/efi/EFI.

    Credit for finding the "--no-uefi-secure-boot" parameter goes to

    lxgr's blog
    Booting multiple Ubuntu versions with EFI
    http://blog.lxgr.net/posts/2015/04/30/grub-efi-multiboot/
    as explained in the text of my how-to.


    Interestingly, I can find no other reference to the special grub-install parameter other than lxgr's. If you can find one, please post it.

    Thus, in particular, this extends the general grub-install command to this form, so far, as covered in my how-to:

    Code:
      [COLOR=#000000]sudo grub-install --target=x86_64-efi --efi-directory=[U]DIR[/U] --bootloader-id=some_name --no-nvram --no-uefi-secure-boot[/COLOR]
    And lxgr mentions another parameter:

    There is also an option --removable which supposedly sets up the EFI directory on a removable device, which looks a bit different than for internal devices and importantly doesn't create an NVRAM entry (which wouldn't be available on different machines anyway). You might be able to use that to boot from an internal disk too, but I have not tried that approach, however.
    I don't know whether Rod Smith has seen this yet. In his posts about dual-booting Ubuntu's, I haven't seen him mention it. I sent him an email referencing lxgr and my how-to at kubuntuforums.net.
    Last edited by Qqmike; Jul 09, 2015, 05:28 PM.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    #2
    Misspelled "multiple" in the title. Shucks. Is it possible to edit titles? Tired, up since 3 am ...
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Yes. Edit Post, then click Go Advanced.
      Using Kubuntu Linux since March 23, 2007
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Thanks. Looks like you fixed it for me!
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Originally posted by Qqmike View Post
          And lxgr mentions another parameter:
          There is also an option --removable which supposedly sets up the EFI directory on a removable device, which looks a bit different than for internal devices and importantly doesn't create an NVRAM entry (which wouldn't be available on different machines anyway). You might be able to use that to boot from an internal disk too, but I have not tried that approach, however.
          This procedure places an appropriate boot loader in \EFI\BOOT. To use it, you have to interrupt the computer's boot process and select the removable media from the menu. This is necessary because no NVRAM variable is present that points to the boot loader. I would imagine that the boot manager doesn't really care whether the media is actually removable.

          Comment


            #6
            Re OP,

            I exchanged some comments with Rod Smith this afternoon about all this, and got his permission to post his comments, which I think S-R will understand better than I do as I have no hands-on experience with signing/keys. This may be of use to someone wanting to delve more deeply into this matter, and so I think posting it may be useful, if not immediately, maybe later as more people get into this.

            This is all about dual-booting two or more (K)Ubuntu-family distros, in line with the lxgr blog.

            Thanks for the reference. Unfortunately, the
            author has missed a subtle feature of EFI that should lead to a (probably)
            easy solution. As you already know about rEFInd, you might also know
            that there's another easy solution involving it. Of course, "easy"
            and "obvious" are two entirely different things, and neither solution is
            obvious unless you know about it! I tried to post a comment to his blog, but I
            don't think it took. I don't see an e-mail address or any other way to
            contact the author, which is frustrating. If you know how, I'm
            attaching my comments to this e-mail so you can forward them to him.

            <which uses the grub-install option --no-uefi-secure-boot. etc.>

            Prior to Secure Boot, GRUB binaries were built
            in a customized way for each system. That won't work with Secure Boot,
            which requires that any binary be signed by an outside authority (given
            the way it's commonly used, anyhow). Thus, with Secure Boot active,
            GRUB looks for its configuration file in a single location, as
            described on the blog. This option probably just reverts to the
            pre-Secure-Boot way of doing things, although I haven't checked this in detail. Of
            course, this means the resulting binary won't work with Secure Boot
            active UNLESS you sign it yourself and add your signing key to the MOK
            list. (There are other ways it would work, too, like replacing Microsoft's
            keys with your own or using hashes with PreLoader rather than keys
            with Shim.)
            and

            You SHOULD be able to use multiple ESPs on one
            disk. By adjusting type codes (ESPs are EF00 in gdisk and have their
            "boot flags" set in parted and GParted; juggle as
            necessary), you SHOULD be able to install two Ubuntus on one disk
            with multiple ESPs. I've not tried that, though, so I can't guarantee
            it will work. As the developer of rEFInd, my preferred solution is to
            install rEFInd and EFI filesystem driver(s) for whatever
            filesystem(s) hold my kernels. (Do this after installing the first
            Ubuntu instance.) I then install multiple Ubuntus by booting the
            installer in "try before installing" mode and typing
            "ubiquity -b" in a Terminal. Ubuntu will then install
            WITHOUT GRUB and rEFInd will enable selecting whichever installation
            you like. One important tip, though: Give your Ubuntu partitions
            (root or /boot, whichever holds the kernel) distinctive names so
            that you can easily identify them in the Ubuntu menu. (You can give
            the partitions names in gdisk, or give the filesystems names with
            tune2fs or similar filesystem-level tools.) If you want to get fancy,
            you can set them up with unique icons, as described in the rEFInd
            documentation. As a side benefit, you work around the bug that causes
            GRUB to be unable to chainload Windows with Secure Boot enabled
            (https://bugs.launchpad.net/ubuntu/
            +source/grub2/+bug/1091464),
            which means you needn't deal with hitting a function key in the
            narrow window needed to launch the firmware's own built-in boot
            manager.
            One solution with rEFInd is obvious (to me, anyway): Just go ahead and install your K(U)buntu OSs the way you want, anywhere. rEFInd will locate their kernel files--vmlinuz's--show them to you in an EFI boot menu, and boot them for you without GRUB simply by the stub-loader method. And there may be other creative solutions as well, but I'm too tired to think about it at the moment.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              I fixed the first link in Post 1.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment

              Working...
              X