我的笔记本电脑出厂时安装的是 Ubuntu 20.04(没有其他操作系统)。今天我注意到磁盘上似乎只有大约 56 GB,但应该有大约 1TB。启动 Gnome 时Disks
我看到了以下内容:
此外,这是输出df -h
:
tmpfs 3.2G 2.2M 3.2G 1% /run
/dev/nvme0n1p3 53G 11G 40G 21% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/loop0 128K 128K 0 100% /snap/bare/5
/dev/loop3 255M 255M 0 100% /snap/gnome-3-38-2004/106
/dev/loop2 114M 114M 0 100% /snap/core/13308
/dev/loop1 139M 139M 0 100% /snap/chromium/1536
/dev/loop9 219M 219M 0 100% /snap/gnome-3-34-1804/77
/dev/loop5 56M 56M 0 100% /snap/core18/1997
/dev/loop6 56M 56M 0 100% /snap/core18/2409
/dev/loop8 65M 65M 0 100% /snap/gtk-common-themes/1514
/dev/loop7 219M 219M 0 100% /snap/gnome-3-34-1804/66
/dev/loop4 82M 82M 0 100% /snap/gtk-common-themes/1534
/dev/loop10 62M 62M 0 100% /snap/core20/1518
/dev/loop12 52M 52M 0 100% /snap/snap-store/518
/dev/loop11 132M 132M 0 100% /snap/chromium/2011
/dev/nvme0n1p1 513M 28M 485M 6% /boot/efi
tmpfs 3.2G 68K 3.2G 1% /run/user/1001
/dev/loop13 55M 55M 0 100% /snap/snap-store/558
并且fdisk -l
;请注意它在某个时候是如何说“GPT PMBR 大小不匹配(122879999 != 2000409263)将通过写入进行更正”的:
Disk /dev/loop0: 4 KiB, 4096 bytes, 8 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 /dev/loop1: 138.84 MiB, 145563648 bytes, 284304 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 /dev/loop2: 113.91 MiB, 119418880 bytes, 233240 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 /dev/loop3: 254.1 MiB, 266436608 bytes, 520384 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 /dev/loop4: 81.27 MiB, 85209088 bytes, 166424 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 /dev/loop5: 55.46 MiB, 58142720 bytes, 113560 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 /dev/loop6: 55.55 MiB, 58232832 bytes, 113736 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 /dev/loop7: 218.102 MiB, 229629952 bytes, 448496 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
GPT PMBR size mismatch (122879999 != 2000409263) will be corrected by write.
Disk /dev/nvme0n1: 953.89 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: SAMSUNG MZVL21T0HCLR-00BL7
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: 7D8A04D6-18B8-4822-BDDE-11113430DDA4
Device Start End Sectors Size Type
/dev/nvme0n1p1 34 1050781 1050748 513.1M EFI System
/dev/nvme0n1p2 1050782 9768967 8718186 4.2G Microsoft basic data
/dev/nvme0n1p3 9771008 122877951 113106944 54G Linux filesystem
Disk /dev/loop8: 64.79 MiB, 67915776 bytes, 132648 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 /dev/loop9: 219 MiB, 229638144 bytes, 448512 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 /dev/loop10: 61.95 MiB, 64933888 bytes, 126824 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 /dev/loop11: 131.95 MiB, 138338304 bytes, 270192 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 /dev/loop12: 51.4 MiB, 53522432 bytes, 104536 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 /dev/loop13: 54.24 MiB, 56872960 bytes, 111080 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
据我所知,磁盘的大部分空间被保留为“可用空间”,而不是分配给 Ubuntu 分区。
我想问两个问题,第一个问题主要是出于好奇:
- 怎么会这样?第一次启动时,我只是按照设置说明操作,回答了有关区域设置、语言等的问题。但是,软件中心后来要求我安装更新的固件,包括 bios。这可能是在更新后发生的吗?不幸的是,我在更新之前没有检查磁盘空间。
- 我看到“磁盘”程序使我可以调整主分区的大小,并添加可用空间:是否可以使用此实用程序添加可用空间?
我检查了主要答案这个问题和这个问题(从 Live CD 启动并使用 gparted),这听起来也是我应该做的,但我想再确认一下是否真的如此,因为我没有双启动。一些答案,例如这个问题,lvextend
但我想这并不适用于我的情况。
最后,另一个选择是恢复出厂设置,我认为我可以在启动时进行恢复。我考虑这样做是为了防止固件更新过程中出现问题。但也许这有点过头了?
我知道这个问题可能会重复(因为我对磁盘分区主题了解不多);如果是这样的话,我很抱歉。如果它被关闭为重复,我希望有一些评论解释如何将现有的答案应用于我的情况。干杯!
更新
我继续遵循 Organic Marble 的建议。我错误地制作了一个恢复 USB 而不是启动 USB。从它启动笔记本电脑会自动将其恢复为出厂设置(幸运的是,我的笔记本电脑上没有数据,所以我没有备份)。这实际上解决了问题:现在 Ubuntu 的根分区可以看到所有可用空间。仍然不清楚是什么导致了这个故障。
答案1
这真的很奇怪!是的,您可以使用磁盘调整分区大小,但如果已安装(如磁盘中的星形图标所示),则不能调整。因此,您必须启动到实时 USB 才能执行此操作。
在进行任何分区操作之前备份您的数据。
答案2
由于您只有一个驱动器,并且无法在安装时调整其大小。您需要采取以下步骤:
- 备份您的数据
- 使用实时 USB 启动
- 安装分区(选修的)