Listing 1. make.dev.hda

#! /bin/sh

# A script to restore the partition data of a hard
# drive and format the partitions. Created at the
# bare metal backup time by the Perl script
# make.fdisk. This script replaces make.partitions,
# which was written manually.

mke2fs /dev/hda1
mke2fs /dev/hda5
mke2fs /dev/hda6
mke2fs /dev/hda7
mke2fs /dev/hda8
mkswap /dev/hda9

mkdir /target/
mount /dev/hda8 /target/
mkdir /target/boot
mount /dev/hda1 /target/boot
mkdir /target/home
mount /dev/hda6 /target/home
mkdir /target/usr
mount /dev/hda5 /target/usr
mkdir /target/var
mount /dev/hda7 /target/var