diff options
author | Dirk | 2012-09-27 16:42:17 +0200 |
---|---|---|
committer | Dirk | 2012-09-27 16:42:17 +0200 |
commit | b67c8a8d0dfdd62d6853a70915def015b4732c3b (patch) | |
tree | 64abed7e337d2272b87797864844f2340e529c3d /data | |
parent | Skeleton of mkinitramfs ... (diff) | |
download | tm-scripts-b67c8a8d0dfdd62d6853a70915def015b4732c3b.tar.gz tm-scripts-b67c8a8d0dfdd62d6853a70915def015b4732c3b.tar.xz tm-scripts-b67c8a8d0dfdd62d6853a70915def015b4732c3b.zip |
Stage3.1 init script.
Diffstat (limited to 'data')
-rw-r--r-- | data/README.data | 9 | ||||
-rwxr-xr-x | data/stage3.1/init | 45 |
2 files changed, 54 insertions, 0 deletions
diff --git a/data/README.data b/data/README.data index e69de29b..fdf10a47 100644 --- a/data/README.data +++ b/data/README.data @@ -0,0 +1,9 @@ +This directory contains the config and share-able stuff for the InitRamFS. The +following structure applies + +~/data/base - distro-independent fall-back files +~/data/<distroname>/base - distro-dependent version-independent files +~/data/<distroname>/<distro_ver> - distro-dependenent version-dependent files + +The principle should be pretty simple - copy all from very generic to very +specific overwriting the generic files. diff --git a/data/stage3.1/init b/data/stage3.1/init new file mode 100755 index 00000000..53420983 --- /dev/null +++ b/data/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/busybox sh +unset BOOT_IMAGE initrd +# new style of pivoting (switch_root or run-init) +exec /bin/switch_root -c dev/console /mnt /sbin/init |