You are not logged in.
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
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
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
..
$ 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.
Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.
Offline
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
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
why mkdir /boot/grub after grub-install ?
Because otherwise it says that directory not found
Offline
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
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
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
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?
Offline
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
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.
Offline
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
MBR? Is Windows not using UEFI?
Offline
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
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
MBR? Is Windows not using UEFI?
MBR is the Bootloader of windows too.
At least what they call it in my search results.
Offline
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
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-61D8FD08D2A0Pé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 I'm confused
I don't love rosbeef
Offline
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