[NCLUG] Fwd: Howto partition a drive from a script???

Christopher C.J. Keist cjay at engr.colostate.edu
Thu Oct 31 16:21:47 MST 2002


Thanks.
Finally figured out sfdisk.  But there is a small oddity.  The following 
is the output from a optical disk I partitioned with fdisk:

[root at jukey admin]# fdisk /dev/sdi
Note: sector size is 2048 (not 512)

Command (m for help): p

Disk /dev/sdi: 255 heads, 63 sectors, 78 cylinders
Units = cylinders of 16065 * 2048 bytes

    Device Boot    Start       End    Blocks   Id  System
/dev/sdi1             1        78   2506014   fd  Linux raid autodetect

Command (m for help):

Next is one I did with sfdisk:

Note: sector size is 2048 (not 512)

Command (m for help): p

Disk /dev/sdj: 255 heads, 63 sectors, 78 cylinders
Units = cylinders of 16065 * 2048 bytes

    Device Boot    Start       End    Blocks   Id  System
/dev/sdj1             1        78   2506138   fd  Linux raid autodetect

Why are the # of blocks different? Here is my file I put my partition 
info in for sfdisk:

0,78,fd
\n
\n
\n

I tried the with "1,78,fd" but then it created the partition starting at 
2 instead of 1.

On Thursday, October 31, 2002, at 03:33  PM, John L. Bass wrote:

> 	Sorry, last sentence should be "without user input".
>
> see sfdisk which can accept input as one line per partition
> as per it's man page:
>
>        sfdisk reads lines of the form
>               <start> <size> <id> <bootable> <c,h,s> <c,h,s>
>        where each line fills one partition descriptor.
>
> John
> _______________________________________________
> NCLUG mailing list       NCLUG at nclug.org
>
> To unsubscribe, subscribe, or modify your settings, go to:
> http://www.nclug.org/mailman/listinfo/nclug
>
---------------------------------------------------------------------------------------------------
C.J. Keist                                                     Phone: 
970-491-0630
UNIX/Network Manager                           Fax: 970-491-5569
Colorado State University                        email: 
cjay at engr.colostate.edu
Dean of Engineering

I just want the chance to prove, "Money can't buy happiness"....




More information about the NCLUG mailing list