You are not logged in.

#1 2017-11-30 11:48:32

Shelbster
Member
Registered: 2017-11-16
Posts: 38

[SOLVED] Windows disappears from UEFI after installing Arch/grub

So I've had to reinstall Windows 10 and Arch a few times to replicate this error because it only happens in one direction. If I install Windows after installing Arch, I can mount the Windows partition and os-prober will find it just fine. The same does not work if I install Arch after installing Windows. I cannot find Windows using os-prober, in fact, "Windows Boot Manager" disappears completely from my UEFI menu when I try to manually access it without going through grub. In essence, I lose complete access to it. I have tried loading up a Windows USB and tried fixing the start up but no dice. I really want to fix this because I don't want to have to reinstall Windows if I ever have to reinstall Arch.
I have Windows on one SSD and Arch on a separate SSD. They are both running UEFI/GPT.

I also tried disabling fast boot from my BIOS/UEFI in accordance to grub troubleshooting, but the troubleshooting on the grub page also says to do it IN Windows, and I don't have access to my Windows.

I have also tried enabling showing both UEFI and Legacy on my boot list in my UEFI settings which does show the drive that Windows is installed to, but when I select it all I get is an error saying "Reboot and Select proper Boot device or Inset Boot Media in selected Boot device and press a key"

Last edited by Shelbster (2017-11-30 18:01:36)

Offline

#2 2017-11-30 15:06:02

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

I reinstalled windows again and retried installing arch again to try to figure out some more information. Before installing grub this time around, I ran efibootmgr and saw that everything was where it was supposed to be. It showed both my previous entry of grub and windows boot manager. After running grub-install I ran efibootmgr again and same deal, all showed up. I forgot to run it again after running grub-mkconfig but upon reboot, I ran efibootmgr again and now I only saw the current grub entry. I tried fixing boot for windows from the windows USB, and when trying to access \EFI\Microsoft\Boot, I noticed that it didn't exist, but \EFI\Grub did. I wasn't able to access that, access denied. I do not know how grub is writing to a different disk.

Offline

#3 2017-11-30 15:08:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,868

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

I guess the crucial part is what "install Arch after installing Windows" does to the EFI/Microsoft/Boot path in your ESP, so how in particular do you "install Arch after installing Windows"?

Edit: too late.

Last edited by seth (2017-11-30 15:08:56)

Online

#4 2017-11-30 15:10:40

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

I have my stuff backed up so I've just been reinstalling these two operating systems trying to figure it out haha. I install arch following the installation guide. I don't do anything out of the ordinary that is outside the wiki.

Offline

#5 2017-11-30 15:33:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

Did you format the ESP?

Offline

#6 2017-11-30 15:35:01

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

Only on the hard drive that I installed arch.
I made it a 512M partition with the ef00 code and formatted it vfat
the  mounted

mount /dev/sdb1 /mnt
mkdir /mnt/boot
mount /dev/sdb2 /mnt/boot

Last edited by Shelbster (2017-11-30 15:36:04)

Offline

#7 2017-11-30 15:39:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

Why have 2 ESPs?

Offline

#8 2017-11-30 15:41:04

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

I just followed the directions from the wiki for installing UEFI. Besides, i want grub on the same drive as Arch and not on the one with Windows.

Using the command line for windows like before, While EFI\Microsoft\Boot is missing, It has EFI\grub\grubx64.efi. This is on the drive with windows, on the hidden partition.

Last edited by Shelbster (2017-11-30 15:42:52)

Offline

#9 2017-11-30 16:39:44

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

I agree that you shouldn't be trying to have 2 ESP's. This will be a problem. That also explains why you don't see the directories for both grub and windows on the same ESP.

I'd not create an ESP for whichever is the second OS that you install, choose the one that exists from installing the first OS. If windows makes it hard to do that during it's installation, install windows first. Then when installing Arch, choose the existing ESP on the other drive to mount at /boot and don't format it. Do ensure that the ESP has the boot and ESP flags set and the windows installation may well not do that when it creates the ESP. You can do that during the Arch installation.


Simple and Open

Offline

#10 2017-11-30 16:59:48

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

Ok, so let's roll with that. I am going to reinstall Windows first, and then reinstall arch on top of that, because I feel it more likely (because of my noobishness) that I will reinstall Arch at a later time, which is what is causing problem (arch after windows). So going with Blasphemist's last post, I will want to install grub to the ESP on the drive that I have windows on. So what I have to do is choose the existing ESP on arch install to mount at boot.
Now I boot up the arch usb, and type in fdisk -l, but here is another problem, one that I faced while trying to figure this out in the meantime. The partition holding EFI (on the windows drive) doesn't not appear in fdisk. It is 512MB and I know that because I can access it from diskpart on the windows usb, but on the arch usb, I can only see

Disk /dev/sda: 953.9 GiB, 1024209543168 bytes, 2000409264 sectors
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: 832C8297-DF73-4133-8DBD-2EA4DC725E0F
 
Device     Start        End    Sectors   Size Type
/dev/sda1   2048      34815      32768    16M Microsoft reserved
/dev/sda2  34816 2000408575 2000373760 953.9G Microsoft basic data

Offline

#11 2017-11-30 17:10:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

So there was always just 1 ESP, and you formatted it. No wonder Windows disappeared.

Offline

#12 2017-11-30 17:12:41

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

Did Windows not make an ESP? That output is right after reinstalling Windows and before reinstalling arch.

Edit:
This is the full fdisk -l from the arch usb right after reinstalling Windows, and before reinstalling Arch

Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
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: dos
Disk identifier: 0xa0c7e53a

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT


Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors
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: E1B6F263-71BA-4486-91CC-0690ECC84DDF

Device       Start       End   Sectors   Size Type
/dev/sdb1  1050624 976773134 975722511 465.3G Linux filesystem
/dev/sdb2     2048   1050623   1048576   512M EFI System

Partition table entries are not in disk order.


Disk /dev/sda: 953.9 GiB, 1024209543168 bytes, 2000409264 sectors
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: 832C8297-DF73-4133-8DBD-2EA4DC725E0F

Device     Start        End    Sectors   Size Type
/dev/sda1   2048      34815      32768    16M Microsoft reserved
/dev/sda2  34816 2000408575 2000373760 953.9G Microsoft basic data


Disk /dev/sdd: 14.4 GiB, 15500083200 bytes, 30273600 sectors
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: dos
Disk identifier: 0x5329baec

Device     Boot Start     End Sectors  Size Id Type
/dev/sdd1  *        0 1071103 1071104  523M  0 Empty
/dev/sdd2         164  131235  131072   64M ef EFI (FAT-12/16/32)


Disk /dev/loop0: 408.5 MiB, 428281856 bytes, 836488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Of course sdb is still set up the same way since arch is already installed.

Edit 2: Opp, something just clicked. So when installed Windows, since Arch was already installed with a ESP, did windows skip creating one? Is that what you're trying to say? And so diskpart, when it's pointing to a 512MB parition with efi files, it's pointing to the partition on sdb?

Last edited by Shelbster (2017-11-30 17:19:16)

Offline

#13 2017-11-30 18:01:02

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

Thank you guys. Scimmia's last comment really made it all click. I assumed incorrectly that windows had made an ESP and that the 512M partition shown by diskpart when I had selected the Windows Disk was separate from the 512M partition I had created for arch. Now that I got everything working, even grub is telling me that "Windows Boot Manager" is on /dev/sdb, which was really the final DUH! Anyways, problem solved!

Offline

#14 2017-11-30 19:18:32

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

I'm glad it is all working now. I don't however know just what to think of the dos partition table type on sdc, the windows drive. I'm not saying you should necessarily change that if all is working but beware of that.


Simple and Open

Offline

#15 2017-12-01 00:26:49

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

sdc isn't the drive that contains windows on it. It's just a hard drive I keep connected for extra storage/occasional backup.

Offline

#16 2017-12-01 01:01:56

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

It looks like after a bit of review that you may not have troubles from mixing GPT and MBR partition tables on a UEFI system as long as you never try to boot anything on the MBR disk. Do you have a reason to do it? With Arch and windows on GPT I don't see the point but will assume you have a reason.
https://wiki.archlinux.org/index.php/Pa … PT_and_MBR


Simple and Open

Offline

#17 2017-12-01 01:13:15

Shelbster
Member
Registered: 2017-11-16
Posts: 38

Re: [SOLVED] Windows disappears from UEFI after installing Arch/grub

I don't have a reason besides that's just how that drive has always been. The drive currently contains my backed up files so I won't touch it right now, but I will make the change as soon as I feel comfortable with my setup. Thank you!

Offline

Board footer

Powered by FluxBB