summaryrefslogtreecommitdiff
path: root/release/SETUP
blob: 56da063efa45f4209f61f3fb5caa3a93e9983c57 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# Setup critical hurd translators

BOOT_DEV="$1"
if [ ! "$BOOT_DEV" ]; then
  echo "No device to install a boot loader was specified."
  echo "Here are some possible devices to use:"
  /bin/devprobe sd0 hd0 sd1 hd1
  echo -n "Boot device? [none] "
  read BOOT_DEV
fi

if [ "$BOOT_DEV" ]; then
  if /bin/devprobe -s "$BOOT_DEV"; then true; else
    echo 2>&1 "$0: $BOOT_DEV: No such device known"; exit 1
  fi
fi

set -v

# Make sure the filesystem is writable
fsysopts / --writable 

# Set up standard passive translators
/bin/settrans -c /servers/socket/local /hurd/pflocal
/bin/settrans -c /servers/crash /hurd/crash

# Setup crucial devices
cd /dev
/bin/sh ./MAKEDEV std ptyp ptyq

set +v

if test "$BOOT_DEV" && /bin/sh ./MAKEDEV "$BOOT_DEV"; then
  echo -n "Install grub as main boot record on $BOOT_DEV? [y] "
  read yn
  case "$yn" in
    "" | "[yY]*")
      /bin/sh /INSTALL-GRUB-MBR /dev/r$BOOT_DEV;;
  esac
fi

echo 'Hit ^C now for shell prompt or RET to reboot'
read response
sync
reboot