如何增加 /boot 分区的大小?

如何增加 /boot 分区的大小?

Ubuntu Server 22.04 LTS 升级至 24.04 LTS 失败,原因是 /boot 中缺少约 45M 的空间

# uname -r
6.7.6-060706-generic
# df -h
Filesystem                    Size  Used Avail Use% Mounted on
tmpfs                         741M  3.0M  738M   1% /run
/dev/mapper/MediaServer-root  139G   16G  116G  13% /
tmpfs                         3.7G     0  3.7G   0% /dev/shm
tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
efivarfs                      128K   28K   96K  23% /sys/firmware/efi/efivars
/dev/mapper/Movies-Movies      15T   14T  127G 100% /Movies
/dev/sdb2                     229M   97M  120M  45% /boot
/dev/sdb1                     190M  5.0M  185M   3% /boot/efi
tmpfs                         741M   60K  741M   1% /run/user/0

# ls -l /boot
total 90816
-rw------- 1 root root  8374647 Feb 23 10:33 System.map-6.7.6-060706-generic
-rw-r--r-- 1 root root   284235 Feb 23 10:33 config-6.7.6-060706-generic
drwxr-xr-x 3 root root     2048 Jan  1  1970 efi
drwxr-xr-x 5 root root     1024 Mar  8 10:41 grub
-rw-r--r-- 1 root root 69021354 May  7 09:20 initrd.img-6.7.6-060706-generic
drwxr-xr-x 2 root root    12288 Mar  4  2013 lost+found
-rw-r--r-- 1 root root   182800 Feb  6  2022 memtest86+.bin
-rw-r--r-- 1 root root   184476 Feb  6  2022 memtest86+.elf
-rw-r--r-- 1 root root   184980 Feb  6  2022 memtest86+_multiboot.bin
-rw------- 1 root root 14373376 Feb 23 10:33 vmlinuz-6.7.6-060706-generic

# fdisk -l /dev/sdb
Disk /dev/sdb: 149.05 GiB, 160041885696 bytes, 312581808 sectors
Disk model: WDC WD1600AAJS-2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 03C201FA-E022-462F-A12F-79A579067E1C

Device      Start       End   Sectors   Size Type
/dev/sdb1    2048    391167    389120   190M EFI System
/dev/sdb2  391168    890879    499712   244M Microsoft basic data
/dev/sdb3  890880 312580095 311689216 148.6G Linux LVM

# parted /dev/sdb
GNU Parted 3.4
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: ATA WDC WD1600AAJS-2 (scsi)
Disk /dev/sdb: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name  Flags
 1      1049kB  200MB  199MB  fat32              boot, esp
 2      200MB   456MB  256MB  ext2               msftdata
 3      456MB   160GB  160GB                     lvm

gparted 显示单个分区和文件系统 zfs。

# blkid /dev/sdb
/dev/sdb: TYPE="zfs_member" PTUUID="03c201fa-e022-462f-a12f-79a579067e1c" PTTYPE="gpt"

此系统上未配置 zfs。

# zpool status
-bash: zpool: command not found

我如何增加 /boot 分区的空间?

相关内容