Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Do I need to make another separate EFI partition?

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
15 posts • Page 1 of 1
Author
Message
delizza
n00b
n00b
Posts: 4
Joined: Wed Aug 18, 2021 7:43 pm

Do I need to make another separate EFI partition?

  • Quote

Post by delizza » Wed Aug 18, 2021 7:53 pm

I was wondering if anyone can help me. Right now I have Manjaro and Windows installed on separate drives and I want to add Gentoo to the same drive as Manjaro. There is already an EFI partition and I'm not sure if I'm supposed to create another one for Gentoo or if they both share one EFI partition. Any advice is greatly appreciated :D
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Do I need to make another separate EFI partition?

  • Quote

Post by pietinger » Wed Aug 18, 2021 8:13 pm

delizza,

welcome to Gentoo forum !

delizza wrote:[...]There is already an EFI partition and I'm not sure if I'm supposed to create another one for Gentoo or if they both share one EFI partition.
You have to use the existant EFI partition. With UEFI you can have many bootable executables (bootloader, bootmanager, windows, linux-kernel) and selecting these in your UEFI-BIOS-menu. You may want to read these articles:
https://wiki.gentoo.org/wiki/EFI_stub
https://wiki.gentoo.org/wiki/EFI_System_Partition
https://wiki.gentoo.org/wiki/Efibootmgr
Top
delizza
n00b
n00b
Posts: 4
Joined: Wed Aug 18, 2021 7:43 pm

  • Quote

Post by delizza » Wed Aug 18, 2021 8:42 pm

Ok cool, that clears things up!

Thanks a bunch, hopefully I can make it through the installation without too many issues! :D
Top
OldTango
l33t
l33t
User avatar
Posts: 739
Joined: Sat Feb 21, 2004 5:08 pm
Contact:
Contact OldTango
Website

Re: Do I need to make another separate EFI partition?

  • Quote

Post by OldTango » Wed Aug 18, 2021 11:18 pm

pietinger wrote:delizza,

welcome to Gentoo forum !

delizza wrote:[...]There is already an EFI partition and I'm not sure if I'm supposed to create another one for Gentoo or if they both share one EFI partition.
You have to use the existant EFI partition. With UEFI you can have many bootable executables (bootloader, bootmanager, windows, linux-kernel) and selecting these in your UEFI-BIOS-menu. You may want to read these articles:
AFAIK, the UEFI specification puts no limits on how many ESPs that can be present on a single computer or hard disk. In theory you can have an ESP on every hard disk in a computer. Whether the hard wares UEFI firmware will support it is another matter.

However, Windows10 for sure, officially supports a single ESP per disk and possibly only one per system. I have not tested any Windows OS except 10. During a Windows install if it detects an ESP it will use that ESP and add the necessary directories and files required to boot Windows.

So while you can (IN THEORY) have more than one ESP on a disk or system, it's simpler to have just one and easier to manage as well.

The only question is how big should the ESP be. In a single OS system one might get by with one as small as 64MB or less. Multi-boot systems may need a larger ESP.

I have found that on a Gentoo system that is booting only Gentoo using multiple stub kernels. I really don't need an ESP larger than 128MB.

Best Tango..... :)
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Thu Aug 19, 2021 8:55 am

delizza, the design purpose of the EFI partition is to hold a boot manager program (and other stuff that's relevant/useful); UEFI runs that boot manager, and you use it to choose what you boot. So, if there's just one system, and that system acts as a boot manager - such as a linux kernel with the EFI stub - you can boot straight to it. If you have several systems, you might have a boot manager such as GRUB or rEFInd presenting you with a menu of possible systems. But you should have only one EFI partition.

Of course, that design principle doesn't mean you can't do other stuff, such as using the BIOS boot device list to choose a system, which is one way to boot multiple systems, by creating efibootmgr records for each.

You can have multiple boot managers, some of which refer to the others; annoyingly my hp laptop has and "hp" boot manager that gives me options of Windows, Windows recovery and hp diagnostics (which AFAIK I could equally well select within Windows, but perhaps that just sets options that control the hp manager's actions), whereas I use GRUB. So now I have a GRUB menu with a line for linux, and a line for Windows that actually takes me to the hp manager, and that in turn lets me boot Windows. I suspect I could cut the hp manager out if I could be bothered to find the actual Windows boot information, but I so rarely use Windows. But the point is, all these boot managers sit in different directories in the one EFI partition.

(Aside: if you have a RAID-1 setup, would UEFI BIOS see two EFI partitions, and would it make a sensible choice? I guess that's a variant of the BIOS boot device list. Not a setup I've tried.)
Greybeard
Top
delizza
n00b
n00b
Posts: 4
Joined: Wed Aug 18, 2021 7:43 pm

  • Quote

Post by delizza » Thu Aug 19, 2021 6:01 pm

Thanks for all the replies!

I managed to add Gentoo to Grub and successfully booted, but unfortunately it said it can't find UUID and couldn't mount the root filesystem. I'm guessing I made a typo in the fstab file. I'll see if I can fix that when I get some free time :D
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Aug 19, 2021 7:36 pm

delizza,

Its the kernel, kernel command line or initrd if root failed to mount.
/etc/fstab is on the root partition, so can't be read until root is mounted.

You mentioned UUID.
UUID is a property of filesystems. You must have the userspace mount command to read UUIDs. That in turn means that you must have an initrd to hold the mount command, as the kernel cannot work with UUIDs on its own.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
sitquietly
Apprentice
Apprentice
User avatar
Posts: 153
Joined: Sat Oct 23, 2010 9:20 pm
Location: On the Wolf River, Tennessee

  • Quote

Post by sitquietly » Thu Aug 19, 2021 7:37 pm

What Goverp said. Just to give a use case example:

I keep one reliable (FreeBSD) operating system on the main ssd of each of my computers. That ssd has its own efi partition. Another ssd on each computer is used to boot Linux systems, always with Gentoo OpenRC (the other reliable operating system) and possibly one or two other distros. That Linux ssd has its own efi partition. When I want to boot something other than the default I've set in my BIOS I use the BIOS's boot selector menu.

The advantage of having an efi partition on each bootable disk is that I'm free to replace or reformat that disk without losing the ability to boot the remaining disk.

The BIOS on my board (Gigabyte) works well this way. It always shows in the boot menu the names of all operating systems from all efi partitions. When I remove a distro I remove its entry in the bios boot menu by running efibootmgr, and remove its folder from the efi partition /boot/efi/EFI.

I don't know if other boards BIOS's are as tolerant of having multiple efi partitions. I find the one efi partition per bootable disk to be very handy for me because I screw around a lot with different OS's
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Fri Aug 20, 2021 8:11 am

delizza,

As Neddy Seagoon says, as UUID is a property of the filesystem, the kernel needs to be loaded before it can read it, which means you need an initrd.
However, there's an alternative called PARTUUID which is a property of the partition (as you might guess), and the kernel can handle that on the command line.

For example the following is a valid kernel command linux that does not need an initrd:

Code: Select all

linux rootfstype=f2fs root=PARTUUID=0ee629f8-ab10-4f2d-b1f3-83e61ed7966f
You get PARTUUIDs (and UUIDs) with the blkid command or "lsblk -f -o +partuuid".
Note that UUIDs of any sort should always be in lower case. Note also that, confusingly, GRUB uses UUIDs, not PARTUUIDs to identify where it finds kernels by default. The grub-mkconfig info page suggests this behaviour can be changed, but I've not tried it.
Greybeard
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56108
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Aug 20, 2021 4:38 pm

Goverp,

The knobs are in /etc/default/grub

...

Code: Select all

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
# yep its newspeak double negatives

#  Do not use UUID do use PARTUUID
GRUB_DISABLE_LINUX_UUID=true

GRUB_DISABLE_LINUX_PARTUUID=false
...
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
delizza
n00b
n00b
Posts: 4
Joined: Wed Aug 18, 2021 7:43 pm

  • Quote

Post by delizza » Fri Aug 20, 2021 6:13 pm

After reconfiguring and recompiling the kernel everything seems to be working fine!

Thanks everyone for helping :D
Top
sitquietly
Apprentice
Apprentice
User avatar
Posts: 153
Joined: Sat Oct 23, 2010 9:20 pm
Location: On the Wolf River, Tennessee

  • Quote

Post by sitquietly » Sat Aug 21, 2021 2:23 am

NeddySeagoon wrote:You mentioned UUID...
UUID is a property of filesystems. You must have the userspace mount command to read UUIDs. That in turn means that you must have an initrd to hold the mount command, as the kernel cannot work with UUIDs on its own.
To clarify:

I always use UUID=... in my fstab and do not use an initrd. I also always add all of the filesystems required to mount the partitions listed in fstab to the kernel (not as modules). I haven't used an initrd in years. I've used OpenBSD quite a bit where there is no such thing as kernel modules. Also use UUID there.

To clarify further:

by UUID I mean the number listed for the partition under /dev/disk/by-uuid
Top
bammbamm808
Guru
Guru
User avatar
Posts: 558
Joined: Sun Dec 08, 2002 7:09 am
Location: Hawaii

Re: Do I need to make another separate EFI partition?

  • Quote

Post by bammbamm808 » Sat Aug 21, 2021 5:36 am

pietinger wrote:delizza,

welcome to Gentoo forum !

delizza wrote:[...]There is already an EFI partition and I'm not sure if I'm supposed to create another one for Gentoo or if they both share one EFI partition.
You have to use the existant EFI partition. With UEFI you can have many bootable executables (bootloader, bootmanager, windows, linux-kernel) and selecting these in your UEFI-BIOS-menu. You may want to read these articles:
https://wiki.gentoo.org/wiki/EFI_stub
https://wiki.gentoo.org/wiki/EFI_System_Partition
https://wiki.gentoo.org/wiki/Efibootmgr
I have run with multiple efisp for different OSs, and had them all use just one. Either way works, but I had to specify disks for each efivar entry when I had multiple. Read up on efibootmgr for more details.
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 4070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Sat Aug 21, 2021 6:09 am

sitquietly wrote:...
I always use UUID=... in my fstab and do not use an initrd. I also always add all of the filesystems required to mount the partitions listed in fstab to the kernel (not as modules). I haven't used an initrd in years. I've used OpenBSD quite a bit where there is no such thing as kernel modules. Also use UUID there.

To clarify further:

by UUID I mean the number listed for the partition under /dev/disk/by-uuid
To clarify further:
You can use UUID, PARTUUID, LABEL, PARTLABEL, /dev/foo, server:/directory and probably others in /etc/fstab, because that's processed after the kernel has located its rootfs (since /etc/fstab is on said rootfs).

But the kernel command line "rootfs=" is much more limited, (see this post); in particular it doesn't allow UUID or simple LABEL; for those you need an initrd.
Greybeard
Top
sitquietly
Apprentice
Apprentice
User avatar
Posts: 153
Joined: Sat Oct 23, 2010 9:20 pm
Location: On the Wolf River, Tennessee

  • Quote

Post by sitquietly » Sat Aug 21, 2021 6:41 pm

Goverp wrote:
sitquietly wrote:...
I always use UUID=... in my fstab
But the kernel command line "rootfs=" is much more limited ... in particular it doesn't allow UUID or simple LABEL; for those you need an initrd.
Oh! Yes, of course. 8) Thank you.
Top
Post Reply

15 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic