Ubuntu 18.04 启动太小 - 无法调整大小

Dav*_*e H 5 partitioning boot resize 18.04

由于启动分区太小,自从升级到 18.04 以来,我无法升级软件。我尝试过将 Gparted 作为 LiveCD,但这不允许我扩展启动分区。由于需要 root 权限,我无法启动 KVPM,而且我找不到有关如何实现这一点的说明。

由于某种原因我也无法安装 system-config-lvm 。我使用了多个来源,但此链接包含我迄今为止遵循的大部分说明:

如何调整 LVM 分区大小?(即:物理体积)

除了进行全新安装来解决启动分区大小问题之外,我希望有人可以帮助我调整计算机上的分区大小,以便我能够克服这个障碍。

提前致谢。

df -h 的输出

df -i 的输出

软件更新程序错误消息:

软件更新程序“可用磁盘空间不足”错误

ls -la /boot 的输出:

总计 110844
drwxr-xr-x 4 根根 4096 11 月 17 日 11:50 
drwxr-xr-x 24 根根 4096 十一月 15 19:26 ..
-rw-r--r-- 1 根 1537821 9 月 24 日 07:08 abi-4.15.0-36-generic
-rw-r--r-- 1 根 1537997 十月 10 日 02:20 abi-4.15.0-38-generic
-rw-r--r-- 1 root root 216954 九月 24 日 07:08 config-4.15.0-36-generic
-rw-r--r-- 1 root root 216983 十月 10 日 02:20 config-4.15.0-38-generic
drwxr-xr-x 5 root root 1024 十一月 15 19:27 grub
-rw-r--r-- 1 root root 26584853 11 月 15 日 19:26 initrd.img-4.15.0-36-generic
-rw-r--r-- 1 root root 57729589 十一月 17 11:50 initrd.img-4.15.0-38-generic
drwx------ 2 root root 12288 2014 年 11 月 15 日丢失+找到
-rw-r--r-- 1根根182704 2016年1月28日 memtest86+.bin
-rw-r--r-- 1根根184380 2016年1月28日 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw-r--r-- 1 根 0 九月 24 07:08 retpoline-4.15.0-36-generic
-rw-r--r-- 1 root root 0 Oct 10 02:20 retpoline-4.15.0-38-generic
-rw-------- 1 root root 4046393 九月 24 07:08 System.map-4.15.0-36-generic
-rw-------- 1 root root 4046910 10 月 10 日 02:20 System.map-4.15.0-38-generic
-rw-------- 1 root root 8275824 九月 24 07:08 vmlinuz-4.15.0-36-generic
-rw-------- 1 root root 8277752 10 月 10 日 03:43 vmlinuz-4.15.0-38-generic

删除旧内核后新的 df-h 输出:

已使用的文件系统大小 可用 使用% 安装于
udev 5.9G 0 5.9G 0% /dev
tmpfs 1.2G 2.1M 1.2G 1% /运行
/dev/mapper/ubuntu--vg-root 905G 347G 513G 41% /
tmpfs 5.9G 3.0M 5.9G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /运行/锁定
tmpfs 5.9G 0 5.9G 0% /sys/fs/cgroup
/dev/loop0 88M 88M 0 100% /snap/core/5742
/dev/loop1 89M 89M 0 100% /snap/core/5897
/dev/loop2 203M 203M 0 100% /snap/firefox/152
/dev/loop3 5.0M 5.0M 0 100% /snap/canonical-livepatch/50
/dev/loop4 88M 88M 0 100% /snap/core/5662
/dev/sda1 236M 117M 107M 53% /boot
tmpfs 1.2G 16K 1.2G 1% /运行/用户/127
tmpfs 1.2G 32K 1.2G 1% /运行/用户/1000
:/boot$ ls -la
总计 110844
drwxr-xr-x 4 根根 4096 11 月 17 日 11:50 
drwxr-xr-x 24 根根 4096 十一月 15 19:26 ..
-rw-r--r-- 1 根 1537821 9 月 24 日 07:08 abi-4.15.0-36-generic
-rw-r--r-- 1 根 1537997 十月 10 日 02:20 abi-4.15.0-38-generic
-rw-r--r-- 1 root root 216954 九月 24 日 07:08 config-4.15.0-36-generic
-rw-r--r-- 1 root root 216983 十月 10 日 02:20 config-4.15.0-38-generic
drwxr-xr-x 5 root root 1024 十一月 15 19:27 grub
-rw-r--r-- 1 root root 26584853 11 月 15 日 19:26 initrd.img-4.15.0-36-generic
-rw-r--r-- 1 root root 57729589 十一月 17 11:50 initrd.img-4.15.0-38-generic
drwx------ 2 root root 12288 2014 年 11 月 15 日丢失+找到
-rw-r--r-- 1根根182704 2016年1月28日 memtest86+.bin
-rw-r--r-- 1根根184380 2016年1月28日 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw-r--r-- 1 根 0 九月 24 07:08 retpoline-4.15.0-36-generic
-rw-r--r-- 1 root root 0 Oct 10 02:20 retpoline-4.15.0-38-generic
-rw-------- 1 root root 4046393 九月 24 07:08 System.map-4.15.0-36-generic
-rw-------- 1 root root 4046910 10 月 10 日 02:20 System.map-4.15.0-38-generic
-rw-------- 1 root root 8275824 九月 24 07:08 vmlinuz-4.15.0-36-generic
-rw-------- 1 root root 8277752 10 月 10 日 03:43 vmlinuz-4.15.0-38-generic
:/boot$ sudo apt 删除 linux-image-4.15.0-36-generic
正在阅读包裹清单...完成
构建依赖树       
读取状态信息...完成
软件包“linux-image-4.15.0-36-generic”未安装,因此未删除
0 已升级,0 已新安装,0 已删除,76 未升级。

use*_*733 3

一种简单的策略是卸载不使用的内核,从而为版本升级释放足够的空间。这不会调整您的分区大小,但会帮助您完成版本升级。

uname -r会告诉你正在使用哪个内核。假设您正在运行 4.15.0-38,因此您可以安全地删除 4.15.0-36。

sudo apt remove linux-image-4.15.0-36-generic   // Remove the kernel image
sudo apt autoremove                             // Remove dependencies
Run Code Online (Sandbox Code Playgroud)

然后再次运行df -h以检查是否释放了 /boot 中所需的 25MB。如果是这样,请再次尝试发布升级。


Mic*_*pec 0

确保缩小其他分区之一的大小并应用更改,然后重新启动。接下来调整启动分区的大小。

如果这不起作用:我会尝试使用实时完整版 Linux 操作系统。然后使用 GUI GParted 看看是否可以通过这种方式获取更多信息。