![/sda1 上的 /boot 已满。我需要从 /sdb6 添加未使用的 17g 分区吗?](https://linux22.com/image/1053752/%2Fsda1%20%E4%B8%8A%E7%9A%84%20%2Fboot%20%E5%B7%B2%E6%BB%A1%E3%80%82%E6%88%91%E9%9C%80%E8%A6%81%E4%BB%8E%20%2Fsdb6%20%E6%B7%BB%E5%8A%A0%E6%9C%AA%E4%BD%BF%E7%94%A8%E7%9A%84%2017g%20%E5%88%86%E5%8C%BA%E5%90%97%EF%BC%9F.png)
我在 /sdb6 上有一个未使用的分区(我的错误),我需要将其合并到 /sda1 中以扩展 /boot。/boot 已满,并且我在 /sda2 上有一个 crypt-luks fs,但我没有看到允许我从 GParted 提供屏幕截图的按钮。
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000ea707
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 1953523711 976510977 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 501760 1953523711 976510976 83 Linux
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2dffccca
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sdb2 206848 195086626 97439889+ 7 HPFS/NTFS/exFAT
/dev/sdb3 195088382 976771071 390841345 5 Extended
/dev/sdb5 195088384 939128831 372020224 83 Linux
/dev/sdb6 939130880 976771071 18820096 82 Linux swap / Solaris
Disk /dev/mapper/crypt1: 999.9 GB, 999945142272 bytes
255 heads, 63 sectors/track, 121569 cylinders, total 1953017856 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/crypt1 doesn't contain a valid partition table
Disk /dev/mapper/ubuntu--vg-root: 987.1 GB, 987070726144 bytes
255 heads, 63 sectors/track, 120004 cylinders, total 1927872512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table
Disk /dev/mapper/ubuntu--vg-swap_1: 12.8 GB, 12826181632 bytes
255 heads, 63 sectors/track, 1559 cylinders, total 25051136 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table
ubuntu@ubuntu:~$ mount
/cow on / type overlayfs (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=ubuntu)
ubuntu@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/cow 8.8G 111M 8.7G 2% /
udev 8.8G 12K 8.8G 1% /dev
tmpfs 1.8G 1.4M 1.8G 1% /run
/dev/sr0 996M 996M 0 100% /cdrom
/dev/loop0 953M 953M 0 100% /rofs
none 4.0K 0 4.0K 0% /sys/fs/cgroup
tmpfs 8.8G 1.1M 8.8G 1% /tmp
none 5.0M 4.0K 5.0M 1% /run/lock
none 8.8G 80K 8.8G 1% /run/shm
none 100M 56K 100M 1% /run/user
ubuntu@ubuntu:~$ sudo du -h --max-depth=1 /
9.7M /bin
5.2M /boot
12K /dev
5.8M /etc
30M /home
275M /lib
0 /lib64
0 /media
0 /mnt
0 /opt
du: cannot access ‘/proc/7004/task/7004/fd/4’: No such file or directory
du: cannot access ‘/proc/7004/task/7004/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/7004/fd/4’: No such file or directory
du: cannot access ‘/proc/7004/fdinfo/4’: No such file or directory
0 /proc
32K /root
du: cannot access ‘/run/user/999/gvfs’: Permission denied
1.5M /run
18M /sbin
0 /srv
0 /sys
4.0K /tmp
2.3G /usr
155M /var
995M /cdrom
2.7G /rofs
6.4G /
答案1
您所要求的操作在物理上是不可能的。您无法将空间从一个驱动器 ( /dev/sdb
) 移动到另一个驱动器 ( /dev/sda
)。
在 AskUbuntu.com 上搜索“/boot full”的答案。
警告从你的问题所显示的知识水平来看,我发现你对磁盘、磁盘分区、文件系统等的工作原理缺乏了解,这很危险。请在做之前扩展你的知识范围任何更改。另外,对您想要保留的所有内容进行备份(并测试)。
只是重新安装更大的空间/boot
,而不学习如何管理/boot
空间,只会将问题推向未来。
用于dpkg -S /boot/*
查看哪些包拥有哪些文件。
答案2
根据我的经验,/boot 往往会被旧内核版本填满。与其试图扩大分区,不如研究如何摆脱旧内核,从而释放空间。
这是一个开始的地方:https://help.ubuntu.com/community/Lubuntu/Documentation/RemoveOldKernels