You are not logged in.
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
You should have mounted the ESP before any of that; in fact, before even running pacstrap.
Offline
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
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
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
Got it thank you!
Offline
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