mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
773 B

# read root parameter from cmdline
root=$(sed 's/.*\<root=\([^ ]*\).*/\1/' /proc/cmdline)
# set $(< /proc/cmdline ) ; for arg ; do [[ ${arg} == root=* ]] && root=${arg#root=}
if [ ! -e "$root" ]
then
echo "your root <$root> does not exist."
else
# FIXME mount ro if /proc/cmdline says so...
mount $root /real-root
fi
# thanks udevd. you did a great job.
# now go away and let the real system do its work.
echo "terminating udevd..."
killall udevd
sleep 1
rm -rf /dev/.udev
if [ -e /real-root/dev ]
then
mount --move /dev /real-root/dev
mount --move /sys /real-root/sys
mount --move /proc /real-root/proc
else
echo "outch. /real-root/dev does not exist."
fi
echo "going real..."
if [ -x /real-root/sbin/init ]
then
exec /sbin/run_init /real-root /sbin/init
fi