diff options
-rw-r--r-- | initramfs/stage3-stuff/etc/messages | 23 | ||||
-rw-r--r-- | initramfs/stage3-stuff/etc/messages.de | 22 | ||||
-rwxr-xr-x | initramfs/stage3-stuff/init | 48 |
3 files changed, 36 insertions, 57 deletions
diff --git a/initramfs/stage3-stuff/etc/messages b/initramfs/stage3-stuff/etc/messages index 11a462bd..813aa4b3 100644 --- a/initramfs/stage3-stuff/etc/messages +++ b/initramfs/stage3-stuff/etc/messages @@ -1,5 +1,5 @@ # Copyright (c) 2003 - 2006 - RZ Uni Freiburg -# Copyright (c) 2006 - 2008 - OpenSLX GmbH +# Copyright (c) 2006 - 2009 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -10,7 +10,7 @@ # General information about OpenSLX can be found at http://openslx.org # # Messages file for all error and info messages generated during client -# bootup (within initialramfs) for OpenSLX linux diskless clients version 4 +# bootup (within initialramfs) for OpenSLX linux diskless clients version 5 # this file could be used for localization of error messages # messages from (slx) init @@ -39,7 +39,8 @@ machine or using\n a NVidia chipset then it would be advisable to switch on \ passing of the\n boot MAC address via kernel commandline (IPAPPEND=3) in \ your PXElinux\n configuration." init_nveth=" Your system uses a NVidia ethernet chip which might to fail to \ -get the\n original MAC address assigned. Use IPAPPEND=3 in your PXElinux \ configuration\n to get the boot MAC address passed on." +get the\n original MAC address assigned. Use IPAPPEND=3 in your PXElinux \ +configuration\n to get the boot MAC address passed on." init_errdhcp=" Did not get complete IP \ configuration via DHCP. You may want to add\n a vendor code identifier \ via kernel commandline (vci=VCI)." @@ -61,18 +62,10 @@ mean:\n * The kernel was updated but the demuxer was not run afterwards.\n\ * The mounted filesystem does not contain the modules directory at all.\n\ You might want to check the list of mounted filesystems and if /mnt is\n\ not empty run 'ls /mnt/lib/modules' to check." -init_loadaufs=" Loading of AUFS failed - Either the module is not present or \ -does \n not match the running kernel. If you do not want to see this \ -\n message remove the token 'aufs' from kernel command line." -init_noaufs_butufs=" AUFS was chosen as Unification FS but is not available. \ -However UnionFS seems to be available. To put it to use append 'unionfs' to the \ -kernel command line." -init_noufs_butaufs=" UnionFS was chosen as Unification FS but is not available. \ -However\n AUFS seems to be available. To put it to use append 'aufs' to the\n \ -kernel command line." -init_loadufs=" Loading of UnionFS failed - Either the module is not present or \ -does \n not match the running kernel. If you do not want to see this message\ -\n remove the token 'unionfs' from kernel command line." +init_loadaufs=" Loading of AUFS and/or UnionFS failed - Either the module(s) \ +are not\n present or do not match the running kernel. If you do not want to \ +see\n this message add the token(s) 'noaufs'/'nounionfs' to your kernel \ +command\n line or remove the modules from your kernel module directory." init_loadunions=" Stacking of directories failed, because UnionFS/AUFS is not \ loaded." init_loadcow=" Loading of Copy On Write (COW - special block device) module \ diff --git a/initramfs/stage3-stuff/etc/messages.de b/initramfs/stage3-stuff/etc/messages.de index 9a44fe0e..24e04ff2 100644 --- a/initramfs/stage3-stuff/etc/messages.de +++ b/initramfs/stage3-stuff/etc/messages.de @@ -1,5 +1,5 @@ # Copyright (c) 2003 - 2006 - RZ Uni Freiburg -# Copyright (c) 2006 - 2008 - OpenSLX GmbH +# Copyright (c) 2006 - 2009 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -10,7 +10,7 @@ # General information about OpenSLX can be found at http://openslx.org # # Messages file for all error and info messages generated during client -# bootup (within initialramfs) for OpenSLX linux diskless clients version 4 +# bootup (within initialramfs) for OpenSLX linux diskless clients version 5 # this file could be used for localization of error messages # messages from (slx) init / Fehlermeldungen des SLX init @@ -65,24 +65,18 @@ der eingehaengten Dateisysteme pruefen und wenn /mnt\n nicht leer ist, \ 'ls /mnt/lib/modules' ausfuehren." init_loadunions=" Stapeln mehrerer Verzeichnisse nicht moeglich, da kein \ UnionFS/AUFS\n Modul geladen ist." -init_loadaufs=" Laden von AUFS schlug fehl - entweder das Modul ist \ +init_loadaufs=" Laden von AUFS/UnionFS schlug fehl - entweder das Modul ist \ nicht vorhanden, oder\n es passt nicht zum laufenden Kernel. Wenn Sie diese \ -Meldung nicht sehen\n wollen, entfernen Sie das Token 'aufs' von den Kernel \ -Start Optionen." -init_noaufs_butufs=" AUFS wurde als Unification FS angegeben, ist jedoch nicht \ -vorhanden. UnionFS\n steht aber scheinbar zu Verfuegung. Wenn Sie dieses nutzen \ -moechten fuegen\n Sie bitte 'unionfs' zu den Kernel Start Optionen hinzu." -init_noufs_butaufs=" UnionFS wurde als Unification FS angegeben, ist jedoch \ -nicht vorhanden. AUFS\n steht aber scheinbar zu Verfuegung. Wenn Sie dieses nutzen \ -moechten fuegen Sie\n bitte 'aufs' zu den Kernel Start Optionen hinzu." +Meldung nicht sehen\n wollen, fügen Sie das Token 'noaufs'/'nounionfs' den \ +Kernel Start\n Optionen hinzu oder loeschen Sie die Module." init_loadcow=" Laden von Copy On Write (COW - Spezielles Block Geraet) Modul \ schlug fehl -\n entweder das Modul nicht praesent oder es passt nicht zum \ laufenden\n Kernel. Wenn Sie diese Meldung nicht sehen wollen, entfernen sie \ das Token 'cowloop' aus den Kernel Start Optionen." init_loadufs=" Laden von UnionFS schlug fehl - entweder das Modul ist \ -nicht vorhanden, oder\n es passt nicht zum laufenden Kernel. Wenn Sie diese Meldung \ -nicht sehen wollen,\n entfernen Sie das Token 'unionfs' von den Kernel Start \ -Optionen." +nicht vorhanden, oder\n es passt nicht zum laufenden Kernel. Wenn Sie diese \ +Meldung nicht mehr sehen\n wollen, entfernen Sie das Token 'unionfs' von den \ +Kernel Start Optionen." init_cownonbd=" Laden des COW-Moduls ist sinnlos, wenn kein Netzwerk Block \ Geraet benutzt wird oder\n UnionFS als Lese- Schreib-Schicht spezifiziert \ wurde. Entfernen Sie das UnionFS Token aus\n den Kernel-Start-Optionen wenn \ diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init index d7866ead..81b4d155 100755 --- a/initramfs/stage3-stuff/init +++ b/initramfs/stage3-stuff/init @@ -96,6 +96,8 @@ tmpfssize="$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') \ cowsize="50%" rwdir=/dev/shm nfsro="nfs" +aufs=1 +unionfs=1 runinithook '00-started' @@ -198,8 +200,8 @@ in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup ldsc) ldsc="yes";; # simple union of base ro rootdir with tempfs on top - unionfs) - unionfs=1;; + nounionfs) + unionfs=0;; # additional source to unify root filesystem with; the top layer will be # the tempfs unionfs=*) @@ -209,8 +211,8 @@ in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup ldsc="yes" ;; # same for AUFS; alternative to unionfs - aufs) - aufs=1;; + noaufs) + aufs=0;; aufs=*) aufs=1 uniondirs=${opts#aufs=} @@ -660,8 +662,7 @@ fi runinithook '35-have-network-root' # get the complete collection of kernel modules available -mount -n --bind /mnt/lib/modules/${KERNEL} /lib/modules/${KERNEL} || \ - error "$init_moddir" +mount -n --bind /mnt/lib/modules /lib/modules || error "$init_moddir" # start hardware configuration as background process if not a special # debuglevel (21) is used for the option of manual hwautocfg start if [ ${DEBUGLEVEL} = 21 ] ; then @@ -676,29 +677,20 @@ fi runinithook '40-started-hw-config' union_type="" -# try to use unionfs for rw access if available -if [ -n "${unionfs}" ]; then - modprobe ${MODPRV} unionfs && union_type="UnionFS" - if [ -z "$union_type" ]; then - error "$init_loadufs" nonfatal - unset unionfs - # if unionfs is not available, check for aufs and inform user - modprobe ${MODPRV} -n aufs && error $init_noufs_butaufs - fi -fi # try to use aufs for rw access if available -if [ -n "${aufs}" ]; then - modprobe ${MODPRV} aufs && union_type="AUFS" - if [ -z "$union_type" ]; then - error "$init_loadaufs" nonfatal - unset aufs - # if aufs is not available, check for unionfs and inform user - modprobe ${MODPRV} -n unionfs && error $init_noaufs_butufs - fi +if [ ${aufs} -eq 1 ] && \ + modprobe ${MODPRV} aufs 2>/dev/null && \ + lsmod | grep -qe "^aufs" ; then union_type="AUFS" +elif [ ${unionfs} -eq 1 ] && \ + modprobe ${MODPRV} unionfs 2>/dev/null && \ + lsmod | grep -qe "^unionfs" ; then union_type="UnionFS" +else + error "$init_loadaufs" nonfatal + unset aufs unionfs fi # setup of client root filesystem dependent on the availability of UnionFS -if [ -n "${unionfs}" -o -n "${aufs}" ] ; then +if [ -n "${union_type}" ] ; then echo "Using ${union_type} for rw access" mkdir -p ${rwdir}/union ${rwdir}/uniontmp /rorootfs mount -n -t tmpfs none ${rwdir}/uniontmp @@ -815,7 +807,7 @@ if [ -n "${ldsc}" ] ; then error "$init_errldcfg" fi else - error "$init_infldcfg" nonfatal + [ $DEBUGLEVEL -gt 2 ] && error "$init_infldcfg" nonfatal fi runinithook '60-have-servconfig' @@ -905,7 +897,7 @@ runinithook '90-postinit-done' # unmount the bind mounted modules directory and nfs /tmp/scratch (if present) export ticks for ticks in 0 1 2 5 10 20 30; do - sleep $ticks && umount -n /lib/modules/${KERNEL} 2>/dev/null && break + sleep $ticks && umount -n /lib/modules 2>/dev/null && break error "$init_wait" nonfatal done mount 2>/dev/null | grep -q "/tmp/scratch type nfs" && \ @@ -913,7 +905,7 @@ mount 2>/dev/null | grep -q "/tmp/scratch type nfs" && \ sleep $ticks && umount -n /tmp/scratch 2>/dev/null && break done -mount 2>/dev/null | grep -q /lib/modules/${KERNEL} && error "$init_errumnt" +mount 2>/dev/null | grep -q /lib/modules && error "$init_errumnt" # check for inittab file (might fail for new style init -> upstart) test -f /mnt/etc/inittab || test -d /mnt/etc/event.d || error "$init_erritab" # close runlevel script for stuff to execute during early bootup |