summaryrefslogtreecommitdiffstats
path: root/tools/i386/netboot/make_boot_network
blob: b02e6657cb345cd73f617d9846dd25e9005884a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

type=$1
[ -z "$type" ] && { echo "usage: $0 <network card type> (eg: 3c90x)" ; exit 1; }

if [ ! -d "$type" ]; then
        echo "$type: no such network driver"
        echo "available drivers are:"
        echo `find -not -name CVS -type d -maxdepth 1 -printf '%P\n'`
        exit 1;
fi

[ -e menu.lst ] || { echo "missing file menu.lst, create one based on menu.lst.example"; exit 1; }

ln -sf ${type}/stage1 stage1
ln -sf ${type}/stage2 stage2

mformat a:
mcopy {stage1,stage2} a:
mcopy menu.lst a:menu.lst

./grub --batch <<EOF
install (fd0)/stage1 d (fd0) (fd0)/stage2 p (fd0)/menu.lst $automatic
EOF