[NCLUG] Fwd: Howto partition a drive from a script???
Gabriel L. Somlo
somlo at acns.colostate.edu
Thu Oct 31 16:44:36 MST 2002
CJ,
I'm not familiar with sfdisk, but you can place all the keystrokes you
would normally type into fdisk in a file, and then
cat fdisk.config | fdisk /dev/whatever_disk_device
The file would look something like this:
----------------------begin fdisk.config--------------------
o
n
p
1
1
130
n
p
2
131
1000
n
p
3
1001
t
1
82
p
w
------------------------end fdisk.config--------------------
The above is exactly what you would have to type into fdisk to obtain
the following:
Device Boot Start End Blocks Id System
/dev/sda1 1 130 1044193+ 82 Linux swap
/dev/sda2 131 1000 6988275 83 Linux
/dev/sda3 1001 4461 27800482+ 83 Linux
I've used this successfully on lots of machines before.
Hope this helps,
Gabriel
On Thu, Oct 31, 2002 at 04:21:47PM -0700, Christopher C.J. Keist wrote:
> Thanks.
> Finally figured out sfdisk. But there is a small oddity. The following
> is the output from a optical disk I partitioned with fdisk:
More information about the NCLUG
mailing list