[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

192 byte script to partition and format harddrive



Just found this leftover from my changes for the telemetry box
distribution.

The script deletes all existing paritions and sets up 3 partitions.

20M /boot
200M swap
rest /

and then formats all of them.

I used it to give the installer the option of skipping all the
parititoning/formatting prompts. See 
http://openrock.net/tb/patches/boot-floppies* for the patches I applied to
the boot-floppies.

#!/bin/sh
echo -e "1\nd\n2\nd\n3\nd\n4\nd\nn\np\n1\n\n+20M\na\n1\nn\np\n2\n\n+200M\nt\n2\n82\nn\np\n3\n\n\nw\n"
 | fdisk /dev/hda >/dev/null
mkswap /dev/hda2
mkext2 /dev/hda1
mkext2 /dev/hda3



Reply to: