那麼,Ubuntu 為什麼要建立/boot/efi分割區呢?

那麼,Ubuntu 為什麼要建立/boot/efi分割區呢?

我已經透過 USB 快閃記憶體安裝了 Ubuntu Desktop LTS 20.04 64 位元並選擇了選項...

  • 清除磁碟
  • 進階功能... > 使用 LVM > 加密以確保安全

如圖所示:

Ubuntu 桌面安裝類型步驟

無所不在的來源

Ubuntu 20.04 發行版參考

由於 UEFI 韌體設定為 BIOS 相容模式,因此安裝使用標準 MBR 分割區表,並以 GRUB 2 作為 MBR 開機碼:

# sudo fdisk -l /dev/sda
Disklabel type: dos # dos => MBR
Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048   1050623   1048576   512M  b W95 FAT32
/dev/sda2       1052670 488396799 487344130 232,4G  5 Extended
/dev/sda5       1052672   4050943   2998272   1,4G 83 Linux
/dev/sda6       4052992 488396799 484343808   231G 83 Linux

# hexdump -v -s 0x80 -n 2 -e '2/1 "%x" "\n"' /dev/sda
020 # This identifies the MBR boot code as GRUB 2, see https://unix.stackexchange.com/a/702790/160124

# sudo lsblk
sda                     8:0    0 232,9G  0 disk  
├─sda1                  8:1    0   512M  0 part  /boot/efi
├─sda2                  8:2    0     1K  0 part  
├─sda5                  8:5    0   1,4G  0 part  /boot
└─sda6                  8:6    0   231G  0 part  
  └─sda6_crypt        253:0    0   231G  0 crypt 
    ├─vgubuntu-root   253:1    0   230G  0 lvm   /
    └─vgubuntu-swap_1 253:2    0   980M  0 lvm   [SWAP]

# sudo ls -a /boot/efi
.  ..

# sudo df | grep "Filesystem\|/dev/sda1"
Filesystem                1K-blocks     Used Available Use% Mounted on
/dev/sda1                    523248        4    523244   1% /boot/efi

# fsck.fat -v -n /dev/sda1
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
      4096 bytes per cluster
        32 reserved sectors
/dev/sda1: 0 files, 1/130812 clusters # No files, one cluster used for FAT root directory.

可以看到/boot/efi是空的(使用的4K是FAT根目錄,參見https://superuser.com/a/1727654/505763)。

那麼,Ubuntu 為什麼要建立/boot/efi分割區呢?

相關內容