diff options
author | Dirk von Suchodoletz | 2007-01-30 19:27:46 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-01-30 19:27:46 +0100 |
commit | 7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5 (patch) | |
tree | eb6294af90a1b78e51bc75c96c0e0274b7b8225b /initramfs | |
parent | general kdm config now in /etc/functions (diff) | |
download | core-7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5.tar.gz core-7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5.tar.xz core-7f552dd5f09f7c7e8e069b1f1abcf214d5863ba5.zip |
Debugging output for level 20, 21, (22) ... see DebugLevel ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@659 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rwxr-xr-x | initramfs/initrd-stuff/bin/hwautocfg | 26 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 48 |
2 files changed, 55 insertions, 19 deletions
diff --git a/initramfs/initrd-stuff/bin/hwautocfg b/initramfs/initrd-stuff/bin/hwautocfg index 3c28a82d..ba164cd8 100755 --- a/initramfs/initrd-stuff/bin/hwautocfg +++ b/initramfs/initrd-stuff/bin/hwautocfg @@ -230,7 +230,8 @@ done . /etc/distro-functions # script run timer -[ $DEBUGLEVEL -eq 8 ] && echo "** HW setup started at $(sysup)" +[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 21 ] && \ + echo "** HW setup started at $(sysup)" # heavy debugging output in level 3 and above and specific for 11 [ $DEBUGLEVEL -gt 3 -a $DEBUGLEVEL -lt 8 -o $DEBUGLEVEL -eq 11 ] && \ @@ -271,9 +272,7 @@ done # start the knoppix hardware autodetection tool ( hwsetup -v > /tmp/hwsetup.info && echo "hwsetup" > /tmp/hwrun1 ) & - -# ACPI configuration - at least not needed with SuSE 9.3/10.0 -# needed for other distros? +[ $DEBUGLEVEL -eq 21 ] && echo "** started 1st hwdetection at $(sysup)" # AGP configuration (agpgart and chipset specific driver) modprobe ${MODPRV} agpgart || \ @@ -282,6 +281,7 @@ modprobe ${MODPRV} agpgart || \ # wait for /tmp/hwsetup.info to appear waitfor /tmp/hwrun1 50000 || \ error "$hcfg_hwsetup" +[ $DEBUGLEVEL -eq 21 ] && echo "** 1st hwdetection finished at $(sysup)" # load ide drivers first, takes a while to initialize for DRIVER in cmd64x hpt366 piix slc90e66 cs5520 it821x rz1000 \ triflex aec62xx cs5530 ns87415 sc1200 trm290 alim15x3 \ @@ -347,6 +347,7 @@ DRIVERLIST="${DRIVERLIST} ${DRIVER} " modprobe ${MODPRV} snd-pcm-oss modprobe ${MODPRV} snd-mixer-oss +[ $DEBUGLEVEL -eq 21 ] && echo "** module loading finished at $(sysup)" # rerun the knoppix hardware autodetection tool for USB and ide devices # like dvd or harddisk - wait a few seconds so hopefully the ide driver # is initialized @@ -354,7 +355,9 @@ modprobe ${MODPRV} snd-mixer-oss test -f /proc/bus/usb/devices || \ mount -n -t usbfs usbfs /proc/bus/usb 2>/dev/null [ -n "$IDE" ] && modprobe -q ide_generic 2>/dev/null +[ $DEBUGLEVEL -eq 21 ] && echo "** started 2nd hwdetection at $(sysup)" usleep 200 && hwsetup -v > /tmp/hwsetup.info +[ $DEBUGLEVEL -eq 21 ] && echo "** finished 2nd hwdetection at $(sysup)" # remaining drivers listed in /tmp/hwsetup.info cat /tmp/hwsetup.info| while read LINE ; do if strinstr "driver:" "${LINE}"; then @@ -395,12 +398,13 @@ if strinfile "SCSI" /tmp/hwsetup.info ; then >> /tmp/scanner-udev fi [ -x /bin/mdev ] && mdev -s & -# fixme - psmouse entladen, falls nicht vorhanden +[ $DEBUGLEVEL -eq 21 ] && echo "** finished module loading at $(sysup)" # configure some variables from configuration file - wait for dhcp or ldap # confiurator to complete cfgcomplete . /etc/machine-setup +[ $DEBUGLEVEL -eq 21 ] && echo "** finished waiting for config at $(sysup)" # run localizator and configure keyboard and console fonts DEFKEYTABLE="de-latin1-nodeadkeys" @@ -420,7 +424,8 @@ else fi # get idea of availabe harddisk partitions, put swap partitions into -# (/mnt)/etc/fstab and format and mount partitions of type 44 (unknown) +# (/mnt)/etc/fstab and format and mount partitions of type 44 (unknown) +[ $DEBUGLEVEL -eq 21 ] && echo "** starting hdd stuff at $(sysup)" for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \ sed -n -e '/device:/p' | sed -e 's/device: //') ; do fdisk -l /dev/$hd| sed -n "/^\/dev\//p" > /tmp/hd_part @@ -454,9 +459,13 @@ noexec\t 0 0" >> /tmp/fstab done # determine if tmp preparation should wait for format/mount or not [ -z "$part44" ] && echo "finished at $(sysup)" > /tmp/tmpready +[ $DEBUGLEVEL -eq 21 ] && echo "** finished hdd stuff at $(sysup)" # wait for completion of clients root filesystem in /mnt and add # previously generated files to /mnt/etc ... +[ $DEBUGLEVEL -eq 21 ] && \ + echo -e "** if you did not run hwautocfg in background and exited the \n\ +debug shell, expect to wait from now on a while ..." waitfor /tmp/fscmpl 40000 [ -f /tmp/fstab ] && cat /tmp/fstab >> /mnt/etc/fstab [ -f /tmp/scanner-udev ] && cat /tmp/scanner-udev \ @@ -490,7 +499,8 @@ cp /etc/xorg.conf ${D_XF86CONFFILE} [ -n "$part44" ] && waitfor /tmp/tmpready 20000 -# script run timer -[ $DEBUGLEVEL -eq 8 ] && echo "** HW setup finished at $(sysup)" +# script run timer or debug information +[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 21 ] && \ + echo "** HW setup finished at $(sysup)" echo "hwsetup finished at $(sysup)" > /tmp/hwcfg diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index eac22b2b..419ad956 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -104,7 +104,8 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup # ... or a specified debug level debug=*) DEBUGLEVEL=${opts#debug=} - [ $DEBUGLEVEL -eq 8 ] && echo "** SLX init started near $(sysup)" + [ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \ + echo "** SLX init started near $(sysup)" ;; # if configuration should be gathered by dhcp client dhcp) @@ -244,7 +245,11 @@ fi # server [ -z "$DHCP" -a -n "$LDAP" -a -z "$IPINFO" ] && error "$init_errldap" # set debug level and logfile -echo "Setting debuglevel to ${DEBUGLEVEL}" +if [ $DEBUGLEVEL -eq 20 ] ; then + echo "** Setting debuglevel to ${DEBUGLEVEL} at $(sysup)" +else + echo "Setting debuglevel to ${DEBUGLEVEL}" +fi export MODPRV=" " export LOGFILE if [ "${DEBUGLEVEL}" -gt 0 -a "${DEBUGLEVEL}" != 8 ] ; then @@ -253,11 +258,11 @@ if [ "${DEBUGLEVEL}" -gt 0 -a "${DEBUGLEVEL}" != 8 ] ; then LOGFILE="/var/log/dxs-boot.log" echo "1 4 1 7" >/proc/sys/kernel/printk [ "${DEBUGLEVEL}" -ge 2 ] && MODPRV="-v" - [ "${DEBUGLEVEL}" -gt 3 ] && { + [ "${DEBUGLEVEL}" -gt 3 -a "${DEBUGLEVEL}" -le 8 ] && { set -x # and the kernel too echo "7 7 7 7" >/proc/sys/kernel/printk; } - [ "${DEBUGLEVEL}" -gt 10 ] && set +x + [ "${DEBUGLEVEL}" -gt 10 -a "${DEBUGLEVEL}" -le 20 ] && set +x else # switch off most of kernel debug output echo "0 0 0 0" >/proc/sys/kernel/printk @@ -268,11 +273,14 @@ else [ "${DEBUGLEVEL}" != 8 ] && exec < /dev/null > /dev/null 2>&1 fi # load network adaptor modules +[ $DEBUGLEVEL -eq 20 ] && \ + echo "** loading all defined network adaptor modules at $(sysup)" for mod in ${NWMODULES}; do modprobe ${MODPRV} $mod || error "$init_errnwad" done # set up loopback networking (ipsetup - function defined in /etc/functions) +[ $DEBUGLEVEL -eq 20 ] && echo "** starting ip config at $(sysup)" ipsetup 127.0.0.1 255.0.0.0 0.0.0.0 127.255.255.255 lo # Xen bridge config @@ -310,6 +318,7 @@ if [ -n "$noipyet" ] ; then -o -z "$broadcast_address" ] && error "$init_errdhcp" ipsetup $clientip $subnet_mask $gateway $broadcast_address eth0 fi +[ $DEBUGLEVEL -eq 20 ] && echo "** finished ip config at $(sysup)" # ... or ldap if available (in background) [ -n "$LDAP" ] && ldapconf & # ... or via tftp file get (in background) @@ -322,7 +331,11 @@ if [ -n "${nbdmod}" ] ; then [ -x /bin/mdev ] && mdev -s [ -z "$nbdrfst" ] && nbdrfst=ext2 nbdhost=$(checkip $nbdhost) - echo "Diskless client using ${nbdmod} on $nbdhost:$nbdport with $nbdrfst" + if [ $DEBUGLEVEL -eq 20 ] ; then + echo "** starting setup of ${nbdmod} at $(sysup)" + else + echo "Diskless client using ${nbdmod} on $nbdhost:$nbdport with $nbdrfst" + fi # fixme: check for fs in /proc/filesystems before trying to load the module modprobe ${MODPRV} ${nbdrfst} || error "$init_errnbd" nonfatal @@ -388,8 +401,9 @@ if [ -n "${nbdmod}" ] ; then usleep $i mount -n -t $nbdrfst -o $RWRO $RDEV /mnt 2>/dev/null && break done + [ $DEBUGLEVEL -eq 20 ] && echo "** finished nw blockdev stuff at $(sysup)" elif [ -n ${iscsiserver} ] ; then - : + [ $DEBUGLEVEL -eq 20 ] && echo "** started setting up iSCSI initiator" #if [ -n ${iscsitarget} ] ; then # echo "InitiatorName=${iscsitarget}"|sed "s,@@@serverip@@@,$serverip," \ # >/etc/initiatorname.iscsi @@ -403,25 +417,33 @@ elif [ -n ${iscsiserver} ] ; then fi # if no type of root filesystem is passed via kernel command line try -# information gathered from dhcp process +# information gathered from dhcp process (only valid for nfs) if [ -z "${nbdmod}" -a -z "${nbdhost}" -a -z "${nfsroot}" ] ; then # information has to be read from dhcp and ldap configuration cfgcomplete fi # call function for nfs mounts if [ -z "${nbdmod}" -a -z "${nbdserver}" ] ; then + [ $DEBUGLEVEL -eq 20 ] && echo "** started nfs mount" . /etc/machine-setup # check if nfsserver is set as variable @@@serverip@@@ nfsserver=$(checkip $nfsserver) nfsroot=${nfsserver}:${root_path} nfsmnt ${nfsroot} || error "$init_nfs" + [ $DEBUGLEVEL -eq 20 ] && echo "** finished nfs mount" fi # get the complete collection of kernel modules available mount -n --bind /mnt/lib/modules/${KERNEL} /lib/modules/${KERNEL} || \ error "$init_moddir" -# start hardware configuration as background process -hwautocfg & +# 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 + /bin/sh +else + [ $DEBUGLEVEL -eq 20 ] && echo "** started hwautocfg in background" + hwautocfg & +fi # try to use unionfs for rw access if available if [ -n "${UNIONFS}" -o -n "${UNION}" ] ; then @@ -520,8 +542,12 @@ for linux diskless client specific debugging output\nLOGFILE=\"$LOGFILE\"\n#\ # run distribution independent and dependent configuration of files and # services -servconfig & - +if [ ${DEBUGLEVEL} = 22 ] ; then + /bin/sh +else + servconfig & +fi + for path in @@@COMDIRINDXS@@@ ${D_DIRINDXS} ${D_DIRINBINDMNT} ; do testmkd /mnt/${path} done |