Subject: fdisk from a scripts
To: None <netbsd-help@netbsd.org>
From: Wolfgang Rupprecht <wolfgang+gnus20020828T110430@wsrcc.com>
List: netbsd-help
Date: 08/28/2002 12:00:42
Is it possible to run fdisk from a script and setup a virgin disk?
Does anyone have any working examples to copy?  The manpage is less
than clear.

I'd like to wipe a disk with 'dd if=/dev/zero of=/dev/rwd1d bs=64k"
and rebuild a bootable netbsd/i386 disk from scratch.

        to=wd1
        dd if=/dev/zero of=/dev/r${to}d bs=64k count=128
        fdisk -0 -s 169 /dev/${to}

The above seems to do nothing...

The goal of this is to do automated backups by making a fully-bootable
and runnable snapshot from cron.  The price of tape drives and tapes
is insane, while disks are getting cheaper all the time.

-wolfgang
-- 
       Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
		    http://www.wsrcc.com/wolfgang/
      Hackers don't spread viruses.  Microsoft spreads viruses.