Skip to contentSkip to conversation

mke2fs hangs ?

DISCUSSION atze 1 participant 1 message Nov 9, 2001

lore
Share & tools
lore

atze

author
#0 lore raw

hy!
maybe i'm a little bit off-topic but a had no other idea where to post my prob.
i built a kickstart disk myself, using the 2.4.8 kernel, ramdisk, whatever, and everythings running wuite fine indeed.

my only problem is this: when executine the script below to initiate the hard disks, the script hangs. right after sfdisk partitioned the disk with the data from its input file, mke2fs shows it initial line (mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09) and then stops. to go on with the script one has to press any key, shift, tab, caps, whatever..

anyone has a clue what could cause that behaviour ?

thx to all
thomas

#!/bin/sh
export PATH=/bin:/usr/bin:/usr/sbin

DS=sfdisk -s /dev/hda

echo -n "partitioning /dev/hda..."

if [ $DS -gt 500000 -a $DS -lt 1000000 ]; then

       PT="min";
elif [ $DS -gt 1000000 -a $DS -lt 7000000 ]; then
       PT="mid";
elif [ $DS -gt 7000000 ]; then
       PT="max";
else
       echo "too small";
       exit 1;

fi

echo $PT

sfdisk -uM /dev/hda < /etc/inst/partitions.$PT 1>/dev/null 2>&1

mke2fs -q -c /dev/hda5 -L "/"
mke2fs -q -c -b 1024 /dev/hda1 -l "/boot"

if [ $PT = "max" ]; then

       mke2fs /dev/hda6 -q -L "/root";
       mke2fs /dev/hda7 -q -L "/tmp";
       mke2fs /dev/hda8 -q -L "/var";
elif [ $PT = "mid" ]; then
       mke2fs /dev/hda6 -q -L "/tmp";
       mke2fs /dev/hda7 -q -L "/var";
elif [ $PT = "min" ]; then
       mke2fs /dev/hda6 -q -L "/var";

fi