summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinitrd/initrd-stuff/init42
-rwxr-xr-xinitrd/mkdxsinitrd7
-rw-r--r--installer/distro-specs/exclude-common1
-rw-r--r--installer/distro-specs/exclude-suse-10.028
-rwxr-xr-xinstaller/ld4-inst35
5 files changed, 69 insertions, 44 deletions
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index d239e170..53ca1f95 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -2,11 +2,11 @@
# Description: main script for new type of initial ramdisk for
# linux diskless clients version 4
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 31-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.3d
+# Version: 0.2.3f
# functions common for all distros
errmsg="functions file contains a lot of script \
@@ -101,6 +101,11 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
# if unionfs should be used
unionfs*)
UNIONFS=1;;
+ # if cowloop should be used, only ontop of network block device and in
+ # combination with classical fs, like ext2 useful
+ cowloop*)
+ COWLOOP=1
+ COWSIZE=${opts#cowloop=};;
# dnbd server:port
dnbdroot=*)
NBD=dnbd # name of kernel module
@@ -280,11 +285,6 @@ if [ -z "${DNBDOPT}" -a -z "${NBDOPT}" ] ; then
nfsmnt ${NFSROOT} ${MODPRV}
fi
-# if additional sources should be used for a combined root filesystem
-if [ -n ${UNION} ] ; then
- :
-fi
-
# get the complete collection of kernel modules available
mount -n --bind /mnt/lib/modules/${KERNEL} /lib/modules/${KERNEL} || \
error " The requested modules directory does not exist. That could mean:\n\
@@ -299,13 +299,34 @@ hwautocfg &
# try to use unionfs for rw access if available
RWDIR=/dev/shm
-if [ -n "${UNIONFS}" ] ; then
+if [ -n "${UNIONFS}" -o -n "${UNION}" ] ; then
modprobe ${MODPRV} unionfs || {
error " Loading of UnionFS failed - Either module is not present or \
module\n does not match the running kernel. If you do not want to see this \
\n message remove the token 'unionfs' from kernel command line." nonfatal
UNIONFS=""; }
fi
+if [ -n "${COWLOOP}" ] ; then
+ modprobe ${MODPRV} cowloop || {
+ error " Loading of Copy On Write (COW - special block device) module \
+failed -\n Either module is not present or module does not match the \
+running\n kernel. If you do not want to see this message remove the token \
+'cowloop' from kernel command line." nonfatal
+ COWLOOP=""; }
+ if [ -z "${NBD}" -o -n "${UNIONFS}" ] ; then
+ error " Loading of cow module is of no sense if no network block device \
+is used or\n UnionFS was specified as read write layer too. Remove UnionFS \
+token from\n kernel commandline if cowloop should be used instead."
+ COWLOOP="";
+ fi
+fi
+
+# if additional sources should be used for a combined root filesystem
+# probably more sources should be merged into union (${UNION} is defined)
+if [ -n "${UNION}" ] ; then
+ # unionctl
+ :
+fi
# setup of client root filesystem dependent on the availability of UnionFS
msg="Starting ldconfig - switch it off via kernel cmdline option 'noldsc'"
@@ -315,13 +336,14 @@ if [ -n "${UNIONFS}" ] ; then
mkdir -p ${RWDIR}/union ${RWDIR}/uniontmp
mount -n -t tmpfs none ${RWDIR}/uniontmp
mount -n --move /mnt /root
- # probably more sources should be merged into union (${ADDFS} is defined)
- mount -n -t unionfs -o dirs=${RWDIR}/uniontmp=rw:/root=${NFSRO}ro${ADDFS} \
+ mount -n -t unionfs -o dirs=${RWDIR}/uniontmp=rw:/root=${NFSRO}ro \
none /mnt
mkdir -p /mnt/uniontmp
mount -n --move ${RWDIR}/uniontmp /mnt/uniontmp
# run ldconfig if not switched off via kernel command line
[ -z "${NOLDSC}" ] && echo $msg && ldconfig /etc/ld.so.cache &
+elif [ -n "${COWLOOP}" -a -n "${NBD}" ] ; then
+ :
else
echo "Using bind mounts to ramdisk for rw access"
mount -n -t tmpfs -o size=${TMPFSSIZE} ramfs ${RWDIR}
diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd
index c5bc92fd..5c6865be 100755
--- a/initrd/mkdxsinitrd
+++ b/initrd/mkdxsinitrd
@@ -3,10 +3,10 @@
# Description: universal (distro independent) generator for initial
# ramdisks for linux diskless clients
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 31-03-2006
# Nico Dietrich
#
-# Version: 0.3.1e
+# Version: 0.3.1f
#
# Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg
@@ -373,6 +373,9 @@ for i in ${FSMODULES}; do
done
fi
+# if unionfs
+cobi unionctl bin &>/dev/null || echo "Program unionctl not found"
+
# distro specific additional stuff
case "${DISTRO}" in
debian*)
diff --git a/installer/distro-specs/exclude-common b/installer/distro-specs/exclude-common
index 9fffa442..3138e283 100644
--- a/installer/distro-specs/exclude-common
+++ b/installer/distro-specs/exclude-common
@@ -26,4 +26,3 @@
- .svn
- *~
- *lost+found*
-
diff --git a/installer/distro-specs/exclude-suse-10.0 b/installer/distro-specs/exclude-suse-10.0
index 7e49a641..b555d99b 100644
--- a/installer/distro-specs/exclude-suse-10.0
+++ b/installer/distro-specs/exclude-suse-10.0
@@ -1,22 +1,4 @@
-+ /bin
-+ /boot
-+ /dev
-+ /etc
-+ /home
-+ /lib
-+ /lib64
+ /media
-+ /mnt
-+ /opt
-+ /proc
-+ /root
-+ /sbin
-+ /sys
-+ /tmp
-+ /usr
-+ /var
-- .svn
-- *~
- *.rpmsave
- *.rpmnew
- *.YaST2save
@@ -25,13 +7,7 @@
- /lib/klibc/events/*
- /boot/initrd*
- /boot/grub
-- /dev/*
- /etc/shadow*
-- /proc/*
-- /sys/*
-- /tmp/*
-- /root/*
-- /home/*
- /var/cache/man/*
- /var/lib/YaST2/you/mnt/*
- /var/lib/hardware/*
@@ -42,8 +18,8 @@
- /var/lib/xdm
- /usr/share/vmware/*
- *lost+found*
-- /mnt/*
- /media/*
- /opt/kde3/share/autostart/SUSEgreeter.desktop
- /opt/kde3/share/autostart/suseplugger.desktop
-- /*
+- /opt/kde3/share/autostart/susewatcher.desktop
+- /opt/kde3/share/autostart/profile_chooser-autostart.desktop
diff --git a/installer/ld4-inst b/installer/ld4-inst
index 9bb4c6c3..0a354501 100755
--- a/installer/ld4-inst
+++ b/installer/ld4-inst
@@ -173,7 +173,7 @@ configure() {
ask "Path for client system: " rootdir $rootdir
ask "Path for tftpboot: " tftpbootdir $tftpbootdir
- ask "Which network do you want to use for DXS? (A.B.C.0) " netname $netname
+ ask "Which network do you want to use for DXS? (A.B.C.0): " netname $netname
ask "Which netmask should be used? (255.B.C.0): " netmask $netmask
ask "What is your servers IP for NFS, DHCP and TFTP? " server $server
# noetig??
@@ -198,7 +198,9 @@ configure() {
# list available kernels and allow to chose from
# nfs / nbd / squash-fs?
-
+ ask "Would you like to use NBD? (y/N): " nbdyes $nbdyes
+ ask "Which kind of NBD export (ext2/squashfs)?: " nbdfs $nbdfs
+
# password for pxeboot-menu (caution: you can easily retrieve it in clear
# text!!)
@@ -207,14 +209,37 @@ configure() {
copy_system() {
+ # allow generic (identical over different versions) or specific exclude
+ # files
+ if [ -e distro-specs/exclude-${client_distro}-${client_distro_ver} ] ; then
+ local excludefile="distro-specs/exclude-${client_distro}-${client_distro_ver}"
+ else
+ local excludefile="distro-specs/exclude-${client_distro}"
+ fi
+ echo $excludefile
echo -e "\n\nSyncing system now\nPlease enter root password of client machine\n"
rsync -avDe ssh --delete --exclude-from=distro-specs/exclude-common \
- --exclude-from=distro-specs/exclude-${client_distro}-${client_distro_ver} \
- ${rsyncsource} ${rootdir} || { echo "Rsync failed" ; exit 1 ; }
+ --exclude-from=${excludefile} ${rsyncsource} ${rootdir} || \
+ { echo "Rsync failed" ; exit 1 ; }
# generate error message in case rsync didn't work and exit.
- # TODO: mksquashfs (background process)
+}
+
+create_nbd() {
+ if [ "$nbdyes" = "yes" -o "$nbdyes" = "y" -o "$nbdyes" = "Y" ] ; then
+ # TODO: mksquashfs (background process)
+ if [ "$nbdfs" = "squashfs" ] ; then
+ echo -e "\nGenerating "
+ if `which mksquashfs` ; then
+ mksquashfs ${rootdir} ${rootdir}.squashfs &
+ else
+ echo -e "Tool 'mksquashfs' not found, skipping"
+ fi
+ else
+ echo -e "\nGenerating "
+ fi
+ fi
}
create_initrd() {