[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 24 Dec 2009 11:14:23 +0100
Jim Thomas wrote:
>>>>>> "Jim" == Jim Thomas <address@hidden> writes:
> Jim> Except that it does not :<
> Jim> address@hidden:~/] # parted --script /dev/sdb mklabel gpt
> Jim> address@hidden:~/] # parted --script -- /dev/sdb mkpart gpt 0 -1s
> Jim> Error: You requested a partition from 0.00B to 7000GB.
> Jim> The closest location we can manage is 17.4kB to 7000GB.
> And even stranger:
> address@hidden:~/] # parted --script -- /dev/sdb mkpart gpt 17kB -1s
You have the right idea.
Unfortunately, parted interprets 17kB as 170000 bytes.
To get what you want, I suggest 33s (aka 33 512-byte sectors).
parted -s -- /dev/sdb mkpart part-name 33s -1s
It's best to use sector numbers as much as possible, for now.
I expect to teach parted about suffixes like KiB, MiB, etc. soon.
> Error: You requested a partition from 16.9kB to 7000GB.
> The closest location we can manage is 17.4kB to 7000GB.
> address@hidden:~/] # parted --script -- /dev/sdb p
> Model: AMCC 9650SE-8LP DISK (scsi)
> Disk /dev/sdb: 7000GB
> Sector size (logical/physical): 512B/512B
> Partition Table: gpt
> Number Start End Size File system Name Flags
In script mode, any error means the offending operation is not performed.