我需要压缩磁盘上的根分区空间,以便为安装另一个发行版创建一个新分区(我现在有 Ubuntu/Kde Plasma,我想与 EndeavourOS 进行双启动)。我想我知道如何做到这一点,但由于这是一个相当危险的过程,我可能需要征求您的建议!
配置显然很简单(GParted 和 KDE 分区管理器都给了我这个:)
未分配
2MB
/dev/nvme0n1p1
挂载点:/boot/EFI (fat32) 300MB (已使用 5.24MB)
/dev/nvme0n1p2
挂载点:/(ext4)238.17GB(已使用 127.08GB)
未分配
7.20MB
但是当“lsblk”给我相当多的循环时,这就是为什么我更喜欢在丢失数据之前询问:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 162,9M 1 loop /snap/gnome-3-28-1804/145
loop1 7:1 0 63,6M 1 loop /snap/handbrake-jz/142
loop2 7:2 0 68K 1 loop /snap/acrordrdc/53
loop3 7:3 0 68K 1 loop /snap/acrordrdc/62
loop4 7:4 0 285M 1 loop /snap/atom/282
loop5 7:5 0 284,9M 1 loop /snap/atom/286
loop6 7:6 0 4K 1 loop /snap/bare/5
loop7 7:7 0 114,9M 1 loop /snap/core/13741
loop8 7:8 0 115M 1 loop /snap/core/13886
loop9 7:9 0 55,6M 1 loop /snap/core18/2560
loop10 7:10 0 55,6M 1 loop /snap/core18/2566
loop11 7:11 0 63,2M 1 loop /snap/core20/1623
loop12 7:12 0 63,2M 1 loop /snap/core20/1634
loop13 7:13 0 33,2M 1 loop /snap/crystal/1349
loop14 7:14 0 33,2M 1 loop /snap/crystal/1367
loop15 7:15 0 6,3M 1 loop /snap/curl/1093
loop16 7:16 0 6,3M 1 loop /snap/curl/1113
loop17 7:17 0 164,8M 1 loop /snap/gnome-3-28-1804/161
loop18 7:18 0 346,3M 1 loop /snap/gnome-3-38-2004/115
loop19 7:19 0 219M 1 loop /snap/gnome-3-34-1804/77
loop20 7:20 0 346,3M 1 loop /snap/gnome-3-38-2004/119
loop21 7:21 0 81,3M 1 loop /snap/gtk-common-themes/1534
loop22 7:22 0 140K 1 loop /snap/gtk2-common-themes/13
loop23 7:23 0 91,7M 1 loop /snap/gtk-common-themes/1535
loop24 7:24 0 29,2M 1 loop /snap/node/6800
loop25 7:25 0 29,2M 1 loop /snap/node/6853
loop26 7:26 0 101,5M 1 loop /snap/p7zip-desktop/220
loop27 7:27 0 184,4M 1 loop /snap/signal-desktop/398
loop28 7:28 0 141,1M 1 loop /snap/skype/231
loop29 7:29 0 184,1M 1 loop /snap/signal-desktop/397
loop30 7:30 0 141,5M 1 loop /snap/skype/234
loop31 7:31 0 48M 1 loop /snap/snapd/17029
loop32 7:32 0 48M 1 loop /snap/snapd/17336
loop33 7:33 0 303,1M 1 loop /snap/wine-platform-5-stable/16
loop34 7:34 0 303,1M 1 loop /snap/wine-platform-5-stable/18
loop35 7:35 0 322,9M 1 loop /snap/wine-platform-6-stable/14
loop36 7:36 0 322,9M 1 loop /snap/wine-platform-6-stable/19
loop37 7:37 0 347,1M 1 loop /snap/wine-platform-runtime/315
loop38 7:38 0 347M 1 loop /snap/wine-platform-runtime/316
loop39 7:39 0 2,5M 1 loop /snap/ymuse/61
loop40 7:40 0 250M 1 loop /snap/zoom-client/170
loop41 7:41 0 2,5M 1 loop /snap/ymuse/54
loop42 7:42 0 352,4M 1 loop /snap/zoom-client/175
nvme0n1 259:0 0 238,5G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
└─nvme0n1p2 259:2 0 238,2G 0 part /
然后“fdisk -l”
Disk /dev/loop0: 162,87 MiB, 170778624 bytes, 333552 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: 63,59 MiB, 66674688 bytes, 130224 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: 68 KiB, 69632 bytes, 136 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: 68 KiB, 69632 bytes, 136 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: 285,05 MiB, 298893312 bytes, 583776 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: 284,93 MiB, 298774528 bytes, 583544 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: 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/loop7: 114,93 MiB, 120508416 bytes, 235368 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/nvme0n1: 238,47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: ADATA SX8200PNP
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: 729952F6-973B-7E48-A50F-47CBB14D3987
Dispositivo Start Fine Settori Size Tipo
/dev/nvme0n1p1 4096 618495 614400 300M EFI System
/dev/nvme0n1p2 618496 500103449 499484954 238,2G Linux filesystem
Disk /dev/loop8: 114,99 MiB, 120573952 bytes, 235496 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
...
我想创建一个新的分区(~70GB),占用“/dev/nvme0n1p2”(可用空间 110.08GB)的空间,我是否可以指示新扇区,考虑到它们与空间成比例?我的意思是,如果这是分区:
/dev/nvme0n1p2(开始)618496(结束)500103449(总扇区数)499484954 238,2G
我可以设置类似
/dev/nvme0n1p2(开始)618496(结束)353300970(总扇区数)352682475 168,17G
/dev/nvme0n2p1(开始)353300971(结束)500103449(总扇区数)146802479 70,0G
我可以用 fdisk 来做吗?我知道我可以在安装新发行版时直接执行此操作,但我觉得这有点冒险,我想单独执行此操作。有什么建议吗?
谢谢R