File: ramirez.dinstall

package info (click to toggle)
lg-issue37 2-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,208 kB
  • ctags: 160
  • sloc: sh: 44; makefile: 37
file content (64 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
#
# magic script for UHS NT Rollout
#
# Gilbert Ramirez
# Technical Services
# University Health System

# I run fdisk to get INFO *before* the clear because the machine
# might have an empty CD-ROM in it. fdisk will try to probe the cdrom
# and the kernel will spit out error messages about missing media.
# therefore, I clear the screen real quick.

INFO=`fdisk -l | head -6 | grep ^Disk`
clear

HEADS=`echo $INFO | sed -e "s/^.*: //" | sed -e "s/ heads.*//"`

SECTORS=`echo $INFO | sed -e "s/^.*heads, //" | sed -e "s/ sectors.*//"`

CYLINDERS=`echo $INFO | sed -e "s/^.*sectors, //" | sed -e "s/ cylinders.*//"`

echo This disk has $CYLINDERS cylinders, $HEADS heads, and $SECTORS sectors.

echo Running fdisk to make one gigantic FAT partition.
fdisk /dev/hda > /dev/null 2> /dev/null <<COMMANDS
d
1
d
2
d
3
d
4
n
p
1
1
$CYLINDERS
t
1
6
a
1
w
COMMANDS


CYLCALC=`cylcalc 500 $HEADS $SECTORS`
echo Formatting 500MB FAT filesystem with $CYLCALC cylinders out of $CYLINDERS.
mformat -t $CYLCALC -h $HEADS -s $SECTORS -H $SECTORS c:
sync

echo Fixing boot sector.
fixbs /dev/hda1

sync

echo
echo
echo Place the next floppy in the drive and press \<ENTER\> to reboot...

read JUNK
reboot