Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(SOLVED) Optimizing GRUB in UEFI multiboot scenario
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Tue Jul 28, 2020 9:10 am    Post subject: (SOLVED) Optimizing GRUB in UEFI multiboot scenario Reply with quote

I have managed recently to install Gentoo on an UEFI multiboot system. At the moment I have Windows 10, Linux Mint and Gentoo. It took a lot of hard work as the Gentoo documentation is hardly adequate for this situation.

Now that it's up and running I find that the size of the ESP partition is a limiter. Currently I have both grub and the binary kernels there. Obviously I want them on another partition, could be the system (/) partition or a separate /boot-partition. Linux Mint has it this way, already, I believe. However I would like to avoid experimenting again.

Could it be this simple:

1. Boot normally
2. Unmount /boot (as it points to the ESP partition)
3. Create /boot (or use as is)
4. Recompile a kernel (which will then install in /boot)
5. Update /etc/fstab according to step 3.
5. Run grub-mkconfig -o /boot/grub/grub.cfg
6. Reboot

After that, if desired move already existing binary kernels to the new location or delete them.

Help is appreciated.


Last edited by Helena on Sun Aug 02, 2020 3:22 pm; edited 2 times in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Tue Jul 28, 2020 9:20 am    Post subject: Re: Optimizing UEFI multiboot Reply with quote

Helena wrote:
I have managed recently to install Gentoo on an UEFI multiboot system. At the moment I have Windows 10, Linux Mint and Gentoo. It took a lot of hard work as the Gentoo documentation is hardly adequate for this situation.

There is not very much you need:Adding Linux Mint to the ESP should not be too complicated.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Tue Jul 28, 2020 9:47 am    Post subject: Re: Optimizing UEFI multiboot Reply with quote

Thank you for replying quickly
charles17 wrote:
Helena wrote:
I have managed recently to install Gentoo on an UEFI multiboot system. At the moment I have Windows 10, Linux Mint and Gentoo. It took a lot of hard work as the Gentoo documentation is hardly adequate for this situation.

There is not very much you need:Adding Linux Mint to the ESP should not be too complicated.
I may not have expressed myself clearly. Both Windows 10 and Linux Mint are up and running so no changes required there. I only want to change my Gentoo installation.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Tue Jul 28, 2020 10:07 am    Post subject: Re: Optimizing UEFI multiboot Reply with quote

Helena wrote:
...I only want to change my Gentoo installation.

Just drop it into your /boot/EFI/Gentoo directory
Code:
 /boot
 └── EFI
     ├── Boot
     │   └── bootx64.efi
     ├── Gentoo
     │   └── bzImage-x.x.x.efi

Then, after creating your Gentoo boot item, you should be able to select the Gentoo kernel from the UEFI boot menu.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Tue Jul 28, 2020 10:44 pm    Post subject: Reply with quote

Unfortunately I still have not made my situation clear. I will try to rephrase.

I have this partition layout:
Code:
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                               
Model: ATA CT1000MX500SSD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  524MB   523MB   ntfs            Basic data partition          hidden, diag
 2      524MB   628MB   104MB   fat32           EFI system partition          boot, esp
 3      628MB   645MB   16.8MB                  Microsoft reserved partition  msftres
 4      645MB   627GB   626GB   ntfs            Basic data partition          msftdata
 5      627GB   889GB   262GB   ntfs            Basic data partition          msftdata
 6      889GB   889GB   2097kB  ext2            grub
 7      889GB   889GB   134MB   ext2            Linux filesystem
 8      889GB   893GB   4295MB  linux-swap(v1)  Linux swap
 9      893GB   926GB   32.2GB  btrfs           Linux filesystem
10      926GB   973GB   46.9GB  ext4
11      973GB   1000GB  27.6GB  ext4            Funtoo

(parted)                                                                 
The ESP partition (sda2) has been created by the Windows installation and is relatively small. After that, I installed Linux Mint (in a matter of minutes). Finally I decided to install Gentoo, which cost me a headache even after having installed it maybe a hundred times to an MBR disk.

The ESP partition now reads:
Code:

/boot
 |
 └── grub
 |     └── grub.cfg
 |
 └── EFI
     ├── Boot
     │   └── ...
     ├── Microsoft
     │   └── ...
     ├── gentoo
     │   └── grubx64.efi
     ├── ubuntu
     │   └── ...
All the binary Gentoo-generated kernels -just 2 at the moment but there will be (many) more- are in the root of the ESP partition. The EFI/ubuntu directory of course refers to Linux Mint; ignore the Funtoo partition, it has not been installed.

My questions are:
1. Is it possible to keep grubx64.efi as it is and move the kernels to another partition? I believ it is (see my starting post)
2. If so, how should this be done (for a guessed approach, see also my starting post)
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Wed Jul 29, 2020 5:42 am    Post subject: Reply with quote

So your main topic is about grub.
Are you having two grub installations, one from Linux Mint and one from Gentoo? Or just only one?
I seem to recall that rEFInd supports Kernel image outside ESP. For grub I have no idea.

Edit
This section from archlinux wiki might give you some help


Last edited by charles17 on Wed Jul 29, 2020 9:49 am; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6629

PostPosted: Wed Jul 29, 2020 5:55 am    Post subject: Reply with quote

refind autodetects kernels in my btrfs /boot/. Bit annoying because its filesystem driver is slow with a lot of files in there, but it means the ESP never runs out of space or needs mounting r/w. /EFI/refind/ is 2.3MB total.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Wed Jul 29, 2020 1:46 pm    Post subject: Reply with quote

Thx charles17 and Ant P for pointing out rEFind. I've looked into the creator's webpages and he confirms clearly (as far as I understand) that grub should be able to load a kernel from another partition. As I already guessed in my starting post.

I don't want to change my boot loader at the moment so I am still looking for a gentoo-compliant procedure for grub. The ArchLinux WiKi is good background, as always, but doesn't provide me with the solution yet.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Wed Jul 29, 2020 2:10 pm    Post subject: Reply with quote

Helena,

Not yet clear to me. Are you using the bootloader ( grub? ) provided by Linux Mint, or did you install grub from Gentoo?
And what is the exact location of your kernels? Are they in /boot/EFI/ or in /boot/?

Maybe you could change the ESP's mountpoint to /boot/whatever/EFI and have stuff in /boot but outside the (space limited) ESP.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Wed Jul 29, 2020 6:57 pm    Post subject: Reply with quote

My ESP partition is:

Code:
/boot
├── EFI
│   ├── Boot
│   ├── Microsoft
│   ├── gentoo
│   └── ubuntu
├── System Volume Information
│   ├── AadRecoveryPasswordDelete
│   └── ClientRecoveryPasswordRotation
├── System.map-5.4.48-gentoo-APT-2020
├── System.map-5.4.48-gentoo-APT-2020.old
├── System.map-debian-sources-lts-x86_64-4.19.118_p2
├── boot-repair
│   └── log
├── config-5.4.48-gentoo-APT-2020
├── config-5.4.48-gentoo-APT-2020.old
├── grub
│   ├── fonts
│   ├── grub.cfg
│   ├── grub.cfg.backup
│   ├── grubenv
│   ├── locale
│   ├── themes
│   └── x86_64-efi
├── initramfs-debian-sources-lts-x86_64-4.19.118_p2
├── kernel-debian-sources-lts-x86_64-4.19.118_p2
├── lsmod.txt
├── lspci.txt
├── vmlinuz-5.4.48-gentoo-APT-2020
└── vmlinuz-5.4.48-gentoo-APT-2020.old

15 directories, 14 files
The Gentoo kernels are in the root: vmlinuz*. Again, ignore the *debian-sources* files.

One level deeper in /boot/EFI:
Code:
/boot/EFI/
├── Boot
│   ├── bootx64.efi
│   ├── fbx64.efi
│   └── mmx64.efi
├── Microsoft
│   ├── Boot
│   └── Recovery
├── gentoo
│   └── grubx64.efi
└── ubuntu
    ├── BOOTX64.CSV
    ├── grub.cfg
    ├── grubx64.efi
    ├── mmx64.efi
    └── shimx64.efi

6 directories, 9 files
Grub (in /boot/EFI/gentoo) has been installed by Gentoo. A second grub installation (in /boot/EFI/ubuntu) originates from Linux Mint but is not relevant here.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Wed Jul 29, 2020 8:12 pm    Post subject: Reply with quote

Someone more familiar with Grub to step in here.
But you'd better change the topic (in the top post) to better reflect "need help with multiboot Grub"
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 431
Location: South America

PostPosted: Thu Jul 30, 2020 1:14 am    Post subject: Re: Optimizing UEFI multiboot Reply with quote

Yes, GRUB can boot kernels that are not in the ESP, as long as it can read the filesystem of the partition(s) they are installed in. And it definitely can read ext2 and ext4 filesystems.

Helena wrote:
2. Unmount /boot (as it points to the ESP partition)
3. Create /boot (or use as is)
Then you'd have to mount the ESP somewhere else (e.g. to update GRUB), not at /boot.

But then you also have Mint, which has installed a second GRUB, and when booting that distribution, it is not clear where it mounts the ESP. The presence of a Mint kernel and initramfs in the ESP suggest that it also does, or did at one point, mount the ESP at /boot.

Helena wrote:
4. Recompile a kernel (which will then install in /boot)
You don't need to recompile the kernel, only redo make install.

Helena wrote:
5. Run grub-mkconfig -o /boot/grub/grub.cfg
You need that because kernels would change partition, but you also need to redo grub-install, because GRUB's support files (/boot/grub/*) change partition as well. I never tested such a setup, but I suppose it works.

Helena wrote:
My ESP partition is:

Code:
/boot
├── EFI
│[...]
├── grub
│   ├── fonts
│   ├── grub.cfg
│   ├── grub.cfg.backup
│   ├── grubenv
│   ├── locale
│   ├── themes
│   └── x86_64-efi
[...]
Who 'owns' this, Gentoo or Mint?
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Thu Jul 30, 2020 11:02 am    Post subject: Re: Optimizing UEFI multiboot Reply with quote

I'll try to answer your questions.
GDH-gentoo wrote:
Then you'd have to mount the ESP somewhere else (e.g. to update GRUB), not at /boot.

But then you also have Mint, which has installed a second GRUB, and when booting that distribution, it is not clear where it mounts the ESP. The presence of a Mint kernel and initramfs in the ESP suggest that it also does, or did at one point, mount the ESP at /boot.

....

Who 'owns' this, Gentoo or Mint?
First, I still believe that Linux Mint is completely separate from my Gentoo installation. Mint's grub is to be found in the ubuntu subdirectory:
Code:
/boot/EFI/ubuntu/
├── BOOTX64.CSV
├── grub.cfg
├── grubx64.efi
├── mmx64.efi
└── shimx64.efi

0 directories, 5 files
Mint boots via a double grub.cfg option as suggested in https://www.rodsbooks.com/efi-bootloaders/grub2.html (third, hybrid approach). However I think I can simply use the first method -which I would prefer as it is the simplest-. The following paragraph strengthens my confidence:
Code:
Whether you use a version of GRUB 2 that's configured to look for its support files on the ESP or on a Linux partition, the software can load the Linux kernel from just about anywhere—the ESP, a Linux partition, or even from a RAID or LVM partition. Most commonly, the kernel and initial RAM disk will reside in the Linux /boot directory. (Note that reading a kernel from somewhere other than the ESP isn't a problem by the preceding analysis—GRUB 2 can still boot other OSes even if it can't access a Linux kernel file, so long as its own configuration and support files reside on the ESP.) This is arguably GRUB 2's greatest strength; no other boot loader can read Linux kernels from such a wide variety of locations.
Apparently you confirm that.
GDH-gentoo wrote:
Then you'd have to mount the ESP somewhere else (e.g. to update GRUB), not at /boot.
I understand that, but I only need the ESP when re-configuring (or reinstalling) GRUB, correct?
GDH-gentoo wrote:
You don't need to recompile the kernel, only redo make install.
Acknowledged.
GDH-gentoo wrote:
You need that because kernels would change partition, but you also need to redo grub-install, because GRUB's support files (/boot/grub/*) change partition as well. I never tested such a setup, but I suppose it works.
You are referring to the second option as mentioned above, I believe, but I hope that won't be necessary.
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1675

PostPosted: Thu Jul 30, 2020 1:12 pm    Post subject: Reply with quote

Largely off topic: grub2 vulnerabilty
Unclear how much grub.cfg from EFI boot partition are exposed...
The article points out:
Code:
external grub.cfg
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 431
Location: South America

PostPosted: Thu Jul 30, 2020 10:51 pm    Post subject: Re: Optimizing UEFI multiboot Reply with quote

Helena wrote:
Mint boots via a double grub.cfg option as suggested in https://www.rodsbooks.com/efi-bootloaders/grub2.html (third, hybrid approach). However I think I can simply use the first method -which I would prefer as it is the simplest-.
Helena wrote:
GDH-gentoo wrote:
You need that because kernels would change partition, but you also need to redo grub-install, because GRUB's support files (/boot/grub/*) change partition as well. I never tested such a setup, but I suppose it works.
You are referring to the second option as mentioned above, I believe, but I hope that won't be necessary.
grub-install installs its support and configuration files in /boot/grub by default. I believe there is an option to specify a different directory, but I never used it. If the ESP is mounted at /boot when you run grub-install, you end up with the first described variant, indeed. Which should be what you have now; presumably the grub directory you have in the ESP is the result of that, and corresponds to Gentoo. But if /boot is a different partition, or in the partition that corresponda to the rootfs, you end up with the second described variant the next time you run grub-install.

I'm not sure what the third variant (the two configuration files 'hybrid' variant) is about.

Helena wrote:
The following paragraph strengthens my confidence:
Code:
Whether you use a version of GRUB 2 that's configured to look for its support files on the ESP or on a Linux partition, the software can load the Linux kernel from just about anywhere—the ESP, a Linux partition, or even from a RAID or LVM partition. [...]
Yeah, the part about loading the Linux kernel is true.

Helena wrote:
GDH-gentoo wrote:
Then you'd have to mount the ESP somewhere else (e.g. to update GRUB), not at /boot.
I understand that, but I only need the ESP when re-configuring (or reinstalling) GRUB, correct?
Yes.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Fri Jul 31, 2020 3:23 am    Post subject: Reply with quote

Topic title changed
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Fri Jul 31, 2020 7:14 am    Post subject: Reply with quote

So back to my original question: which steps to take?

Currently, /boot is linked to the root of the ESP partition, where also the kernels reside. GRUB finds them there. GRUB's configuration file and modules are found in the grub subdirectory of the ESP. GRUB itself in the EFI/gentoo subdirectory.

This means that whenever a new kernel is compiled, I will have to mount the ESP, in order to update grub.cfg. Also, when GRUB itself receives an update (which happens less often). In all other situations I should't need the ESP when working from Gentoo, as it is only used during booting. Correct?

Right now, this is not the case because I have the kernels in the ESP. Therefore I want to move them to the Gentoo system partition, or maybe a separate boot partition.

If this sound right then the next question will be how to update /etc/fstab.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Fri Jul 31, 2020 9:26 am    Post subject: Reply with quote

So I see 4 options altogether, with a slight adaptation of Rod Smith's tutorial:
    1A: GRUB binary+configuration file+modules, binary kernels all on the ESP
    1B: GRUB binary+configuration file+modules on the ESP; binary kernels on a separate partition
    2: GRUB binary on the ESP; GRUB configuration file+modules, binary kernels on a separate partition
    3: GRUB binary on the ESP with a special prefix configuration file; second GRUB configuration file+modules, binary kernels on a separate partition
I'm now on 1A and want to move to 1B.

Notwithstanding the attractiveness of options 2 and 3. especially option 3 is interesting because maintenance would be very simple.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Fri Jul 31, 2020 9:40 am    Post subject: Reply with quote

Helena wrote:
... Currently, /boot is linked to the root of the ESP partition, ...

In other words, your ESP is mounted at /boot.


Helena wrote:
... GRUB itself in the EFI/gentoo subdirectory.

What you have in EFI/gentoo might be grub's bootloader payload. Grub itself (the program) is in
Code:
├── etc
│   ├── default
│   │   └── grub
│   └── grub.d
│       ├── 00_header
│       ├── 10_linux
│       ├── 20_linux_xen
│       ├── 30_os-prober
│       ├── 40_custom
│       ├── 41_custom
│       └── README
└── usr
    ├── bin
    │   ├── grub-editenv
    │   ├── grub-file
    │   ├── grub-fstest
    │   ├── grub-glue-efi
    │   ├── grub-kbdcomp
    │   ├── grub-menulst2cfg
    │   ├── grub-mkfont
    │   ├── grub-mkimage
    │   ├── grub-mklayout
    │   ├── grub-mknetdir
    │   ├── grub-mkpasswd-pbkdf2
    │   ├── grub-mkrelpath
    │   ├── grub-mkrescue
    │   ├── grub-mkstandalone
    │   ├── grub-render-label
    │   ├── grub-script-check
    │   └── grub-syslinux2cfg
    ├── lib
    │   └── grub
    ├── sbin
    │   ├── grub-bios-setup
    │   ├── grub-install
    │   ├── grub-macbless
    │   ├── grub-mkconfig
    │   ├── grub-ofpathname
    │   ├── grub-probe
    │   ├── grub-reboot
    │   ├── grub-set-default
    │   └── grub-sparc64-setup
    └── share
        ├── bash-completion
        ├── doc
        ├── grub
        ├── info
        └── man

As mentioned before, you can move the ESP's mountpoint to anywhere you want and use /boot for all the stuff that grub and debianutils' "make install" command want to put there.

You could start with modified https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT:
Code:
mount /dev/sda2 /mnt
grub-install --efi-directory=/mnt/efi
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Fri Jul 31, 2020 12:02 pm    Post subject: Reply with quote

charles17 wrote:
What you have in EFI/gentoo might be grub's bootloader payload. Grub itself (the program) is in
Code:
...

As mentioned before, you can move the ESP's mountpoint to anywhere you want and use /boot for all the stuff that grub and debianutils' "make install" command want to put there.

You could start with modified https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT:
Code:
mount /dev/sda2 /mnt
grub-install --efi-directory=/mnt/efi
Thx for pointing this out. It now seems feasible to modify my /etc/fstab, reinstall grub2 and do another make install. The updated fstab will contain:
    an entry / pointing to the system partition
    an entry /boot pointing to a separate smaller partition
    an entry /boot/efi pointing to the ESP
I will then have to use the revised install command:
Code:
grub-install --efi-directory=/boot/efi
Do you agree?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Fri Jul 31, 2020 12:29 pm    Post subject: Reply with quote

As long you keep it with /boot/efi you wouldn't change anything, since /boot/efi of course is inside /boot. And you can have /boot only once.

But you could use Alternative UEFI firmware location /boot/efi/EFI/BOOT/
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Sat Aug 01, 2020 6:34 am    Post subject: Reply with quote

Hurray! It works!
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3435

PostPosted: Sat Aug 01, 2020 6:38 am    Post subject: Reply with quote

Helena wrote:
Hurray! It works!

Congratulations. As this topic seems solved now, please add [SOLVED] to the title line in the first post.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1080
Location: Den Dolder, The Netherlands

PostPosted: Sun Aug 02, 2020 3:22 pm    Post subject: Reply with quote

Done. Thx again.

For the record, here is what I've found out (Note that this applies to UEFI/GPT only, and I've not checked Secure Boot):
  • In an initial install, mount the ESP to /boot/efi (this and following references where necessary preceded by /mnt/gentoo)
  • (create and) mount a separate partition for holding kernels to /boot
  • (create and) mount a large partition for holding everything else to /
  • install GRUB using the following command:
    Code:
    grub-install --efi-directory=/boot/efi
    (--target and --dev parameters don't seem necessary)
Of course this is only a minor addition to the Handbook which still applies.
Back to top
View user's profile Send private message
pietinger
Apprentice
Apprentice


Joined: 17 Oct 2006
Posts: 271
Location: Bavaria

PostPosted: Sun Aug 02, 2020 9:44 pm    Post subject: Reply with quote

Helena wrote:
For the record, here is what I've found out (Note that this applies to UEFI/GPT only, and I've not checked Secure Boot):
  • In an initial install, mount the ESP to /boot/efi (this and following references where necessary preceded by /mnt/gentoo)
  • (create and) mount a separate partition for holding kernels to /boot
  • (create and) mount a large partition for holding everything else to /
  • install GRUB using the following command:
    Code:
    grub-install --efi-directory=/boot/efi
    (--target and --dev parameters don't seem necessary)
Of course this is only a minor addition to the Handbook which still applies.

For the record, if you go exactly with the Handbook, you dont need a separate partition. This is all you need:
Step: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
Code:
# parted -a optimal /dev/sda
> mklabel gpt
> unit mib
> mkpart primary 1 128
> name 1 boot
> mkpart primary 128 4096
> name 2 swap
> mkpart primary 4096 -1
> name 3 root
> set 1 boot on
> q
# mkfs.fat -F 32 /dev/sda1
# mkswap /dev/sda2
# swapon /dev/sda2
# mkfs.ext4 /dev/sda3
# mount /dev/sda3 /mnt/gentoo
# mount /dev/sda1 /mnt/gentoo/boot

... and later
Step: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
Code:
! CHECK if GRUB_PLATFORMS="efi-64" is set in make.conf
# emerge  grub
# grub-install --target=x86_64-efi --efi-directory=/boot
# grub-mkconfig -o /boot/grub/grub.cfg


If you mount your ESP-partition to /boot you will have your kernels in the root of this partition and two directories: grub and efi:
Code:
 ~ # ll /boot/
insgesamt 9120
-rwxr-xr-x 1 root root   99513  1. Aug 01:18 config-5.7.12-gentoo
drwxr-xr-x 4 root root    4096 13. Mär 23:59 EFI
drwxr-xr-x 6 root root    4096  1. Aug 01:19 grub
-rwxr-xr-x 1 root root 2469775  1. Aug 01:18 System.map-5.7.12-gentoo
-rwxr-xr-x 1 root root 6754944  1. Aug 01:18 vmlinuz-5.7.12-gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum