3 # Copyright Matthias Hentges (c) 2005
5 # License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the GPL)
11 echo "ERROR: $1" >/dev/tty0
12 exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
15 # This function is activated by init.altboot by calling this script with the "run" option
18 test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"
20 echo -n "Mounting rootfs rw..." >/dev/tty0
21 mount -o remount,rw / >/dev/tty0 2>&1 && echo ok >/dev/tty0|| die "mount -o remount,rw / failed"
23 test -z "$SPITZ_HDD_PART" && SPITZ_HDD_PART="/dev/hda1"
24 mount -t proc proc /proc || echo "Mounting /proc failed!"
26 # Note: Redirecting STDIN & STDOUT is required, cardmg will die otherwise
27 cardmgr -o < /dev/tty0 > /dev/tty0 2>&1 || echo "cardmgr -o failed!"
29 # I've seen busybox die a horrible death on "!"...
30 if (mount -t auto $SPITZ_HDD_PART /media/hdd)
34 echo "ERROR: mount -t auto $SPITZ_HDD_PART /media/hdd failed!"
35 exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
38 # echo -n "Generating device files..." >/dev/tty0
39 # /etc/init.d/devices start && echo ok >/dev/tty0|| die "FAILED"
41 # FIXME: generate device-files
43 echo -n "Loading SD kernel module..."
44 /sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed"
46 echo -n "Mounting $SD_MOUNTPOINT..." >/dev/tty0
47 /bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT >/dev/null 2>&1 && echo ok >/dev/tty0|| die "/bin/mount -t auto -o defaults,noatime $SD_DEVICE $SD_MOUNTPOINT failed"
51 # Give the SD and CF mounting some time. This is a must for SD
54 # Check for a real fs and loop-images.
55 check_target "$SD_MOUNTPOINT" >/dev/tty0
61 title) echo "$M_TITLE";;
62 run) run_module "$2";;