#!/bin/bash #Simple shell script that creates the partition for Backtrack HD Install using Parallels #Author: Budh, budh -at- nagologic -dot- com #Warns the user that formatting procedure is taking place. clear echo "WARNING!!" echo "This procedure will wipe the content of the current hard drive." echo -n "Are you sure you want to continue. (y/n): "; read sAnswer if [ $sAnswer = "n" ] ; then echo "Leaving..." exit fi echo "Creating the partitions..." fdisk /dev/hda <<< $'n\np\n1\n\n+50M\nn\np\n2\n\n+256M\n\nn\np\n3\n\n\n\na\n1\nt\n2\n82\nw\nq\n' >/dev/null fdisk /dev/hda <<< $'p\nq\n'; mkfs.ext3 /dev/hda1 >/dev/null mkfs.ext3 /dev/hda3 >/dev/null