[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Command Line Partitioning



On Sat, 19 Feb 2011 15:18:49 -0500 (EST), Hal Vaughan wrote:
> On Feb 19, 2011, at 12:41 PM, Rob Owens wrote:
>> On Sat, Feb 19, 2011 at 11:49:41AM -0500, Hal Vaughan wrote:
>>> 
>>> fdisk: Doesn't seem to have a batch/script mode and I'd have
>>> to calculate sizes in megabytes from cylinder info
>> 
>> fdisk does allow you to specify the start cylinder, then something like
>> +1000M for the end of the partition.  "M" meaning megabytes.  It may
>> also accept "G" for gigabytes these days, but I'm not sure -- you'd have
>> to try it yourself.
> 
> I know I can specify the offset, but there's still the issue of having to
> calculate numbers to get that 1st cylinder -- and I can't use it from a
> script.  It's interactive.
> 
> Thanks, though.

By the way, you *can* control the allocation of partitions down to the
sector level with parted, as well get the starting locations and
sizes of existing partitions (and free space) in sectors, if you want
to do so.  For example:

   parted /dev/sda unit s print free
   parted /dev/sda unit s mkpart primary ext2 100 999

etc.

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


Reply to: