Skip to content

Add support for UEFI installations #53

Merged
merged 7 commits into from
Sep 7, 2018

Commits on Sep 6, 2018

  1. Configuration menu
    Copy the full SHA
    86b1955 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d037f92 View commit details
    Browse the repository at this point in the history
  3. mxgrub: Support UEFI systems

    Instead of always mounting the EFI System Partition (ESP), only mount it
    when checking if GRUB is installed.
    
    The mount point `/boot/efi` was created on the distmaster.
    pmenzel committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    befaa50 View commit details
    Browse the repository at this point in the history
  4. mxgrub: Output if GRUB is already installed

    As that’s the common case, maybe it’s just spam, and should be a verbose
    option.
    pmenzel committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    2e45634 View commit details
    Browse the repository at this point in the history
  5. mxgrub: Always install GRUB in MBR

    Contradicting the documentation, that `i386-pc` is the default target,
    on UEFI systems it is not.
    
        $ sudo grub-install --boot-directory=/boot /dev/nvme0n1
        Installing for x86_64-efi platform.
        grub-install: error: cannot find EFI directory.
    
    So, pass `--target=i386-pc` to install GRUB in the MBR.
    
        $ sudo grub-install --target=i386-pc --boot-directory=/boot /dev/nvme0n1
        Installing for i386-pc platform.
        Installation finished. No error reported.
    pmenzel committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    3c6c695 View commit details
    Browse the repository at this point in the history
  6. mxgrub: Add switch no-nvram to grub-install for UEFI

    In case a drive with an EFI System Partition (ESP) is put into a system
    that boots in legacy mode, running `grub-install --target=x86_64-efi`
    will fail, as `efibootmgr` fails to update the NVRAM. Therefore, pass
    `--no-nvram` to `grub-install`, which skip running efibootmgr.
    
        --no-nvram             don't update the `boot-device'/`Boot*' NVRAM
                               variables. This option is only available on EFI
                               and IEEE1275 targets.
    
    As a downside, the administrator needs to go int the firmware menu, and add the
    entry in the boot manager manually.
    pmenzel committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    f1ad4d3 View commit details
    Browse the repository at this point in the history
  7. mxgrub/mxgrub: Insert module *all_video*

    With a system booted from UEFI, starting the Linux kernel from GRUB,
    GRUB outputs
    
        error: not suitable video mode found
        booting in blind mode
    
    and no Linux messages can be seen.
    
    Jordan_U’s answer from #grub@irc.freenode.net:
    
    > Are you using a manually written grub.cfg or one made by
    > grub-mkconfig?
    >
    > If the former, add "insmod all_video" to your grub.cfg. That will
    > allow grub to set up a video mode to then pass on to linux. IIRC, the
    > text mode for UEFI is only intended for use by bootloaders, and thus
    > should not be used by linux. I think that means that if grub doesn't
    > pass a video mode to linux (which it needs video modules to be able to
    > do) then you won't get early printk from the kernel, messages will
    > only be displayed once native graphics drivers and KMS kicks in.
    pmenzel committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    e78c67f View commit details
    Browse the repository at this point in the history