You are not logged in.

#1 2016-12-05 16:44:38

blackx
Member
From: St. Petersburg, Russia
Registered: 2014-07-10
Posts: 8

GRUB on EFI system: unclear wiki instructions

Hi!

suppose I have two hard disks, recognized as /dev/sda and /dev/sdb. There is also existing 512 MB EFI system partition on /dev/sda1.

I've installed Arch Linux system on /dev/sdb1. As instructed on wiki, to install GRUB on my ESP partition I should, being in chroot env, do the following:

- install grub and efibootmgr packages
- mount my EFI partition to /boot
- run grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
- going next to the Generate the main configuration file, run grub-mkconfig -o /boot/grub/grub.cfg

Where I'm wrong?

My actual questions are:
1) why do they suggest mount EFI partition to /boot? /boot already contain system files including images, and then grub-mkconfig can't find the installed Arch!
2) if I mount ESP to other location, say, /mnt, should I generate grub.cfg in /boot/grub/grub.cfg or /mnt/grub/grub.cfg? I think the grub.cfg on ESP is more right solution, but, is it valid setup at all?

Thanks
blackx

Last edited by blackx (2016-12-05 16:45:56)

Offline

#2 2016-12-05 16:51:49

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

Re: GRUB on EFI system: unclear wiki instructions

You should have mounted the ESP before any of that; in fact, before even running pacstrap.

Offline

#3 2016-12-05 19:38:01

blackx
Member
From: St. Petersburg, Russia
Registered: 2014-07-10
Posts: 8

Re: GRUB on EFI system: unclear wiki instructions

If so, how would grub-install found it in chrooted environment on bootloader installation step? Could you please explain a bit more?

PS. Yes, I am looking for help here in newbie's corner but I am personally don't have real issue with this. I've just done it in my way, and now wondering why wiki suggests to mount ESP to /boot in a chroot mode. If this will be clear to me, I would update wiki (or at least suggest an update on wiki discussion page) to made it clear for everyone.

Thanks
blackx

Offline

#4 2016-12-05 19:54:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,865
Website

Re: GRUB on EFI system: unclear wiki instructions

It doesn't matter whether you mount the esp before or after you chroot. So long as it is mounted to the chroot's /boot directory, then grub's installation instructions should work. Ideally, you should mount the esp before installing grub, since it creates the /boot/grub directory and installs a grub.cfg file to it when you install the package, but this directory and cfg file may be created anyway when you run the install command anyway. I don't know, I don't use grub.

Another thing to note is: if you didn't mount your esp before running pacstrap, then your linux kernel won't be in the right place; it will be on your root partition, not the esp.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2016-12-06 00:36:12

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

Re: GRUB on EFI system: unclear wiki instructions

Mounting before or after chrooting doesn't matter per say, but /boot needs to be mounted before you run pacstrap or you can't access your kernel.

Offline

#6 2016-12-06 12:58:29

blackx
Member
From: St. Petersburg, Russia
Registered: 2014-07-10
Posts: 8

Re: GRUB on EFI system: unclear wiki instructions

Got it thank you!

Offline

#7 2016-12-06 15:26:54

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,865
Website

Re: GRUB on EFI system: unclear wiki instructions

Please remember to mark your thread as solved.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB