diff options
author | Michael Neves | 2012-09-05 15:59:28 +0200 |
---|---|---|
committer | Michael Neves | 2012-09-05 15:59:28 +0200 |
commit | 7c3584479e0d5a08550c7e1c9187adb23ef2b2fd (patch) | |
tree | db0f7783a733417debdea702a01bc7a4cffc71c2 /minilinux/rootfs | |
parent | remove test.. (diff) | |
download | osib-7c3584479e0d5a08550c7e1c9187adb23ef2b2fd.tar.gz osib-7c3584479e0d5a08550c7e1c9187adb23ef2b2fd.tar.xz osib-7c3584479e0d5a08550c7e1c9187adb23ef2b2fd.zip |
minilinux verzeichnisstruktur
Diffstat (limited to 'minilinux/rootfs')
-rwxr-xr-x | minilinux/rootfs/stage3.1/init | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/minilinux/rootfs/stage3.1/init b/minilinux/rootfs/stage3.1/init new file mode 100755 index 0000000..1f2cb31 --- /dev/null +++ b/minilinux/rootfs/stage3.1/init @@ -0,0 +1,45 @@ +#!/bin/sh +# Copyright (c) 2012 - OpenSLX GmbH +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# +# First script for initial ramfs for OpenSLX linux stateless clients +############################################################################# + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/openslx/bin:/openslx/sbin + +mount -n -t tmpfs -o 'mode=755' run "/run" + +# mount the important standard directories +[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc +[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys + +#modprobe -a squashfs aufs 2>/dev/null +insmod /lib/modules/3.2.0-24-generic-pae/kernel/fs/squashfs/squashfs.ko +insmod /lib/modules/3.2.0-24-generic-pae/kernel/ubuntu/aufs/aufs.ko + +mkdir -p /dev/shm/union /dev/shm/uniontmp /rorootfs +mount -n /mnt/openslx.sqfs /rorootfs + +mount -n -t tmpfs none /dev/shm/uniontmp + +mount -n -t aufs -o br:/dev/shm/uniontmp:/rorootfs=ro none /mnt +mkdir -p /mnt/uniontmp +mount -n --move /dev/shm/uniontmp /mnt/uniontmp + + +for mnt in proc sys run ; do + #mount -n --move $mnt /mnt/$mnt + umount -n $mnt +done + +#/bin/sh +unset BOOT_IMAGE initrd +# new style of pivoting (switch_root or run-init) +exec /sbin/switch_root -c dev/console /mnt /sbin/init |