diff options
author | Rod Whitby <rod@whitby.id.au> | 2006-01-07 08:58:44 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-01-07 08:58:44 +0000 |
commit | 8fb6b2d3d410ad2badf0c99ed7a66b698aafaa17 (patch) | |
tree | 8a700d795bdf33061b8bccc353fe0aaffa044036 /packages/slugos-init/files/boot/ram | |
parent | 0b67482ddc4fe571d16fa094627abb447b9a8edb (diff) |
slugos: Major rename of common SlugOS files and directories from openslug to slugos.
Diffstat (limited to 'packages/slugos-init/files/boot/ram')
-rw-r--r-- | packages/slugos-init/files/boot/ram | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/slugos-init/files/boot/ram b/packages/slugos-init/files/boot/ram new file mode 100644 index 0000000000..66d46a7089 --- /dev/null +++ b/packages/slugos-init/files/boot/ram @@ -0,0 +1,47 @@ +#!/bin/sh +# boot from the hard disk partition "$1" (which +# must be given) using options from the rest of +# the command line. +# +/sbin/leds -A '!gr' +# +# Use the standard init path (see /etc/init.d/rcS) +export PATH=/sbin:/bin:/usr/sbin:/usr/bin +# +# Load the helper functions +. /etc/default/functions +# +if test -n "$1" +then + device="$1" + shift + echo "boot: rootfs: mount $* $device" + # + # prepare the device. This uses tmpfs to avoid dependency + # on non-built-in file systems and because tmpfs can expand + # to bigger than the 10MByte ram0 partition used before. + # The 'device' is currently unused. + if mount -t tmpfs "$@" tmpfs /mnt + then + cd / + # filter out boot (with zimage), linuxrc and anything + # below /var, keep dev or the boot will fail (note that + # nothing is mounted this early in the bootstrap). + find . -mount -print | + sed '\@^./boot/@d;\@^./boot$@d;\@^./linuxrc@d;\@^./var/@d' | + cpio -p -d -m -u /mnt + # checkmount checks for sh, init and no .recovery plus + # either mnt or initrd, mnt must exist! + if checkmount /mnt + then + # pivot to /mnt + cd / + swivel mnt mnt + # swivel failed + fi + # Failure: unmount the partition. + umount /mnt + fi +fi +# fallback - use the flash boot +exec /boot/flash |