Talk:EFI system partition

From ArchWiki
Revision as of 08:29, 20 April 2019 by Nl6720 (talk | contribs) (→‎Size of EFI partition: re, close)

Latest comment: 20 April 2019 by Nl6720 in topic Size of EFI partition

Size of EFI partition

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

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)Reply[reply]

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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
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)Reply[reply]
I tried to address some of the raised issues; see draft below. -- nl6720 (talk) 10:00, 14 March 2019 (UTC)Reply[reply]
The draft assumes that the ESP is set to /boot ("storing boot loaders"). Shouldn't that be mentioned? -- Alad (talk) 21:06, 14 March 2019 (UTC)Reply[reply]
UEFI boot loaders (the EFI binaries) are usually stored in the ESP, that doesn't mean that ESP needs to be mounted at /boot. -- nl6720 (talk) 21:24, 14 March 2019 (UTC)Reply[reply]
I split off file system stuff to #Format the partition (draft). -- nl6720 (talk) 12:40, 15 March 2019 (UTC)Reply[reply]
Last chance to raise any objections, otherwise I'm updating the page with the drafts below. -- nl6720 (talk) 13:44, 5 April 2019 (UTC)Reply[reply]
Drafts merged. Closing. -- nl6720 (talk) 08:29, 20 April 2019 (UTC)Reply[reply]

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. See also Partitioning#Choosing between GPT and MBR for the advantages of GPT in general.

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. For early and/or buggy UEFI implementations the size of at least 512 MiB might be needed.[2]

Format the partition (draft)

The UEFI specification mandates support for the FAT12, FAT16, and FAT32 file systems[3]. To prevent potential issues with other operating systems and also since the UEFI specification only mandates supporting FAT16 and FAT12 on removable media[4], it is recommended to use FAT32.

After creating the partition, format it as FAT32. To use the mkfs.fat utility, install dosfstools.

# mkfs.fat -F32 /dev/sdxY

If you get the message WARNING: Not enough clusters for a 32 bit FAT!, reduce cluster size with mkfs.fat -s2 -F32 ... or -s1; otherwise the partition may be unreadable by UEFI. See mkfs.fat(8) for supported cluster sizes.