Grub bootloader doesn't appear when booting, Microsoft Boot Manager appears instead after reinstalling Windows 10

I reinstalled Windows on my dual-booted hdd which also has Endeavour OS. Now grub won’t appear on boot, and EOS also won’t appear on the Windows Boot Manager, nor the boot order in my bios settings. I have the latetst live usb of Endeavour OS, but I don’t know how to repair Grub. Help

Most probably Windows has overwritten EnOS’ bootloader.

Please refer to the following Discovery article and depending on your system’s boot mode (UEFI VS. Legacy/MBR) choose the appropriate method for restoring Grub’s bootloader:

https://discovery.endeavouros.com/system-rescue/repair-a-non-booting-grub/2021/03/

If you need more assistance, please boot up your EnOS’ live usb and post the output of the following commands:

efibootmgr -v

sudo parted -l

3 Likes

I’m trying to chroot using

sudo arch-chroot /mnt

output:

mount: /mnt/proc: mount point does not exist.
dmesg(1) may have more information after failed mount system call.
==> ERROR: Failed to setup chroot /mnt

You need to mount your installed system partition(s) before attempting chroot.

Please post

sudo parted -l

and indicate which partition contains your EnOS system (root/system partition).

Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  17.8MB  16.8MB                  Microsoft reserved partition  msftres
 2      17.8MB  162GB   162GB   ntfs            Basic data partition          msftdata
 3      162GB   166GB   4295MB  linux-swap(v1)                                swap
 4      166GB   167GB   839MB   fat32                                         boot, esp
 5      167GB   500GB   333GB   ext4
 6      500GB   500GB   585MB   ntfs                                          hidden, diag


Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 4037MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size   Type     File system  Flags
 2      1835MB  1944MB  109MB  primary  fat16        esp



/dev/sda5 is my root partition (5 167GB 500GB 333GB ext4)

1 Like

In case you still don’t understand. You need to first mount your root partition then mount the /efi partition then arch-chroot /mnt

2 Likes

In the live session, open a terminal and try the following:

  1. sudo su

  2. mount /dev/sda5 /mnt

  3. mount /dev/sda4 /mnt/boot/efi

  4. arch-chroot /mnt

  5. pacman -Syu ## to update your system

  6. grub-install

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

  8. exit ## to quit chroot

Reboot.

4 Likes

Sorry fo no response, I’ve been quite busy as of recent, and my wifi has been acting up so I didn’t update my system. Today I did, and I did all the aforementioned steps, but for some reason my live usb froze. I turned it off, did everything again and it yet again froze at 67% for whatever reason.
(I did “sudo pacman -Syu” in another instance of the terminal since it wouldn’t let me do it in the arch-chroot ed one, and without sudo)
Would it work if I just skipped the update?

I guess so. Perform all the steps again except #5 and see if you get your Grub back.
Hopefully once Grub is in order and you could boot into your system, you can update it then.

I don’t know why it didn’t work, I did it and it said that it was installed with no errors, I rebooted and I’m sent to Windows, and there’s nothing in the Microsoft Boot Manager

Could you look into your firmware settings (BIOS) and see if you have a new boot entry for EnOS in there.

Alternatively, from your live usb, post the output of:

efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0000,2001,2002,2003
Boot0000* Windows Boot Manager	HD(4,GPT,3ba91bee-733c-b148-8440-e179e4fa1c63,0x13534000,0x190000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d0000002c000100000010000000040000007fff0400
      dp: 04 01 2a 00 04 00 00 00 00 40 53 13 00 00 00 00 00 00 19 00 00 00 00 00 ee 1b a9 3b 3c 73 48 b1 84 40 e1 79 e4 fa 1c 63 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 69 00 63 00 72 00 6f 00 73 00 6f 00 66 00 74 00 5c 00 42 00 6f 00 6f 00 74 00 5c 00 62 00 6f 00 6f 00 74 00 6d 00 67 00 66 00 77 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
    data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 2c 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0001* USB HDD: Generic Flash Disk	PciRoot(0x0)/Pci(0x12,0x0)/USB(0,0)/USB(1,0)/HD(1,MBR,0x1e784590,0x36ad80,0x34000)RC
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 12 / 03 05 06 00 00 00 / 03 05 06 00 01 00 / 04 01 2a 00 01 00 00 00 80 ad 36 00 00 00 00 00 00 40 03 00 00 00 00 00 90 45 78 1e 00 00 00 00 00 00 00 00 00 00 00 00 01 01 / 7f ff 04 00
    data: 52 43
Boot0002* Unknown Device: 	MemoryMapped(11,0x670d3000,0x67790fff)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)5243a695de30
      dp: 01 03 18 00 0b 00 00 00 00 30 0d 67 00 00 00 00 ff 0f 79 67 00 00 00 00 / 04 06 14 00 b7 d6 7a c5 15 05 a8 40 9d 21 55 16 52 85 4e 37 / 7f ff 04 00
    data: 52 43 a6 95 de 30
Boot0003* Unknown Device: 	MemoryMapped(11,0x670d3000,0x67790fff)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)5243a695de30
      dp: 01 03 18 00 0b 00 00 00 00 30 0d 67 00 00 00 00 ff 0f 79 67 00 00 00 00 / 04 06 14 00 b7 d6 7a c5 15 05 a8 40 9d 21 55 16 52 85 4e 37 / 7f ff 04 00
    data: 52 43 a6 95 de 30
Boot0004* Unknown Device: 	MemoryMapped(11,0x670d3000,0x67790fff)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)5243a695de30
      dp: 01 03 18 00 0b 00 00 00 00 30 0d 67 00 00 00 00 ff 0f 79 67 00 00 00 00 / 04 06 14 00 b7 d6 7a c5 15 05 a8 40 9d 21 55 16 52 85 4e 37 / 7f ff 04 00
    data: 52 43 a6 95 de 30
Boot0005* Unknown Device: 	MemoryMapped(11,0x670d3000,0x67790fff)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)5243a695de30
      dp: 01 03 18 00 0b 00 00 00 00 30 0d 67 00 00 00 00 ff 0f 79 67 00 00 00 00 / 04 06 14 00 b7 d6 7a c5 15 05 a8 40 9d 21 55 16 52 85 4e 37 / 7f ff 04 00
    data: 52 43 a6 95 de 30
Boot0006* endeavouros	HD(4,GPT,3ba91bee-733c-b148-8440-e179e4fa1c63,0x13534000,0x190000)/File(\EFI\endeavouros\grubx64.efi)
      dp: 04 01 2a 00 04 00 00 00 00 40 53 13 00 00 00 00 00 00 19 00 00 00 00 00 ee 1b a9 3b 3c 73 48 b1 84 40 e1 79 e4 fa 1c 63 02 02 / 04 04 3e 00 5c 00 45 00 46 00 49 00 5c 00 65 00 6e 00 64 00 65 00 61 00 76 00 6f 00 75 00 72 00 6f 00 73 00 5c 00 67 00 72 00 75 00 62 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
Boot0007* arch	HD(4,GPT,3ba91bee-733c-b148-8440-e179e4fa1c63,0x13534000,0x190000)/File(\EFI\arch\grubx64.efi)
      dp: 04 01 2a 00 04 00 00 00 00 40 53 13 00 00 00 00 00 00 19 00 00 00 00 00 ee 1b a9 3b 3c 73 48 b1 84 40 e1 79 e4 fa 1c 63 02 02 / 04 04 30 00 5c 00 45 00 46 00 49 00 5c 00 61 00 72 00 63 00 68 00 5c 00 67 00 72 00 75 00 62 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
Boot000C* ATAPI CDROM: HL-DT-ST DVDRAM GUE1N	PciRoot(0x0)/Pci(0x11,0x0)/Sata(1,0,0)/CDROM(1,0x5c3,0xb40)RC
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 11 / 03 12 0a 00 01 00 00 00 00 00 / 04 02 18 00 01 00 00 00 c3 05 00 00 00 00 00 00 40 0b 00 00 00 00 00 00 / 7f ff 04 00
    data: 52 43
Boot0011* Unknown Device: 	MemoryMapped(11,0x670d3000,0x67790fff)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)5243a695de30
      dp: 01 03 18 00 0b 00 00 00 00 30 0d 67 00 00 00 00 ff 0f 79 67 00 00 00 00 / 04 06 14 00 b7 d6 7a c5 15 05 a8 40 9d 21 55 16 52 85 4e 37 / 7f ff 04 00
    data: 52 43 a6 95 de 30
Boot0014* Unknown Device: 	MemoryMapped(11,0x670d3000,0x67790fff)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)5243a695de30
      dp: 01 03 18 00 0b 00 00 00 00 30 0d 67 00 00 00 00 ff 0f 79 67 00 00 00 00 / 04 06 14 00 b7 d6 7a c5 15 05 a8 40 9d 21 55 16 52 85 4e 37 / 7f ff 04 00
    data: 52 43 a6 95 de 30
Boot0015* Unknown Device: 	MemoryMapped(11,0x670d3000,0x67790fff)/FvFile(c57ad6b7-0515-40a8-9d21-551652854e37)5243a695de30
      dp: 01 03 18 00 0b 00 00 00 00 30 0d 67 00 00 00 00 ff 0f 79 67 00 00 00 00 / 04 06 14 00 b7 d6 7a c5 15 05 a8 40 9d 21 55 16 52 85 4e 37 / 7f ff 04 00
    data: 52 43 a6 95 de 30
Boot2001* EFI USB Device	RC
      dp: 7f ff 04 00
    data: 52 43
Boot2002* EFI DVD/CDROM	RC
      dp: 7f ff 04 00
    data: 52 43
Boot2003* EFI Network	RC
      dp: 7f ff 04 00
    data: 52 43

1 Like
Boot0006* endeavouros	HD(4,GPT,3ba91bee-733c-b148-8440-e179e4fa1c63,0x13534000,0x190000)/File(\EFI\endeavouros\grubx64.efi)

You got an EFI boot entry for EnOS. Not sure why it doesn’t show in:

BootOrder: 0000,2001,2002,2003

You could try a couple of things.

Change/set a new boot order:

sudo efibootmgr --bootorder 0006,0000,2001,2002,2003

and check again with efibootmgr -v to see if the new boot order is actually set.

Or:

sudo efibootmgr --bootnext 0006

and reboot and see if it gets you to EnOS’ Grub.

I tried the first one, it worked as I checked the order with efibootmgr -v,
but when I rebooted, it sent me back to Windows, no Grub no nothing.
Second one worked, kind of. I restarted and it showed me my mother board’s manufacturer name as the usual with (I think) the grub rescue menu on top of it, unsure what to make of it so I typed Exit and it sent me to my Microsoft Boot Manager, with no EnOS in sight. Is there anything to be done in the grub rescue mode?

My suggestion would be to rebuild the whole Grub “environment” in your system.

arch-chroot into your installed system as you have done before and perform the following.

In chroot

    mv /etc/default/grub /etc/default/grub.old

    mv /etc/grub.d /etc/grub.d.old

    rm /boot/grub/grubenv

    grub-editenv /boot/grub/grubenv create

    pacman -Sy grub

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

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

Type exit to quit chroot.

Check again with efibootmgr -v and look for EnOS-GRUB among the EFI boot entries.

Make sure if the boot order is right. If not use one of the commands previously posted to set this new boot entry as first in the boot order line or as the one next to be used.

Hopefully this will work out.

No idea if it’s another grub bug thing, but I’m having a very similar issue with Manjaro:

@pebcak
Not to get off topic but i really just have a hard time understanding how these grub issues happen. I have many dual boot Windows and EndeavourOS and this just never happens to me. I’m really perplexed as i have some running EndeavourOS on the same drive as Windows and others on their own drive drive. I have installed either way which is using the Windows /efi or having a separate /efi on EndeavourOS and this issue just doesn’t happen. I do know that if you install Windows and EndeavourOS is already installed you are not going to have anything in the boot menu when it boots as it will just be Windows. Grub is the bootloader that takes control when you install EndeavourOS and os-prober adds Windows to the menu. It doesn’t work the other way around. Installing windows especially if you were using the Windows /efi is going to give you Windows with the Windows /efi and no grub for EndeavourOS. It does require that you would have to arch-chroot and reinstall grub and update it. Not sure why this is so troublesome for some. :thinking:

2 Likes

Right. I am not sure either. In some rare cases things seems to get messed up in some systems. It’s hard to tell what actually happens on all the configurations out there.

In the case of OP, the reinstallation of Windows using the same ESP looks to have overwritten EnOS’ bootloader. What is strange in this case is that after reinstalling the bootloader, it still drops into grub rescue. I am a bit perplexed.

Yes this why i am also perplexed but one cannot see exactly what is happening on the other side of the fence. :rofl:

IT WORKED (kind of…) I did what you said and I did as the previous commands posted, it worked but once, I’m guessing it was because of the OS to be booted next after restart
sudo efibootmgr --bootnext 0008