You are not logged in.

#1 2015-01-05 00:16:48

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Why does Arch suggest /boot for $esp mount point?

Hi all,

Something has been bugging me, and I can't figure out online why this is the case. Arch always suggests to mount the $esp on /boot, and by reading the Beginner's Guide/Installation wiki pages (and forums), it looks like the reasons are:
- gummiboot upstream expects it there
- pacman can only update kernels in /boot

Other distributions suggest to mount the $esp on /boot/efi, and this has the good effect, that all files of distributions are located in subfolders ($esp/EFI/opensuse/, for example), and are not littering the root $esp folder. If every distribution did what Arch does, then on a multi-distro the root folder of the $esp would have every single kernel/fallback img.

I noticed the FHS doesn't have a standard mount point/folder for the $esp, either.

Is there another reason that Arch suggests this?

Thanks


There is no spoon in Arch...

Offline

#2 2015-01-05 00:50:15

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: Why does Arch suggest /boot for $esp mount point?

Well, it's simpler for someone who's just coming to Arch and has to manually do all of the things that an installer did for them in the other distros. I know it would have confused me to have a /boot/efi/EFI/gummiboot instead of a /boot/EFI/gummiboot. But you can set up your $esp any way you want if you're willing to put the time into configuring it. Personally, I found that I have fewer problems if I do it the way the wiki tells me to. And if I get a wild hair up my ass and deviate from the wiki, it's easier for me to find and fix my error(s) if they happen.

BTW, I don't think that's the official line from the devs.... wink

Offline

#3 2015-01-05 01:03:48

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Why does Arch suggest /boot for $esp mount point?

Arch always suggests to mount the $esp on /boot, and by reading the Beginner's Guide/Installation wiki pages (and forums), it looks like the reasons are:
- gummiboot upstream expects it there
- pacman can only update kernels in /boot

Unlike Linux Mint, OpenSuSE, Fedora, Ubuntu, etc. Arch doesn't install GRUB and copy over the EFI binary images as part of an automatic installation process.

It's true that the gummiboot installer expects the ESP to be mounted at /boot, and I suspect many Arch users just gravitate toward gummiboot, given that a) it's beautifully simple and stupidly easy to install compared to GRUB and rEFInd, and b) it doesn't require boot files to be split between two separate partitions for no discernible reason. This keeps things simple for users who need a separate boot partition anyway---like those with encrypted root partitions or complex RAID setups.

For what it's worth, you can organize your ESP any way you see fit---your boot manager of choice will just recursively scan the entire partition for all EFI binaries anyway, and the organization of the partition doesn't keep it from being mounted at /boot.

Offline

#4 2015-01-05 21:46:40

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Why does Arch suggest /boot for $esp mount point?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2015-01-06 17:09:11

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: Why does Arch suggest /boot for $esp mount point?

Thanks for the link, it's an interesting read, and I like the fact that they are suggesting distro & kernel specific folders. Shame that Arch's suggested way of using the $esp involves it's kernels being placed at its root folder; I'll read up and see how I can configure this to not be the case.


There is no spoon in Arch...

Offline

#6 2015-01-06 17:39:19

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: Why does Arch suggest /boot for $esp mount point?

kcy29581 wrote:

Hi all,
Other distributions suggest to mount the $esp on /boot/efi, and this has the good effect, that all files of distributions are located in subfolders ($esp/EFI/opensuse/, for example), and are not littering the root $esp folder. If every distribution did what Arch does, then on a multi-distro the root folder of the $esp would have every single kernel/fallback img.

I don't get this. If I mount $esp at /boot/efi how does this make files of different distributions go to $esp/EFI/<distro>. This would then be /boot/efi/EFI/<distro>. If yout mount $esp on /boot it would be /boot/EFI/<distro>. Not much of a difference except that when not mounting on /boot you have to tell the bootloader to look at your /boot partition which is then not on the efi-partition or make sure you copy your kernel files over to the efi partition everytime they are updated.

In fact I mount $esp to /boot/efi/ because I use refind and it expects the efi partition to be mounted there. I then have my kernel files still at boot so they don't clutter my efi partition and maded refind load them from there.


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#7 2015-01-06 18:39:57

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: Why does Arch suggest /boot for $esp mount point?

dice wrote:
kcy29581 wrote:

Hi all,
Other distributions suggest to mount the $esp on /boot/efi, and this has the good effect, that all files of distributions are located in subfolders ($esp/EFI/opensuse/, for example), and are not littering the root $esp folder. If every distribution did what Arch does, then on a multi-distro the root folder of the $esp would have every single kernel/fallback img.

I don't get this. If I mount $esp at /boot/efi how does this make files of different distributions go to $esp/EFI/<distro>. This would then be /boot/efi/EFI/<distro>. If yout mount $esp on /boot it would be /boot/EFI/<distro>.

If you mount $esp on /boot, then every modification you make on /boot within the distribution automatically gets placed on the $esp root folder; since almost all distributions place the kernels and initrd images there, the $esp root folder will have al of them. If two distributions use the same naming scheme for either kernels or initrd images, then they can get overwritten easily.

dice wrote:

In fact I mount $esp to /boot/efi/ because I use refind and it expects the efi partition to be mounted there. I then have my kernel files still at boot so they don't clutter my efi partition and maded refind load them from there.

I also mostly use refind most of the time, for this exact reason. I don't want my $esp (not just the root folder) cluttered with unnecessary files. Gummiboot's method only works if distros keep the /boot folder free of files, and use directories to cleanly categorise kernels, etc. I have yet to find a distribution that does this.


There is no spoon in Arch...

Offline

#8 2015-01-06 20:16:39

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Why does Arch suggest /boot for $esp mount point?

Gummiboot's method only works if distros keep the /boot folder free of files, and use directories to cleanly categorise kernels, etc. I have yet to find a distribution that does this.

"Works" is relative here. Gummiboot doesn't do things the way you want; that's fine, because a) you don't use it; and b) you can always organize your EFI images as you see fit. Gummiboot will still accomplish its intended task: booting a working Linux kernel from an EFI image. The Gummiboot Arch wiki page states that the ESP must be mounted at /boot for it to work, but that's it. The UEFI wiki page doesn't mention mounting at boot at all---only to /boot/efi. The EFISTUB page mentions that if you don't mount to /boot, you need to mount the ESP somewhere and manually copy the images to the ESP. The GRUB wiki page doesn't make statements on where the ESP should be mounted, but does make it clear that GRUB needs to be told where the ESP is mounted during installation. The Beginner's Guide does recommend mounting the ESP to /boot, and then links to another page with more information.

Reading the Beginner's Guide without following the links may give the impression that mounting to /boot is something of a requirement, but it depends on the use case.You have four options when booting from UEFI: rEFInd, Gummiboot, GRUB and  EFISTUB. The first requires the ESP to be mount at /boot/efi, like it or not. The second requires it to be mounted at /boot, like it or not. The latter two have no strict requirements of where the ESP be mounted, but mounting anywhere other than /boot requires extra work on the part of the user. Yes, if you mount the ESP to /boot and run multiple distributions then the kernel images are still going to clutter the /boot directory, which is exactly what happens if you share a /boot partition between distributions no matter what (and as I alluded to earlier, there are cases in which this is necessary). UEFI has nothing to do with that, and it's one reason that each distribution has its own naming conventions for its kernel image (a Linux kernel built from source will always be called "bzImage" regardless of the distribution its built on). Arguably, none of that matters unless you're manually moving and deleting kernel images and get confused about which one is which---a case that almost never arises nowadays, and should never arise for the typical desktop user.

Offline

#9 2015-01-06 21:46:53

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: Why does Arch suggest /boot for $esp mount point?

IMO a big advantage of NOT putting the kernel files to the efi partition is when dual booting with windows it cannot mess around with them. You never know what windows is doing especially when it is doing updates...

Regarding refind I actually don't think it is a real hard requirement to mount $esp at /boot/efi because you could just manually copy the necessary files to the esp. The installer script shipped with refind doesn't work if esp is mounted elsewhere though.
I don't mount my efi partition at boot time. I only mount it when I need to change things.

Last edited by dice (2015-01-06 21:47:54)


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#10 2015-01-08 12:19:35

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Why does Arch suggest /boot for $esp mount point?

kcy29581 wrote:

Thanks for the link, it's an interesting read, and I like the fact that they are suggesting distro & kernel specific folders. Shame that Arch's suggested way of using the $esp involves it's kernels being placed at its root folder; I'll read up and see how I can configure this to not be the case.

mount $esp to /totallynottherealboot
symlink/bindmount/whatever /boot to /totallynottherealboot/archlinux-bhla


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#11 2015-01-08 15:53:24

JayCeeEhm
Member
Registered: 2012-02-29
Posts: 9

Re: Why does Arch suggest /boot for $esp mount point?

First I do my own install of syslinux and refind and do not let arch control them.

Second I mount my boot partition to /EFI then bind /boot to /EFI/efi/arch this makes everything look correct according to refind's requirements because the arch files are in /efi/arch when booted into refind and arch will update my boot images in /boot when it runs a system update on my kernel and initrd.img.

Here are the pertinent fstab entries if the above explanation is not clear enough

# /dev/sda1 LABEL=EFI
UUID=31DA-1B2A	 /EFI      		vfat      	rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso88591,shortname=mixed,errors=remount-ro,discard	0 2

# /EFI/efi/arch
/EFI/efi/arch		/boot     	none      	rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso88591,shortname=mixed,errors=remount-ro,bind	0 0

Offline

#12 2015-01-11 08:05:08

kcy29581
Member
From: CA
Registered: 2004-12-23
Posts: 231

Re: Why does Arch suggest /boot for $esp mount point?

Mr.Elendig wrote:
kcy29581 wrote:

Thanks for the link, it's an interesting read, and I like the fact that they are suggesting distro & kernel specific folders. Shame that Arch's suggested way of using the $esp involves it's kernels being placed at its root folder; I'll read up and see how I can configure this to not be the case.

mount $esp to /totallynottherealboot
symlink/bindmount/whatever /boot to /totallynottherealboot/archlinux-bhla

I think I got this, the way I like it now, thanks! Looks like bind mount will serve me well, and keep the $esp free of clutter. Thanks. smile

The EFISTUB Arch wiki page discusses bind mounts as well, which also helped.


There is no spoon in Arch...

Offline

Board footer

Powered by FluxBB