Linux mint efi partition size

EFI system partition

The EFI system partition (also called ESP) is an OS independent partition that acts as the storage place for the EFI bootloaders, applications and drivers to be launched by the UEFI firmware. It is mandatory for UEFI boot.

This article or section is a candidate for moving to Unified Extensible Firmware Interface#UEFI drivers.

The UEFI specification mandates support for the FAT12, FAT16, and FAT32 file systems (see UEFI specification version 2.8, section 13.3.1.1), but any conformant vendor can optionally add support for additional file systems; for example, the firmware in Apple Macs supports the HFS+ file system.

Contents

Check for an existing partition

If you are installing Arch Linux on an UEFI-capable computer with an installed operating system, like Windows 10 for example, it is very likely that you already have an EFI system partition.

To find out the disk partition scheme and the system partition, use fdisk as root on the disk you want to boot from:

The command returns:

  • The disk’s partition table: it indicates Disklabel type: gpt if the partition table is GPT or Disklabel type: dos if it is MBR.
  • The list of partitions on the disk: Look for the EFI system partition in the list, it is usually at least 100 MiB in size and has the type EFI System or EFI (FAT-12/16/32) . To confirm this is the ESP, mount it and check whether it contains a directory named EFI , if it does this is definitely the ESP.

If you found an existing EFI system partition, simply proceed to #Mount the partition. If you did not find one, you will need to create it, proceed to #Create the partition.

Create the partition

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

To provide adequate space for storing boot loaders and other files required for booting, and to prevent interoperability issues with other operating systems[1][2] 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.[3]

GPT partitioned disks

EFI system partition on a GUID Partition Table is identified by the partition type GUID C12A7328-F81F-11D2-BA4B-00A0C93EC93B .

Choose one of the following methods to create an ESP for a GPT partitioned disk:

  • fdisk: Create a partition with partition type EFI System .
  • gdisk: Create a partition with partition type EF00 .
  • GNU Parted: Create a partition with fat32 as the file system type and set the esp flag on it.

Proceed to #Format the partition section below.

MBR partitioned disks

EFI system partition on a Master Boot Record partition table is identified by the partition type ID EF .

Choose one of the following methods to create an ESP for a MBR partitioned disk:

  • fdisk: Create a primary partition with partition type EFI (FAT-12/16/32) .
  • GNU Parted: Create a primary partition with fat32 as the file system type and set the esp flag on it.

Proceed to #Format the partition section below.

Format the partition

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

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

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.

Читайте также:  Астра линукс репозиторий cd rom

Mount the partition

The kernels, initramfs files, and, in most cases, the processor’s microcode, need to be accessible by the boot loader or UEFI itself to successfully boot the system. Thus if you want to keep the setup simple, your boot loader choice limits the available mount points for EFI system partition.

Typical mount points

The simplest scenarios for mounting EFI system partition are:

  • mount ESP to /efi and use a boot loader which is capable of accessing the kernel(s) and initramfs image(s) that are stored elsewhere (typically /boot). See Arch boot process#Boot loader for more information on boot loader requirements and capabilities.
  • mount ESP to /boot . This is the preferred method when directly booting an EFISTUB kernel from UEFI or booting it via a boot manager like systemd-boot.
  • mount ESP to /efi and additionally mount an «Extended Boot Loader Partition» (XBOOTLDR) to /boot . This can be useful when a previously created ESP is too small to hold multiple boot loaders and/or kernels but the ESP cannot be easily resized (such as when installing Linux after Windows to dual boot). This method is supported by at least systemd-boot.

Alternative mount points

If you do not use one of the simple methods from #Typical mount points, you will need to copy your boot files to ESP (referred to hereafter as esp ).

Furthermore, you will need to keep the files on the ESP up-to-date with later kernel updates. Failure to do so could result in an unbootable system. The following sections discuss several mechanisms for automating it.

Using bind mount

Instead of mounting the ESP itself to /boot , you can mount a directory of the ESP to /boot using a bind mount (see mount(8) ). This allows pacman to update the kernel directly while keeping the ESP organized to your liking.

Just like in #Alternative mount points, copy all boot files to a directory on your ESP, but mount the ESP outside /boot . Then bind mount the directory:

After verifying success, edit your Fstab to make the changes persistent:

Using systemd

Systemd features event triggered tasks. In this particular case, the ability to detect a change in path is used to sync the EFISTUB kernel and initramfs files when they are updated in /boot/ . The file watched for changes is initramfs-linux-fallback.img since this is the last file built by mkinitcpio, to make sure all files have been built before starting the copy. The systemd path and service files to be created are:

Then enable and start efistub-update.path .

Using filesystem events

Filesystem events can be used to run a script syncing the EFISTUB Kernel after kernel updates. An example with incron follows.

In order to use this method, enable the incrond.service .

Using mkinitcpio hook

Mkinitcpio can generate a hook that does not need a system level daemon to function. It spawns a background process which waits for the generation of vmlinuz , initramfs-linux.img , and initramfs-linux-fallback.img before copying the files.

Add efistub-update to the list of hooks in /etc/mkinitcpio.conf .

Using mkinitcpio preset

As the presets in /etc/mkinitcpio.d/ support shell scripting, the kernel and initramfs can be copied by just editing the presets.

Replacing the above mkinitcpio hook

Edit the file /etc/mkinitcpio.d/linux.preset :

To test that, just run:

Another example

Using pacman hook

A last option relies on the pacman hooks that are run at the end of the transaction.

The first file is a hook that monitors the relevant files, and it is run if they were modified in the former transaction.

The second file is the script itself. Create the file and make it executable:

Troubleshooting

ESP on software RAID1

It is possible to make the ESP part of a RAID1 array, but doing so brings the risk of data corruption, and further considerations need to be taken when creating the ESP. See [8] and [9] for details and UEFI booting and RAID1 for an in-depth guide with a solution.

The key part is to use —metadata 1.0 in order to keep the RAID metadata at the end of the partition, otherwise the firmware will not be able to access it:

Источник

Размер раздела под EFI

Пробовал поставить Дебиан с загрузкой через EFI. Установщик при автоматической разметке диска просит под EFI полгига, я дал сто мегабайт. После установки в /boot/efi занято сто с копейками килобайт под единственный файл груба. Вопрос: сколько и главное, нафига под этот EFI раздел нужно? Есть ли какие-то официальные рекомендации? А то я теряюсь в догадках, то ли под раздел и мегабайта за глаза хватит, то ли при каком ни будь там обновлении вдруг все сто могут понадобиться.

Читайте также:  Перенаправление вывода linux bash

На всякий случай. Мало ли, какие файлы ты туда будешь класть. Бывают разные загрузчики системы для UEFI. Но, полгига, конечно, всё равно вряд ли нужно.

Стандартный размер раздела EFI составляет 100 МБ.

полгига много, но я когда-то там хранил PartedMagic
а если чисто для загрузки — то 200 мегабайт для использования также для /boot хватает, если /boot отдельно, то и ста хватит
Если linux-only — то 50 за глаза

Не слушай наркоманов — 250-300 это минимум. Лично моё ядро 200мб занимает (да да я знаю что голое самобутабельное ядро 2мб).

Больше 100 никогда не делал. ЕМНИП максимум было занято 30%.

Если туда класть только GRUB, то вполне достаточно несколько мегабайт, но я бы, раз уж есть раздел под это, использовал его и как /boot для ядер, чтобы держать их вне LVM и тд, а для этого места уже побольше нужно. 100 мегабайт пожалуй разумный компромисс, при размере современных носителей это немного, но всё нужное для загрузки в разумных пределах спокойно влезет.

По спекам — 512 мегабайт, но можно сделать и меньше.

Для груба ведь отдельный раздел 2 мегабайта положен, отдельно от EFI идёт.

Это если разметка GPT, но загрузка через старый BIOS только, по-моему.

спека такая. а дебиан не винда, он понимает, что бывают другие ОСи и не затирает все чужое нахрен.

Источник

EFI system partition (Русский)

Системный раздел EFI (также называемый ESP или EFISYS) представляет собой физический раздел в формате FAT32 (в основной таблице разделов диска, а не под LVM или программным RAID и т.д.), откуда прошивка UEFI запускает загрузчик и приложение UEFI.

Это независимый от ОС раздел, который служит местом хранения загрузочных устройств EFI и приложений, которые будут запускаться с помощью прошивки EFI. Это необходимо для загрузки UEFI.

Contents

Создание раздела

В следующих двух разделах показано, как создать системный раздел EFI (ESP).

Рекомендуется сохранять размер ESP на 512 Мбайт, хотя меньшие/большие размеры тоже приветствуются. [1]

Согласно примечанию Microsoft[2], минимальный размер для системного раздела EFI (ESP) будет составлять 100 МБ, хотя это не указано в спецификации UEFI. Обратите внимание, что для дисков расширенный формат 4K Native drives (4 КБ на сектор) размер составляет не менее 256 Мбайт, поскольку это минимальный размер раздела дисков FAT32 (рассчитанный как размер сектора (4 КБ) x 65527 = 256 Мбайт), из-за ограничений файловой системы FAT32.

Разметка дисков GPT

Выберите один из следующих способов создания ESP для диска GPT с разделами:

  • fdisk/gdisk: Создайте раздел с типом раздела EFI System ( EFI System в fdisk или EF00 в gdisk). Перейдите к разделу #Форматирование раздела ниже.
  • GNU Parted: Создайте раздел FAT32 и в Parted установите/активируйте флаг boot (не флаг legacy_boot ) на этом разделе. Перейдите к разделу #Монтирование раздела ниже.

Разметка дисков MBR

Создайте раздел с типом раздела EFI System, используя fdisk. Перейдите к #Форматирование раздела.

Форматирование раздела

После создания ESP вы должны форматировать его как FAT32:

Если вы использовали GNU Parted выше, тогда раздел уже должен быть отформатирован.

Если вы получили сообщение WARNING: Not enough clusters for a 32 bit FAT! , уменьшите размер кластера с помощью команды mkfs.fat -s2 -F32 . или -s1 ; иначе раздел может быть нечитаемым UEFI.

Монтирование раздела

This article or section needs expansion.

В случае EFISTUB файлы ядра и initramfs должны храниться в системном разделе EFI. Для простоты вы также можете использовать ESP в качестве самого раздела /boot вместо отдельного раздела /boot для загрузки EFISTUB. Другими словами, после создания и форматирования системного раздела EFI, как указано выше, просто смонтируйте на /boot .

Известные вопросы

ESP на RAID

Можно сделать часть ESP массива RAID1, но при этом возникает риск повреждения данных, и при создании ESP необходимо учитывать дополнительные соображения. Для получения допольнительной информации смотрите [3] и [4].

Советы и хитрости

Использование bind монтирования

Вместо того, чтобы устанавливать ESP на /boot , вы можете подключить каталог ESP к /boot с помощью bind монтирования (смотрите mount(8) ). Это позволяет pacman обновлять ядро напрямую, сохраняя при этом организацию ESP по своему вкусу.

Как и в EFISTUB#Альтернативные точки монтирования для ESP [ссылка недействительна: раздел не найден] , скопируйте все загрузочные файлы в каталог вашего ESP, но смонтируйте ESP вне /boot (например, /esp ). Затем привяжите смонтированный раздел к каталогу:

Читайте также:  Installing wkhtmltopdf on linux

После проверки успеха отредактируйте свой Fstab, чтобы изменения были постоянными:

Источник

Linux Mint Forums

Welcome to the Linux Mint forums!

[Linux Mint 19 + Cinnamon] Manual install: Correct Partition sizes, Partition Order, File System types, and Encryption..

[Linux Mint 19 + Cinnamon] Manual install: Correct Partition sizes, Partition Order, File System types, and Encryption..

Post by iunlock » Tue Oct 16, 2018 1:58 am

1024GB for Linux, nothing else.)

  • 24GB RAM
  • I am really OCD.

Instead of installing LM19 the default way of «Erase disk and install Linux Mint*,» I would like to install it manually via «Something else,» option so that I can:

  • . manage the swap area to my desired size. (I don’t need 24GB of swap area. Is 1GB enough? I don’t use hibernate, sleep etc. )
  • . possibly set aside some unallocated space for provisioning? (Even necessary for SSD health with newer drives?) Update: The answer is NO. Newer SSD’s come already provisioned from the factory so unless you plan to provision 10%, in my case 100GB which is unreasonable and irrelevant to my usage scenario, don’t bother provisioning.)
  • . Encrypt the partitions / volumes that need to be encrypted.

Can someone please confirm the following and verify that the:

1. Partition Sizes,
2. Partition Order,
3. Mount points,
4. File Type(s)

. are all correct for a Manual Install?

=======================copy/paste================================

  • Partition 1: boot /efi (512MB) -> fat32?

+ Type for the new partition: Primary
+ Location: Beginning of this space

  • Partition 2: boot (732MB) -> ext4 or ext2?
  • Partition 3: main partition (rest of what’s available) -> ext4
  • Partition 4: swap (1GB) -> swap area

==========================end==================================

Questions:
The reason I have listed (boot /efi) and (boot) + the partition sizes shown is because that is what it showed in ‘gparted’ on my default* (Erase disk and install Linux Mint) install, therefore I had just mimicked that. Is having both even necessary?

When creating the boot partition, should I keep it ext4 (journaled) or ext2 (not journaled)? The boot partition doesn’t need to be journaled correct? If so, I’m curious as to why by default LM19 creates the /boot as ext4 if it doesn’t need to be journaled and why some people say to set it to ext2 since it does not need to be journaled?

* Please see the attached picture(s) of the gparted screen shot of my default* install. You’ll see that the first two partitions are boot/efi (fat32) and the second partition as /boot (ext4). Also, the swap area is nowhere to be seen as it’s hidden within the main encrypted volume, which is why I am not able to resize it.

It is to my understanding that only the boot /EFI needs to be first in order. Correct?

Encryption:
If I’m wanting to Encrypt my Home folder, should anything else be encrypted as well or is there no need to encrypt other non essential partitions such as the /boot etc. ?

Is it best to Encrypt everything or to leave everything unencrypted and to just encrypt individual folders within the system?

I’m aware that this is personal preference with the con’s of encrypting your drive, potentially making it difficult for when it comes to data recovery, but I was just curious what method some of you who do encrypt use.

For the other question specifically regarding encryption and swap area, please see the 3rd post below titled:
[Linux Mint 19 + Cinnamon] How to resize swap area on an encrypted volume?

Thanks in advance to those that can shed light on this. I really appreciate it very much. Upon my hours of researching this, there are so many ways around the mountain, but all I’d like for me and for others who may be seeking this info, is a clean, basic, straight forward and concise answer for a basic manual install.

Would you be able to please copy/paste the partition info above, make edits and reply as I’ll create it in that order when performing the manual install.

* I’ll update the OP accordingly for those who may be seeking this info in the future.

Источник

Оцените статью