You are not logged in.

#1 2021-06-04 14:17:33

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

[SOLVED] grub doesn't load after installation alongside windows 10

I used the following commands to install grub (I had arch installed before so could skip the entire installation process up to bootloader:
(sda8 is the Linux partition and sda2 is EFI partition)

$ mount /dev/sda8 /mnt
$ mkdir /mnt/EFI
$ mount /dev/sda2 /mnt/EFI
$ arch-chroot /mnt
$ grub-install --target=x86_64-efi --efi-directory=EFI --bootloader-id=GRUB
$ mkdir /boot/grub
$ grub-mkconfig -o /boot/grub/grub.cfg

What am I doing wrong?

I followed the wiki and my system is UEFI and GPT disk

Last edited by ArshiaAghaei (2021-06-06 05:41:35)

Offline

#2 2021-06-04 14:21:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Looks okay, was efibootmgr installed when running the grub-install command? which mainboard? If this is an MSI board they are notorious for a broken UEFI implementation that doesn't store NVRAM entries in which case you will want to rerun the grub-install command but add the --removable flag so that the standard path is populated.

Offline

#3 2021-06-04 14:25:28

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

V1del wrote:

Looks okay, was efibootmgr installed when running the grub-install command? which mainboard? If this is an MSI board they are notorious for a broken UEFI implementation that doesn't store NVRAM entries in which case you will want to rerun the grub-install command but add the --removable flag so that the standard path is populated.

I once did install grub when following a video, but I once switched to legacy mode so it messed that up.

My laptop is Acer, not sure if it has MSI board or not and I have installed Linux on it before with dual boot and there was no issues so I'm assuming something is done wrong here

And yes I installed (and even reinstalled) grub, efibootmgr, dosfstools and os-prober

Last edited by ArshiaAghaei (2021-06-04 14:27:44)

Offline

#4 2021-06-04 14:39:13

kermit63
Member
Registered: 2018-07-04
Posts: 171

Re: [SOLVED] grub doesn't load after installation alongside windows 10

ArshiaAghaei wrote:

..
$ mount /dev/sda2 /mnt/EFI
..
$ grub-install --target=x86_64-efi --efi-directory=EFI --bootloader-id=GRUB
..

I think it should be: --efi-directory=/EFI. You missed the '/' before EFI.

Offline

#5 2021-06-04 14:43:31

Manix
Member
Registered: 2021-04-17
Posts: 70

Re: [SOLVED] grub doesn't load after installation alongside windows 10

hi
maybe slash ?

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

why mkdir /boot/grub after grub-install ?


I don't love rosbeef

Offline

#6 2021-06-04 14:47:30

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

kermit63 wrote:

I think it should be: --efi-directory=/EFI. You missed the '/' before EFI.

In that case is says /EFI doesn't look like an EFI partition.

Offline

#7 2021-06-04 14:49:52

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Manix wrote:

why mkdir /boot/grub after grub-install ?

Because otherwise it says that directory not found

Offline

#8 2021-06-04 14:53:47

Manix
Member
Registered: 2021-04-17
Posts: 70

Re: [SOLVED] grub doesn't load after installation alongside windows 10

In that case is says /EFI doesn't look like an EFI partition.

you formatted well in fat32? (/dev/sda2)

Because otherwise it says that directory not found

it will be useless if you create an installation folder after launching grub-mkconfig

Last edited by Manix (2021-06-04 14:57:48)


I don't love rosbeef

Offline

#9 2021-06-04 14:55:12

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Manix wrote:

In that case is says /EFI doesn't look like an EFI partition.

you formatted well in fat32? (/dev/sda2)

Do I need to when windows is installed there?

Offline

#10 2021-06-04 15:04:33

Manix
Member
Registered: 2021-04-17
Posts: 70

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Do I need to when windows is installed there?

no, in UEFI you need a blank partition formatted in fat32 to install grub, leave the windows partitions

and install : efibootmgr,os-prober and ntfs-3g for grub to detect the Windows boot partition.


I don't love rosbeef

Offline

#11 2021-06-04 15:09:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,471

Re: [SOLVED] grub doesn't load after installation alongside windows 10

ArshiaAghaei wrote:
Manix wrote:

In that case is says /EFI doesn't look like an EFI partition.

you formatted well in fat32? (/dev/sda2)

Do I need to when windows is installed there?

Windows itself is installed there? That would be the wrong partition. What did you mount, exactly?

Online

#12 2021-06-04 15:27:45

Manix
Member
Registered: 2021-04-17
Posts: 70

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Windows itself is installed there? That would be the wrong partition. What did you mount, exactly?

from what i understand @ArshiaAghaei is trying to install grub on the windows bootloader partition.


I don't love rosbeef

Offline

#13 2021-06-04 15:33:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,471

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Manix wrote:

Windows itself is installed there? That would be the wrong partition. What did you mount, exactly?

from what i understand @ArshiaAghaei is trying to install grub on the windows bootloader partition.

Yet that's not what they said, and GRUB indicates that that's not what it is.

Online

#14 2021-06-04 21:07:49

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Scimmia wrote:
Manix wrote:

Windows itself is installed there? That would be the wrong partition. What did you mount, exactly?

from what i understand @ArshiaAghaei is trying to install grub on the windows bootloader partition.

Yet that's not what they said, and GRUB indicates that that's not what it is.

No that's the place

I was installing GRUB on the Windows MBR partition which corrupted the MBR upon installation

I presume I did something wrong

Offline

#15 2021-06-04 22:21:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,471

Re: [SOLVED] grub doesn't load after installation alongside windows 10

MBR? Is Windows not using UEFI?

Online

#16 2021-06-04 23:12:39

Manix
Member
Registered: 2021-04-17
Posts: 70

Re: [SOLVED] grub doesn't load after installation alongside windows 10

MBR? Is Windows not using UEFI?

probably confusion , therefore : BIOS > MBR and UEFI > GPT

you are probably in UEFI according to your first post.

1) windows install first :
- 100mio EFI partition, possibility of mounting on it (usually 1 kernel) or extend partition with gparted (more kernel)
-  new EFI partion install normally around 500 mio (with ntfs-3g)
2) linux install first :
- your choice for ESP partition (windows detect ESP partition)

everything is indicated here : https://wiki.archlinux.org/title/Dual_boot_with_Windows

Last edited by Manix (2021-06-04 23:24:46)


I don't love rosbeef

Offline

#17 2021-06-04 23:18:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Acers are in a similar boat with weird implementation. In that case you need to go into your UEFI enable secureboot, go back into the UEFI, there should be an option to add GRUB as a trusted binary, disable secureboot and boot the newly created entry.

...

At least in theory but since there seems to be confusion on which is the EFI partition you might want to provide the output of lsblk -f after having mounted all the partitions like you expect them to be correct.

Last edited by V1del (2021-06-04 23:19:19)

Offline

#18 2021-06-05 04:36:00

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Scimmia wrote:

MBR? Is Windows not using UEFI?

MBR is the Bootloader of windows too.

At least what they call it in my search results.

Offline

#19 2021-06-05 04:38:08

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Manix wrote:

MBR? Is Windows not using UEFI?

probably confusion , therefore : BIOS > MBR and UEFI > GPT

you are probably in UEFI according to your first post.

1) windows install first :
- 100mio EFI partition, possibility of mounting on it (usually 1 kernel) or extend partition with gparted (more kernel)
-  new EFI partion install normally around 500 mio (with ntfs-3g)

So it has to be a new 500MB partition that does not contain the windows bootloader?

Offline

#20 2021-06-05 06:31:05

Manix
Member
Registered: 2021-04-17
Posts: 70

Re: [SOLVED] grub doesn't load after installation alongside windows 10

So it has to be a new 500MB partition that does not contain the windows bootloader?

it is quite possible to have 2 ESPs on the same disc, one of 100mio that of windows and one of "like you want" that of linux.

I am not trying to make you create a second EFI partition but just that it is possible.

nico@archnico ~ % sudo fdisk -l                                                                         (master *=)
Disque /dev/nvme0n1 : 465,76 GiB, 500107862016 octets, 976773168 secteurs
Modèle de disque : Samsung SSD 970 EVO 500GB               
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : gpt
Identifiant de disque : CD20A901-A6B9-4341-A6D9-61D8FD08D2A0

Périphérique                  Début                    Fin        Secteurs      Taille    Type
/dev/nvme0n1p1            2048             206847          204800     100M    Système EFI
/dev/nvme0n1p2        206848            239615             32768       16M    Réservé Microsoft
/dev/nvme0n1p3        239616      818152669    817913054     390G    Données de base Microsoft
/dev/nvme0n1p4 818153472      819199999         1046528     511M    Environnement de récupération Windows
/dev/nvme0n1p5 819200000      820223999         1024000     500M    Système EFI
/dev/nvme0n1p6 820224000      976773134    156549135     74,6G    Système de fichiers Linux

according to archwiki :

Windows Setup creates a 100 MiB EFI system partition (except for Advanced Format 4K native drives where it creates a 300 MiB ESP), so multiple kernel usage is limited. Workarounds include:

    - Mount ESP to /efi and use a boot loader that has file system drivers and is capable of launching kernels that reside on other partitions.
    - Expand the EFI system partition, typically either by decreasing the Recovery partition size or moving the Windows partition (UUIDs will change).
    - Backup and delete unneeded fonts in esp/EFI/Microsoft/Boot/Fonts/ [2].
    - Backup and delete unneeded language directories in esp/EFI/Microsoft/Boot/ (e.g. to only keep en-US).

...
...

Using the Disk Management utility in Windows, check how the partitions are labelled and which type gets reported. This will help you understand which partitions are essential to Windows, and which others you might repurpose. The Windows Disk Management utility can also be used to shrink Windows (NTFS) partitions to free up disk space for additional partitions for Linux.
- Warning: The first 4 partitions in the above list are essential, do not delete them.

You can then proceed with partitioning, depending on your needs.

Mind that an additional EFI system partition should not be created, as it may prevent Windows from booting. Simply mount the existing partition.
- Note: It only appears when Linux is installed on the second hard disk and a new EFI system partition is created on the second hard disk.

The boot loader needs to support chainloading other EFI applications to do dual boot Windows / Linux.

it's a bit like the dog who wants to bite the tail smile I'm confused


I don't love rosbeef

Offline

#21 2021-06-06 05:41:10

ArshiaAghaei
Member
Registered: 2021-05-19
Posts: 22

Re: [SOLVED] grub doesn't load after installation alongside windows 10

Fixed by not formatting the EFI partition as fat32 and using /EFI/, I used that after one of the people asked if it was formatted in fat32, I formatted it and got my windows bootloader destroyed

Offline

Board footer

Powered by FluxBB