![是否可以在不丢失数据的情况下调整/移动 Ubuntu 14.04 中的根分区和加密主分区?](https://linux22.com/image/866986/%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%E5%9C%A8%E4%B8%8D%E4%B8%A2%E5%A4%B1%E6%95%B0%E6%8D%AE%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%E8%B0%83%E6%95%B4%2F%E7%A7%BB%E5%8A%A8%20Ubuntu%2014.04%20%E4%B8%AD%E7%9A%84%E6%A0%B9%E5%88%86%E5%8C%BA%E5%92%8C%E5%8A%A0%E5%AF%86%E4%B8%BB%E5%88%86%E5%8C%BA%EF%BC%9F.png)
似乎有不少页面介绍如何重新分区硬盘而不导致数据丢失。还有一些页面指出加密驱动器无法做到这一点,而其他页面则指出只能使用命令行实用程序做到这一点。我有点怀疑,因为似乎没有任何实际操作说明如何做到这一点。一些关于如何做到这一点的指导和链接会很有帮助。我理解,如果没有加密,就需要从 Live CD 或 USB 启动,然后运行 Gparted。我有一台双启动 Ubuntu 14.04 Windows 7 笔记本电脑。分区如下:我想增加 sda10 (/) 并移动/减少 sda9 (/home)。
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 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: 0x75487944
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT
/dev/sda2 409600 124969634 62280017+ 7 HPFS/NTFS/exFAT
/dev/sda3 124971006 1465147119 670088057 f W95 Ext'd (LBA)
Partition 3 does not start on physical sector boundary.
/dev/sda5 1435705408 1464936447 14615520 7 HPFS/NTFS/exFAT
/dev/sda6 1464936511 1465147119 105304+ c W95 FAT32 (LBA)
Partition 6 does not start on physical sector boundary.
/dev/sda7 124971008 124973055 1024 83 Linux
/dev/sda8 1415692288 1415694335 1024 83 Linux
/dev/sda9 124975104 184971263 29998080 83 Linux
/dev/sda10 184973312 1403674623 609350656 83 Linux
/dev/sda11 1403676672 1415677951 6000640 82 Linux swap / Solaris
/dev/sda12 1415696384 1435697151 10000384 b W95 FAT32
Partition table entries are not in disk order
Disk /dev/mapper/cryptswap1: 6144 MB, 6144655360 bytes
255 heads, 63 sectors/track, 747 cylinders, total 12001280 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: 0x4079e40a
Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table
答案1
简而言之,ecryptfs 是一种文件系统加密,只加密文件而不加密分区,因此调整分区大小应该是安全的,但请先备份!我将其标记为重复,因为这个问题之前已经问过。