我曾经dd
将可启动的 8GB USB 磁盘映像复制16.04-server
到 1TB 驱动器,启动完美。我想在驱动器末尾创建一个新的交换分区,然后再扩展根分区的容量以填充驱动器。
问题是,该驱动器/sda/
似乎只能达到 8GB 驱动器所需的扇区数。
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 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
Disklabel type: dos
Disk identifier: 0x6d9e46a7
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 11780095 11778048 5.6G 83 Linux
/dev/sda2 11782142 15972351 4190210 2G 5 Extended
/dev/sda5 11782144 15972351 4190208 2G 82 Linux swap / Solaris
应该是这个
# mdadm file partitioning
Device Boot Start End Sectors Size Id Type
/dev/md0p1 63 1952202734 1952202672 930.9G 83 Linux
/dev/md0p2 1952202735 1953246959 1044225 509.9M 5 Extended
/dev/md0p5 1952202798 1953246959 1044162 509.9M 82 Linux swap / Solaris
// this drive is part of an old raid1 array but is same size.
我尝试使用parted
具有以下设置的命令行 ank mkpart,但它给了我以下错误。
(parted) mkpart
Partition type? primary/logical? logical
File system type? [ext2]? linux-swap
Start? 1952202735
Error: The location 1952202735 is outside of the device /dev/sda.
若能指出正确的方向我将非常感激。