diff options
author | Jonathan McDowell <noodles@earth.li> | 2005-04-24 19:53:10 +0000 |
---|---|---|
committer | Jonathan McDowell <noodles@earth.li> | 2005-04-24 19:53:10 +0000 |
commit | cbcd413d8cc5f9251b9f6034353d4969af4e5e66 (patch) | |
tree | f94bac15e9687aa692c7ff2a22924fb3475fa87f | |
parent | e0829507630c9146b420017c5b3ae5294997ee01 (diff) |
Don't try to unmount the real root; it won't work as we're running off it.
BKrev: 426bf926Q3247SQecFLnPjxj70vicg
-rw-r--r-- | packages/pivotinit/spitz/init | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/pivotinit/spitz/init b/packages/pivotinit/spitz/init index e69de29bb2..41e4aff0db 100644 --- a/packages/pivotinit/spitz/init +++ b/packages/pivotinit/spitz/init @@ -0,0 +1,25 @@ +#!/bin/sh + +mount -t proc proc /proc +mount -o remount,rw / +cardmgr -o +umount /proc +echo Mounting hda1. +mount -t ext3 /dev/hda1 /media/hdd + +# For some reason the Spitz tar doesn't create the devices. +if [ ! -b /media/hdd/dev/hda1 ]; then + echo Creating non existant device files. + /media/hdd/sbin/makedevs -D /media/hdd/etc/device_table -r /media/hdd/ +fi + +if [ -e /media/hdd/sbin/init -o -L /media/hdd/sbin/init ]; then + echo "Found /sbin/init on HD; pivoting." + cd /media/hdd + pivot_root . media/realroot + cd / + exec /sbin/init +fi + +echo Dropping to a shell due to problems. +exec /bin/sh |