Difference between revisions of "Talk:EFI system partition"

From ArchWiki
Jump to navigation Jump to search
(mount ESP to /efi: close)
(Wording in example layout table and size of EFI partition: move part on "remainder of the device" back to Talk:Installation guide)
Line 32: Line 32:
  
 
Regarding [[Installation_guide#Example_layouts]]:
 
Regarding [[Installation_guide#Example_layouts]]:
# even if  many users will understand remainder of the device as what is left after size of /dev/sdx1 and /dev/sdx3 are subtsructed from the size of the device, I think the order of the table might be confusing for some. Some people might set /dev/sdx2 to the size of the device minus size of /dev/sdx1, and then stumbled at where from 512 MiB, or larger, are to be found for /dev/sdx3. Either suggest the swap space as /dev/sdx2 and / as /dev/sdx3, or better explain the meaning of the remainder of the device for sdx2.
+
 
 
# As for the size of sdx1 for UEFI+GPT, I think 260-550 MiB are better than 260-512 MiB, as per [[EFI system partition#Create the partition]], which is referenced by [[partition#/boot]].
 
# As for the size of sdx1 for UEFI+GPT, I think 260-550 MiB are better than 260-512 MiB, as per [[EFI system partition#Create the partition]], which is referenced by [[partition#/boot]].
 
[[User:Regid|Regid]] ([[User talk:Regid|talk]]) 14:05, 29 December 2018 (UTC)
 
[[User:Regid|Regid]] ([[User talk:Regid|talk]]) 14:05, 29 December 2018 (UTC)
Line 53: Line 53:
  
 
:::::: I also question the usefulness of 550MB to trick mkfs. I noticed that approximately half-year ago several wiki articles related to this issue has switched to recommend 550MB, but i didn't bother to argue. Wiki should be helpful, but not assuming users cannot understand the -F 32 option and should not revert to give advices to fool utilities. Regarding other points. 1) This discussion page is no worse than other places to discuss this issue. 2) The wiki everywhere discusses partitioning by command line tools, at least at core articles related to installation and partitions. If someone decided to use automatic tools and by mistake created FAT16 EFI partition he can easily undo his mistake. --[[User:Mxfm|Mxfm]] ([[User talk:Mxfm|talk]]) 04:54, 5 February 2019 (UTC)
 
:::::: I also question the usefulness of 550MB to trick mkfs. I noticed that approximately half-year ago several wiki articles related to this issue has switched to recommend 550MB, but i didn't bother to argue. Wiki should be helpful, but not assuming users cannot understand the -F 32 option and should not revert to give advices to fool utilities. Regarding other points. 1) This discussion page is no worse than other places to discuss this issue. 2) The wiki everywhere discusses partitioning by command line tools, at least at core articles related to installation and partitions. If someone decided to use automatic tools and by mistake created FAT16 EFI partition he can easily undo his mistake. --[[User:Mxfm|Mxfm]] ([[User talk:Mxfm|talk]]) 04:54, 5 February 2019 (UTC)
 
:Using /dev/sdx2 for swap is questionable, it doesn't emphasize that swap is optional nor is it consistent with other articles like [[dm-crypt/Encrypting an entire system]]. If you have some better explanation for "remainder of the device" feel free to propose it. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 08:55, 30 December 2018 (UTC)
 
:: I was trying to say that a user that patitions his HD by following the table might do the following: look at first row in the table, and creates the EFI partition. Than continue with the 2nd row. So he creates a partition at the remainder of his HD. Now he comes to the 3rd row: where will he get 512 MiB, or larger? As for [[dm-crypt/Encrypting an entire system]], I might be wrong thinking that each partition is considered a separate device, so it doesn't matter if the swap space is before, or after, the / partition. [[User:Regid|Regid]] ([[User talk:Regid|talk]]) 12:41, 30 December 2018 (UTC)
 
 
::: Perhaps call it "Principal part of the device" instead. NB the term "remainder of the device" is often used for a separate {{ic|/home}} in other articles. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 21:33, 3 February 2019 (UTC)
 
  
 
:RE [[Special:Diff/568601]], "the linux-lts package has an installed size of 126.4 MB". Not all of that 126.4 MB is placed in {{ic|/boot}}. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 09:07, 14 March 2019 (UTC)
 
:RE [[Special:Diff/568601]], "the linux-lts package has an installed size of 126.4 MB". Not all of that 126.4 MB is placed in {{ic|/boot}}. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 09:07, 14 March 2019 (UTC)

Revision as of 21:05, 14 March 2019

mount ESP to /efi

Internet is gorged of people mounting ESP to /boot or /boot/efi but I can't find an example of people mounting ESP to /efi anywhere else than from this wiki page.

The only clue I have is this removed discussion: https://wiki.archlinux.org/index.php?oldid=532343#/boot/efi_-%3E_/efi

/efi/ If the boot partition /boot/ is maintained separately from the EFI System Partition (ESP), the latter is mounted here. Tools that need to operate on the EFI system partition should look for it at this mount point first, and fall back to /boot/ — if the former doesn't qualify (for example if it is not a mount point or does not have the correct file system type MSDOS_SUPER_MAGIC).

Mount and automount units for the EFI System Partition (ESP) are generated on EFI systems. The ESP is mounted to /boot, unless a mount point directory /efi exists, in which case it is mounted there. Since this generator creates an automount unit, the mount will only be activated on-demand, when accessed. On systems where /boot (or /efi if it exists) is an explicitly configured mount (for example, listed in fstab(5)) or where the /boot (or /efi) mount point is non-empty, no mount units are generated.

The current ArchWiki page is mentioning /efi only one time without any reference. Other pages about partitioning, UEFI, LVM, LUKS, dm-crypt, Virtualbox, rEFInd, etc. have very rare mentions of /efi or don't have any mentions at all.

I think the use of /efi is under documented and so under used and misunderstood.

Noraj (talk) 01:43, 15 January 2019 (UTC)

Is this a problem because you want us to not use it, or because you want more examples of us using it? FWIW, regarding other bootloader support, GRUB does not care in the slightest where your ESP is and in fact I have never mounted mine since the day I installed Linux on this laptop. I'm fairly sure that internet examples are mostly full of "it felt good". -- Eschwartz (talk) 03:22, 15 January 2019 (UTC)
I want more example of using it, I'm actually using a /efi mountpoint for my ESP on all my Arch installations, and I think this new method have quite some advantages so having more example about it on our wiki could be only good. Yeah most example of using /boot are due too people too lazy to pick anything else than the default choice. Noraj (talk) 12:10, 15 January 2019 (UTC)
There are not a lot of examples around the web using /efi because it's relatively new. As for the lack of examples with it in the wiki, that's because it's not the only supported mountpoint. Both /boot and /efi are valid, so the mountpoint is replaced with a pseudo-variable esp in wiki articles. The only place where a specific mountpoint is used is if the other one does not work for the setup. -- nl6720 (talk) 08:13, 15 January 2019 (UTC)
Can it be that /efi is due to Windows must have an EFI system partition, and must also have another partition that is the equivalent of Linux's /boot? This is my understanding of this wiki: Dual boot with Windows#UEFI systems. In addition, bootctl(1) from systemd-boot mentions /efi, /boot, and /boot/efi as defaults for its ''--path''. Regid (talk) 01:24, 17 January 2019 (UTC)
Windows split off the system partition to allow encrypting the rest of the system with BitLocker. I.e. the Windows equivalent of /boot must be encrypted, the same as with Linux (mostly).
The /efi mountpoint was created by systemd as a replacement for /boot/efi. That's all there is to it. -- nl6720 (talk) 13:26, 19 January 2019 (UTC)

Wording in example layout table and size of EFI partition

Moved from Talk:Installation guide. -- Alad (talk) 17:39, 13 March 2019 (UTC)

Regarding Installation_guide#Example_layouts:

  1. As for the size of sdx1 for UEFI+GPT, I think 260-550 MiB are better than 260-512 MiB, as per EFI system partition#Create the partition, which is referenced by partition#/boot.

Regid (talk) 14:05, 29 December 2018 (UTC)

I would like to propose an ESP size of 5 MiB (requires fat12 filesystem format), which works fine on any well-designed implementation of the UEFI spec, like my laptop, and elegantly covers the case where the EFI contains only a capable bootloader, which loads the kernel from another (ext4/btrfs/whatever) partition.
Anyway the page you linked makes it quite clear that 512 MiB is fine for any UEFI implementation, and "avoiding confusion" seems to be rather inferior compared to just instructing people to use mkfs.fat -F 32. -- Eschwartz (talk) 23:44, 29 December 2018 (UTC)
I'm not sure I understand your comment. Do you propose to add an mkfs.fat line to Installation guide#Format the partitions for a /boot partition? -- Alad (talk) 08:55, 30 December 2018 (UTC)
I'm saying we already do do so, in EFI system partition#Format the partition where we go into lots of detail about the best way to set up an ESP, why fat32 is not necessary but nevertheless is recommended, and the optimal size for one. None of this elaboration is suitable for the Installation guide, which does not even mention which filesystem type any of the example layouts uses. But we do explicitly state it "must" be fat32 in File systems#Create a file system which we link to immediately after the example layouts. -- Eschwartz (talk) 16:35, 30 December 2018 (UTC)
Yes, but just because of that content Regid has a point that the 260-512 example is confusing. I'd say, match it now by switching to a 550MiB example as per #Example layouts section draft below, which in the end only carries the recommendation from the subject articles into the installation guide. --Indigo (talk) 21:33, 3 February 2019 (UTC)
But the primary recommendation there is to use 512, and as I said I think it makes more sense to stick with what we already say, and recommend the use of mkfs.fat -F 32. I'm unclear why the article seems to be recommending the use of specific sizes merely to trick the mkfs.vfat command into selecting the right vfat version. -- Eschwartz (talk) 21:41, 3 February 2019 (UTC)
You paraphrased your reply to the last question very much; I did not get that you recommend that. In the linked subject articles I found mentions along the lines of "..at least 512 MiB. 550 MiB is recommended..". Hence, I restate my main point: this article should subsume recommendations from the other articles (and this is the wrong place to start discussing them), not make different ones. --Indigo (talk) 22:39, 3 February 2019 (UTC)
The 550 MiB recommendation is useful in case someone is creating and formatting the partitions with gparted or a similar tool, instead of doing it from the command line. Who knows what automagic those tools use... -- nl6720 (talk) 10:48, 4 February 2019 (UTC)
I also question the usefulness of 550MB to trick mkfs. I noticed that approximately half-year ago several wiki articles related to this issue has switched to recommend 550MB, but i didn't bother to argue. Wiki should be helpful, but not assuming users cannot understand the -F 32 option and should not revert to give advices to fool utilities. Regarding other points. 1) This discussion page is no worse than other places to discuss this issue. 2) The wiki everywhere discusses partitioning by command line tools, at least at core articles related to installation and partitions. If someone decided to use automatic tools and by mistake created FAT16 EFI partition he can easily undo his mistake. --Mxfm (talk) 04:54, 5 February 2019 (UTC)
RE Special:Diff/568601, "the linux-lts package has an installed size of 126.4 MB". Not all of that 126.4 MB is placed in /boot. -- nl6720 (talk) 09:07, 14 March 2019 (UTC)
I tried to address some of the raised issues; see draft below. -- nl6720 (talk) 10:00, 14 March 2019 (UTC)

Create the partition (draft)

The following two sections show how to create an EFI system partition (ESP).

Warning: The EFI system partition must be a physical partition in the main partition table of the disk, not under LVM or software RAID etc.
Note: It is recommended to use GPT since some firmwares might not support UEFI/MBR booting due to it not being supported by Windows.

To provide adequate space for storing boot loaders and other files required for booting, and to prevent interoperability issues with other operating systems[1] the partition should be at least 260 MiB and formatted with a FAT32 file system. For early and/or buggy UEFI implementations the size of at least 512 MiB might be needed.[2]