• Grub not working on a new Install

    After having bug 888 solved, I ran into a problem with Grub2.
    I’d like my laptop to do dual-boot.
    Because I know osprober does not recognize the Win10 installation, I have Grub installed on the 2nd HD.

    When I point the BIOS to start from there (Using F9 - Change Boot order), GRUB either hangs in printing ‘GRUB’ repeatedly or GRUB just shows ‘GRUB’ and the laptop immedialty reboots (and goes to default UEFI boot: Windows 10).

    I’d like (either or all)
    1: osprober to find my Windows 10 installation (at /dev/nvme0n1p1)
    2: GRUB2 to show the list of OS-es installed and be able to start those (at least Antergos at /dev/nvme0n1p6 or via /dev/sda4)

    If Windows could be probed, I might feel confident enough to replace the bootloader on /dev/nvme0n1.

    Here’s some system information:

    I’d like to install as free as possible with my partitions, so just a root (/) and a SWAP partition.
    Mounted 2 data partitions from sda (sda1 & sda3) to /media subfolders
    I tried with and without separate /boot partitions.
    I tried different flags on the partition (using gparted)

    And just to be sure the boot folder (or partition, whatever setup I was trying) did not miss anything, I did a complete reinstall of everything.

    How should I proceed?
    What am I doing wrong?

  • @herman-hofman

    this looks strange to me:

    /dev/nvme0n1p6 285309268 498098175 212788908 101.5G EFI System

    as the nvme hjas already a EFI system at the beginning… and EFI partition with 101,5G is not usefull… looks like partition is messed up in a way…

    I have Grub installed on the 2nd HD.

    what do you do here exactly? in EFI systems grub is not installed onto MBR of a HD it will be installed on the fat32 EFI boot partition, (you have 2 of them only one is needed… but o.k. if you do not want to mess up with the one windows is installing… )

    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Antergos-grub

    is used to install at the fat32 EFI partition mounted under /boot/efi …

    And there are 2 Antergos/Linux systems installed ? one on the nvme and other at /dev/sda ?

  • Thanks @joekamprad for the quick reply.

    All Windows (and EFI) systems are from the HP/Windows installation.
    I tried restoring Windows from the MS ISO, no such luck. Missing drivers and all.
    So that’s how HP partitioned the disk.

    Here’s (globally) the ‘original’ partition layout:
    p1: fat32 (should be EFI ?)
    p2: unknown
    p3: windows System
    p4: Windows recovery

    1: Data
    2: Recovery

    What I tried to do (probably made a thinking error there) is:

    • Split the nvme0n1p3 into a SWAP and Linux partition
    • Split the Data partition /dev/sda1 into a windows and a linux data partition.

    I’m willing to re-partition the drives, but because osprober does not recognize p1 as a Windows efi partition ( I did mount that when I tried a grub-install command on the chrooted system), I thought it wise to install the boot loader to /dev/sda.
    Problem with that is, with the default partitioning tools, grub-install complains about a multi-disk setup with /dev/sda not containing a bootable partition.
    I’d like to keep my Windows (and probably boot it once of twice a year… ;) )

    Hope this all still makes some sense to you.

  • The system in Question is a HP envy 17-ae120nd

  • @joekamprad said in Grub not working on a new Install:

    /dev/nvme0n1p6 285309268 498098175 212788908 101.5G EFI System

    Device             Start       End   Sectors   Size Type
    /dev/nvme0n1p1      2048    534527    532480   260M EFI System
    /dev/nvme0n1p2    534528    567295     32768    16M Microsoft reserved
    /dev/nvme0n1p3    567296 221274111 220706816 105.2G Microsoft basic data
    /dev/nvme0n1p4 498098176 500105215   2007040   980M Windows recovery environment
    /dev/nvme0n1p5 221274112 285309267  64035156  30.5G Linux filesystem
    /dev/nvme0n1p6 285309268 498098175 212788908 101.5G EFI System

    Looking at this there is also a //p6// with a 101G partion labeled as EFI…

    But as you say p5 is your Antergos root (/) and p6 should be then Antergos /home ??? i can not see any swap partiton there…

  • I’ve read the Arch version.
    Everything it says sound familier.

    I guess you wanted to show me the part of ‘Finding Windows 10 for Grub’?

    Just tried to sudo os-prober on the LIVE ISO.
    It found:

    /dev/nvme0n1p6:Antergos Linux:Antergos:linux
    /dev/sda2:Windows Recovery Environment:Windows:chain

    So not Windows on either p1 (EFI) or p3

    Do you think I should leave the sda alone and just be more confident with grub to use the HP/EFI partition correct?
    I guess the EFI flag is from me trying to repair what was broken during the install.

    p6 is the Antergos Linux root (/)
    p5 is the SWAP (I know, 30GB seems like overkill)

  • It is a known issue that on some systems Antergos installer do not get the Windows entry right, but mostly this can be solved by simple researching for it into installed Antergos after first boot.

    Make sure you have /dev/nvme0n1p1 mounted as ESP/EFI under /boot/efi inside advanced partition inside installer, so to make sure only mounted and not formatted!

    Then grub will write an entry inside this to get grub booted and the windows entry is untouched, but shouold be aviable as an entry.

    You can research for the windows entry after booting into Antergos:

    sudo grub-mkconfig -o /boot/grub/grub.cfg

    This will search with OS-Prober and rebuild the grub.cfg

  • Here is goes.
    I removed all Linux partitions, created new ones and allowed GRUB on the ssd.
    So there’s (from the cnchi.log)

    Antergos will install the bootloader grub2 in device /dev/nvme0n1
    Device /dev/sda1 will be , not relabeled, not formatted, mounted as /media/winData and not encrypted.
    Device /dev/sda3 will be created, relabeled, formatted, mounted as /media/lxData and not encrypted.
    Device /dev/nvme0n1p1 will be , not relabeled, not formatted, mounted as /boot/efi and not encrypted.
    Device /dev/nvme0n1p3 will be , not relabeled, not formatted, mounted as /media/Windows and not encrypted.
    Device /dev/nvme0n1p5 will be , not relabeled, not formatted, mounted as swap and not encrypted.
    Device /dev/nvme0n1p6 will be created, relabeled, formatted, mounted as / and not encrypted.

    Pray for the best.
    Still have the HP installation USB laying around, so…

  • @herman-hofman said in Grub not working on a new Install:

    Antergos will install the bootloader grub2 in device /dev/nvme0n1

    is advanced partition ask for /boot/efi to create? (under Mount Checklist)
    alt text

  • System was slow on shutdown/reboot.
    Booted to Windows (not grub2)
    Boot Option Menu shows:

    OS boot Manager (UEFI) - Windows Boot Manager (SAMSUNG MZVLW256HEHP-000H1)
    Boot From EFI File
    Notebbook Hard Drive - SAMSUNG MZVLW256HEHP-000H1
    Notebook Hard Drive - HGST HTS721010A9E630
    USB Hard Drive - SanDisk

    But! Choosing option 3 brings up GRUB.
    I have 3 systems found:

    • Antergos
    • Antergos Advanced
    • Windows recovery (on /dev/sda2)

    I removed nouveau from the system (bumblebee-for-nvidia-optimus : Disable_and_remove_Nouveau)

    Ran os-prober but no Windows found.

    I guess HP hid the UEFI boot inside the BIOS. Is that possible?
    If that is the case, we can not overwrite this bootloader?

    While I’m unable to set Antergos as the default OS, the current situation is workable.
    Thanks for pointing me in the right direction, @joekamprad

    Installing apps now.

  • It should be also possible to manuel get an entry for your windows install…
    @manuel may have a hint, as he was investigating in custom-grub entries a lot ;)

  • Yeah, I’m listening! :)

    You have 3 different EFI partitions, and only one is needed.

    On your two disks, what is the Windows partition and what is just data partition for Windows? Please explain all the Windows partitions in detail. Could you also show the contents if each EFI partition?

    Os-prober should easily recognize Windows, so the problem must be elsewhere.

    And as your machine clearly is meant for UEFI use, there is no need to write MBR to any disk.

  • @manuel

    After a reinstall of Antergos (with pointers from @joekamprad )
    fdisk -l

    dev              size     mount        remarks
    /dev/nvme0n1p1    260M    /boot/efi
    /dev/nvme0n1p2             --             unknown - not mounted
    /dev/nvme0n1p3  105.2G    /media/Windows  C:\
    /dev/nvme0n1p4    980M     --             recovery
    /dev/nvme0n1p5   30.5G    SWAP            SWAP
    /dev/nvme0n1p6  101.5G    /               Linux System
    /dev/sda1       468.7G    /media/winData  Data
    /dev/sda2        12.8G     --             Recovery
    /dev/sda3         450G    /media/lxData   Data

    Laptop boot is always Windows (so avoiding any bootloaders?)
    GRUB is available when I choose F9 - Choose Boot device Notebbook Hard Drive - SAMSUNG MZVLW256HEHP-000H1

    But os-prober cannot find Windows at p1 or p3.
    Here’s /boot

  • @herman-hofman
    Can you show the output of the following command:

    find /boot/efi -iname \*.efi -exec ls -l {} \;

    after having mounted /dev/nvme0n1p1 to /boot/efi ?

    The listing what you have about /boot does not show the important .efi files.

  • Sorry it took so lang…

    [[email protected] ~]$ df -h
    Bestandssysteem Grootte Gebruikt Besch Geb% Aangekoppeld op
    dev                7,8G        0  7,8G   0% /dev
    run                7,8G     1,4M  7,8G   1% /run
    /dev/nvme0n1p6     100G      12G   87G  13% /
    tmpfs              7,8G        0  7,8G   0% /dev/shm
    tmpfs              7,8G        0  7,8G   0% /sys/fs/cgroup
    tmpfs              7,8G     7,5M  7,8G   1% /tmp
    /dev/nvme0n1p1     256M      66M  191M  26% /boot/efi
    /dev/sda3          442G      73M  438G   1% /media/lxData
    /dev/nvme0n1p3     106G      52G   55G  49% /media/Windows
    /dev/sda1          469G     1,5G  468G   1% /media/winData
    tmpfs              1,6G      12K  1,6G   1% /run/user/1000
    [[email protected] ~]$ find /boot/efi -iname \*.efi -exec ls -l {} \;
    -rwxr-xr-x 1 root root  1250336 29 sep  2017 /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
    -rwxr-xr-x 1 root root  1236376 29 sep  2017 /boot/efi/EFI/Microsoft/Boot/bootmgr.efi
    -rwxr-xr-x 1 root root  1082264 29 sep  2017 /boot/efi/EFI/Microsoft/Boot/memtest.efi
    -rwxr-xr-x 1 root root  1250336 29 sep  2017 /boot/efi/EFI/Boot/bootx64.efi
    -rwxr-xr-x 1 root root   443904  5 sep  2017 /boot/efi/EFI/HP/SystemDiags/CryptRSA.efi
    -rwxr-xr-x 1 root root 15055912 29 sep  2017 /boot/efi/EFI/HP/SystemDiags/SystemDiags.efi
    -rwxr-xr-x 1 root root 15055896 29 sep  2017 /boot/efi/EFI/HP/SystemDiags/HpSysDiags.efi
    -rwxr-xr-x 1 root root   443904  5 sep  2017 /boot/efi/EFI/HP/BIOSUpdate/CryptRSA.efi
    -rwxr-xr-x 1 root root  1540680 29 sep  2017 /boot/efi/EFI/HP/BIOSUpdate/HpBiosUpdate.efi
    -rwxr-xr-x 1 root root  1540664 29 sep  2017 /boot/efi/EFI/HP/BIOSUpdate/HpBiosMgmt.efi
    [[email protected] ~]$ 
  • Windows 8/10 not found
    A setting in Windows 8/10 called “Hiberboot”, “Hybrid Boot” or “Fast Boot” can prevent the Windows partition from being mounted, so grub-mkconfig will not find a Windows install. Disabling Hiberboot in Windows will allow it to be added to the GRUB menu.

  • https://wiki.archlinux.org/index.php/GRUB#Windows_installed_in_UEFI.2FGPT_Mode_menu_entry

    Manual entry is also possible to get Windows booted out of Grub…

  • When a ntfs disk is flagged in use by hybernation, writing to the disk should not be possible, right?
    Found the setting here (for future reference)

    os-prober did not find Windows.

    sudo grub-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi found 441D-73A1
    sudo grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi found grub-probe: warning: unknown device type nvme0n1.
    According to these pages at reddit
    it might not be possible with GRUB?

    Not even this worked.
    Or maybe I did something wrong in /etc/grub.d/41_custom?

  • @herman-hofman
    Please explain what you did for files in /etc/grub.d, that may well cause issues if they are not correct. Unless you know exactly what you are doing, don’t modify files there.

    In the “find” listing there were no Antergos .efi files. Did you install them elsewhere, or what happened?

grub127 Posts 41Views 3059
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.