On Wed, 26 Feb 2003, Steven Timm wrote: > > Lately I have been getting some replacement disks which either > have no pre-existing partitions on them or have bad pre-existing > partitions from earlier versions of linux. > > I am trying to put a sfdisk command in the %pre section of my kickstart. > > something like: > > sfdisk /tmp/hda << EOD > 0 3000 L > 3001 2000 S > 5002 > > EOD > > > -------------- > the kickstart file can find the sfdisk command, but it gives > me the error message that /tmp/hda doesn't exist...and sure > enough, when I add an "ls /tmp" statement for debugging purposes, > it doesn't exist. > > My question is--is there any way to run an "sfdisk" command > in the %pre section of kickstart and let it actually find and > do something to the disks? Check the manuals, but something like this: mknod b 3 0 /tmp/hda sfdisk ... rm /tmp/hda I personally have been using dd (to ensure there are not partitions) and fdisk, piping commands into it. fdisk has the advantage it's part of busybox. Also, I'm not using ks, but the relevant procedures are the same. -- Please, reply only to the list.