我使用parted命令创建了一个分区,并使用mkpart选项创建了一个新的主分区。但我在做这件事时收到了一条不寻常的错误信息。这是我的输出:
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 729GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 300GB 300GB primary ext4 boot
(parted) mkpart
Partition type? primary/extended? primary
File system type? ext4
Start? 1050
End? 30000
Warning: You requested a partition from 1050MB to 30.0GB (sector 2050781..58593750). The closest location we can manage is 300GB to 300GB (sector 585936896..585936896).
Is this still acceptable to you?
Yes/No?发布于 2019-05-07 17:31:48
分区不能重叠,因此第二个分区的开始必须是比第一个分区的最后一个扇区后面至少有一个扇区(更大的数目)。不是第一个部门,是最后一个部门。
您的第一个分区以偏移量1049 in开始,大小为300 in。Parted要求您以MB作为起始位置;您的第一个分区运行在(大约)1到300000 MB( "end“位置,乘以1,000从GB到MB)之间。因此,1050将处于中间,因此不允许。
您可以在unit MB之前运行print,完全以MB打印大小。这将使人们更容易看到正在发生的事情和正确使用的数字。您可以切换到扇区与unit s,如果你需要得到完美的定位。
https://unix.stackexchange.com/questions/517619
复制相似问题