On Sat, Sep 28, 2002 at 02:52:22PM +0800, John wrote: > > In the ks file you can write shell scripts. I'm not sure whether you have the > full power of bash available, you might have to assume you have and see what > doesn't work. > > You also have fdisk, and (maybe cut or awk). > fdisk can tell you what partitions already exist: > [root@numbat root]# fdisk -l /dev/hda > > Disk /dev/hda: 255 heads, 63 sectors, 3737 cylinders > Units = cylinders of 16065 * 512 bytes > > Device Boot Start End Blocks Id System > /dev/hda1 1 3 24066 83 Linux > /dev/hda2 * 4 5 16065 6 FAT16 > /dev/hda3 6 3737 29977290 83 Linux > [root@numbat root]# > > You can pipe stuff into fdisk: > fdisk /dev/hda <<== For shell scripts, sfdisk is better suited to serve your needs. It's more robust than fdisk and accepts much simpler command syntax. check it out. man 8 sfdisk cheers, Karen -- Karen Shaeffer Neuralscape; Santa Cruz, Ca. 95060 shaeffer@xxxxxxxxxxxxxxx http://www.neuralscape.com