You are not logged in.

#1 2020-06-27 00:04:15

mrOmegamilkyman
Member
Registered: 2020-01-07
Posts: 4

[SOLVED] GRUB only seen with --removable flag, can't add Windows entry

When installing, I came across a similar problem to these two previous posts
EFI GRUB not auto-detected, but can be manually loaded.
"Reboot and Select proper Boot device" - UEFI Shell works fine

I have a MSI Z170A GAMING PRO CARBON as my motherboard similar to the second link, and once I tried to reboot after the install, the boot entries were missing. The only way to get to my setup was similar to the first link, maunaully finding it and booting to it. Anytime I would add a boot entry with efibootmgr or grub-install and grub-mkconfig, and then verify it with efibootmgr -v it would disappear once rebooted.

I was able to fix this with adding the --removeable flag in grub-install, but now I can't seem to figure out how to add Windows as either a grub entry or a boot entry. I'm also concerned that Windows might overwrite the other entry, so I'm wondering if there's anyway to preemptivly stop it.

For context, here is the output of some commands.

fdisk -l

[milky@art ~]$ sudo fdisk -l 
Disk /dev/nvme0n1: 465.78 GiB, 500107862016 bytes, 976773168 sectors 
Disk model: Samsung SSD 970 EVO 500GB 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: gpt 
Disk identifier: 54F74038-ACDA-E54E-A0DF-68F3BA20F81A 
Device             Start       End   Sectors   Size Type 
/dev/nvme0n1p1      2048    534527    532480   260M EFI System 
/dev/nvme0n1p2    534528  67643391  67108864    32G Linux swap 
/dev/nvme0n1p3  67643392 134752255  67108864    32G Linux root (x86-64) 
/dev/nvme0n1p4 134752256 976773134 842020879 401.5G Linux home 
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors 
Disk model: TOSHIBA DT01ACA1 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 4096 bytes 
I/O size (minimum/optimal): 4096 bytes / 4096 bytes 
Disklabel type: gpt 
Disk identifier: BAF4061A-5108-4B24-908F-160E82C42849 
Device     Start        End    Sectors   Size Type 
/dev/sda1   2048 1953523711 1953521664 931.5G Microsoft basic data 
Disk /dev/sdb: 223.58 GiB, 240057409536 bytes, 468862128 sectors 
Disk model: SanDisk SD8SBBU2 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: gpt 
Disk identifier: 7C79CBC0-8756-03AB-F072-1E9FD5E1EA00 
Device         Start       End   Sectors   Size Type 
/dev/sdb1       2048     34815     32768    16M Microsoft reserved 
/dev/sdb2      34816 467810288 467775473 223.1G Microsoft basic data 
/dev/sdb3  467810304 468858879   1048576   512M Windows recovery environment 

To summarize:
/dev/nvme0n1 - Linux Install
/dev/sda - Extra Windows space
/dev/sdb - Windows install

lsblk

[milky@art /]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931.5G  0 disk
└─sda1        8:1    0 931.5G  0 part
sdb           8:16   0 223.6G  0 disk
├─sdb1        8:17   0    16M  0 part
├─sdb2        8:18   0 223.1G  0 part
└─sdb3        8:19   0   512M  0 part
sdc           8:32   1  28.9G  0 disk
├─sdc1        8:33   1 515.9M  0 part
└─sdc2        8:34   1     4M  0 part
nvme0n1     259:0    0 465.8G  0 disk
├─nvme0n1p1 259:1    0   260M  0 part /boot
├─nvme0n1p2 259:2    0    32G  0 part [SWAP]
├─nvme0n1p3 259:3    0    32G  0 part /
└─nvme0n1p4 259:4    0 401.5G  0 part /home
[milky@art /]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931.5G  0 disk
└─sda1        8:1    0 931.5G  0 part
sdb           8:16   0 223.6G  0 disk
├─sdb1        8:17   0    16M  0 part
├─sdb2        8:18   0 223.1G  0 part
└─sdb3        8:19   0   512M  0 part
sdc           8:32   1  28.9G  0 disk
├─sdc1        8:33   1 515.9M  0 part
└─sdc2        8:34   1     4M  0 part
nvme0n1     259:0    0 465.8G  0 disk
├─nvme0n1p1 259:1    0   260M  0 part /boot
├─nvme0n1p2 259:2    0    32G  0 part [SWAP]
├─nvme0n1p3 259:3    0    32G  0 part /
└─nvme0n1p4 259:4    0 401.5G  0 part /home
[milky@art /]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931.5G  0 disk
└─sda1        8:1    0 931.5G  0 part
sdb           8:16   0 223.6G  0 disk
├─sdb1        8:17   0    16M  0 part
├─sdb2        8:18   0 223.1G  0 part
└─sdb3        8:19   0   512M  0 part
sdc           8:32   1  28.9G  0 disk
├─sdc1        8:33   1 515.9M  0 part
└─sdc2        8:34   1     4M  0 part
nvme0n1     259:0    0 465.8G  0 disk
├─nvme0n1p1 259:1    0   260M  0 part /boot
├─nvme0n1p2 259:2    0    32G  0 part [SWAP]
├─nvme0n1p3 259:3    0    32G  0 part /
└─nvme0n1p4 259:4    0 401.5G  0 part /home

efibootmgr -v

[milky@art ~]$ efibootmgr -v
BootCurrent: 000A
Timeout: 1 seconds
BootOrder: 0000,000A,0006
Boot0000* GRUB  HD(1,GPT,46c7f9d2-ddc4-7c4c-9740-f6f96839b7f4,0x800,0x82000)/File(\EFI\GRUB\GRUBX64.EFI)
Boot0006  Hard Drive    BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........S.a.m.s.u.n.g. .S.S.D. .9.7.0. .E.V.O. .5.0.0.G.B...................\.,.@.r.d.=.X..........A...........................%8Q..n......H..Gd-.;.A..MQ..L.S.a.m.s.u.n.g. .S.S.D. .9.7.0. .E.V.O. .5.0.0.G.B........BO..NO..........T.O.S.H.I.B.A. .D.T.0.1.A.C.A.1.0.0...................\.,.@.r.d.=.X..........A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . .9. .4.6.G.3.X.Z.S.N........BO..NO..........S.a.n.D.i.s.k. .S.D.8.S.B.B.U.2.4.0.G.1.1.2.2...................\.,.@.r.d.=.X..........A...........................>..Gd-.;.A..MQ..L.6.1.1.3.2.9.6.4.5.8.0.1. . . . . . . . ........BO
Boot000A* UEFI OS       HD(1,GPT,46c7f9d2-ddc4-7c4c-9740-f6f96839b7f4,0x800,0x82000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

I believe what I ought to do now is have os-prober, mount the Windows install partition,  and rerun grub-mkconfig. This is the output:

[milky@art ~]$ pacman -Qs os-prober
local/os-prober 1.77-1
    Utility to detect other OSes on a set of drives
[milky@art ~]$ sudo mount /dev/sdb2 /mnt
[milky@art ~]$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
done

For some reason, os-prober isn't seeing Windows.

Am I mounting the right partition? Is there any otherways to manually add or generate a .efi file for Windows? If I do set up the dual-boot for Windows, will it overwrite my grub bootloader since I added the --removable flag?

Thank you for your time in advance, I appreciate all the help I can get.

Last edited by mrOmegamilkyman (2020-06-27 03:41:47)

Offline

#2 2020-06-27 00:43:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,495

Re: [SOLVED] GRUB only seen with --removable flag, can't add Windows entry

You'd have to mount the EFI partition of Windows for GRUB's os-proper to detect the corresponding EFI files, so I'd presume /dev/sdb3 (... you did actually install Windows in UEFI mode did you? I have a feeling you didn't, and seeing how bad MSI's UEFI implementation is, I highly doubt it would support multiple ESPs even if it did, so you would need to at least share the ESP with Windows regardless.)  . If Windows is behaved enough it should only update it's own files on the designated ESP.

Offline

#3 2020-06-27 03:40:31

mrOmegamilkyman
Member
Registered: 2020-01-07
Posts: 4

Re: [SOLVED] GRUB only seen with --removable flag, can't add Windows entry

Thanks for the reply. Turns out the issue wasn't really anything to do with my Linux install, I was able to fix it by making a Windows bootable USB, booting it to, accessing Command Prompt, and using diskpart to create an EFI boot partition and bcdboot to enable it. After this, I was able to boot to Windows. Since this solution isn't really about Archlinux, I won't post the details.

Here's the article I read to do this https://www.easeus.com/partition-master … 0-8-7.html

Last edited by mrOmegamilkyman (2020-06-27 03:42:25)

Offline

Board footer

Powered by FluxBB