chr*_*o.1 8 live-usb partitioning dual-boot swap system-installation
如何避免重新格式化其他交换分区?
我的硬盘中有很多发行版:
所有 Linux 发行版都有交换分区(每个 16GiB)。
在可用空间中,我首先创建了一个 16 GiB 的交换分区,其余大小用于根分区(ext4)。
奇怪的是我们不能选择交换分区,无论如何点击“立即安装”按钮
我不想重新格式化那些Linux的swap,如何避免?
硬盘:
fdisk -l 的2 TiB MBR输出
ubuntu-gnome@ubuntu-gnome:~$ sudo fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 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 /dev/ram1: 64 MiB, 67108864 bytes, 131072 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 /dev/ram2: 64 MiB, 67108864 bytes, 131072 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 /dev/ram3: 64 MiB, 67108864 bytes, 131072 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 /dev/ram4: 64 MiB, 67108864 bytes, 131072 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 /dev/ram5: 64 MiB, 67108864 bytes, 131072 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 /dev/ram6: 64 MiB, 67108864 bytes, 131072 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 /dev/ram7: 64 MiB, 67108864 bytes, 131072 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 /dev/ram8: 64 MiB, 67108864 bytes, 131072 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 /dev/ram9: 64 MiB, 67108864 bytes, 131072 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 /dev/ram10: 64 MiB, 67108864 bytes, 131072 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 /dev/ram11: 64 MiB, 67108864 bytes, 131072 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 /dev/ram12: 64 MiB, 67108864 bytes, 131072 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 /dev/ram13: 64 MiB, 67108864 bytes, 131072 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 /dev/ram14: 64 MiB, 67108864 bytes, 131072 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 /dev/ram15: 64 MiB, 67108864 bytes, 131072 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 /dev/loop0: 1.2 GiB, 1246838784 bytes, 2435232 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/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 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
Disklabel type: dos
Disk identifier: 0xaaf06e0e
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT
/dev/sda2 1026048 525314047 524288000 250G 7 HPFS/NTFS/exFAT
/dev/sda3 525316094 3907028991 3381712898 1.6T f W95 Ext'd (LBA)
/dev/sda5 2644512768 3907028991 1262516224 602G 7 HPFS/NTFS/exFAT
/dev/sda6 525316096 557314047 31997952 15.3G 82 Linux swap / Solaris
/dev/sda7 557316096 1057314815 499998720 238.4G 83 Linux
/dev/sda8 1057314817 1058291377 976561 476.9M 83 Linux
/dev/sda9 1058291379 1090291377 31999999 15.3G 83 Linux
/dev/sda10 1090291379 1590291377 499999999 238.4G 83 Linux
/dev/sda11 * 1590294528 2114582527 524288000 250G 83 Linux
/dev/sda12 2114584576 2148139007 33554432 16G 82 Linux swap / Solaris
Partition 3 does not start on physical sector boundary.
Partition 8 does not start on physical sector boundary.
Partition 9 does not start on physical sector boundary.
Partition 10 does not start on physical sector boundary.
Partition table entries are not in disk order.
Disk /dev/sdb: 7.2 GiB, 7742685184 bytes, 15122432 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
Disklabel type: dos
Disk identifier: 0x178e5ca0
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 0 2538431 2538432 1.2G 0 Empty
/dev/sdb2 2511036 2515771 4736 2.3M ef EFI (FAT-12/16/32)
ubuntu-gnome@ubuntu-gnome:~$
Run Code Online (Sandbox Code Playgroud)
UTF*_*F-8 19
不同系统不需要不同的交换分区,就像不同系统不需要不同的内存条一样。只需在他们所有人之间分享一个。您应该使用最左边的一个,因为它是读/写速度最快的一个(在 HDD 上)。
关机后唯一的相关内容仍在交换中是当您休眠 PC(挂起到磁盘)时。但无论如何,这是默认禁用的。
不要在意它们被格式化。如果没有系统挂在磁盘上(并且仅当使用交换分区来保存挂起映像时,这不一定是这种情况),它不会更改任何内容。
如果交换分区是使用其 UUID 自动挂载的,则格式化交换分区是一个问题。要检查是否是这种情况,请打开/etc/fstab系统文件。如果有一行包含以 开头的单词“swap” UUID=,则必须用新的 UUID 交换 UUID。请注意,不必有这样的行。您的交换分区可以通过它们的设备名称来识别。在这种情况下,例如,该行以 开头/dev/sda12,无需执行任何操作 - 除非您删除了分区,或者它现在是不同类型的分区,在这种情况下,必须更改设备名称。
如果您删除了除一个交换分区之外的所有分区,请将相同的 UUID 写入/etc/fstab所有 Linux 系统的相应行。这可以在实时会话中或在系统本身中完成。更改将在您下次启动后生效。如果 UUID 改变,swap 分区将不会被挂载,但除了没有 swap 分区外,系统可以正常使用。
| 归档时间: |
|
| 查看次数: |
1691 次 |
| 最近记录: |