Ignore:
Timestamp:
Dec 15, 2007, 2:24:34 AM (12 years ago)
Author:
bruno
Message:
  • Fix lack of /etc/raidtab at restore rime in the right place
  • Adds support for nls_utf8 and pata_serverworks Patches from Dirk Husung (husung_at_tu-harburg.de)
  • Add efibootmgr to deplist.txt in order to be able to modify EFI menu at restore time on ia64
  • Usage of the new testver param of pb 0.8.12 to deliver 2.2.5 packages in a test dir.
  • Update pbcl files for upcoming delivery of 2.2.5
  • Fix an issue on parted output (K instead of KB) in parted2fdisk at restore time
  • Adds support for alb/aft types of bonding on Intel cards (Mark Pinkerton <Mark.Pinkerton_at_emageon.com>)
  • Escape variables in a perl script like mindi-bkphw
  • Better Proliant support at restore time now.
  • Fix a label bug where the variable label should also be re-initialized at each loop
  • start-nfs should NOT do exit => kernel panix as init exits
  • some other fixes for init on denymods
  • Adds boot options denymods (for udev) and forcemods (if not udev)
  • kqemu is denied. Probably should also be done for kvm stuff
  • Fix again the bug on modules link at root of the initrd. Hopefully for good.
  • Wait more around the USB CD emulated by iLO as it takes up to 5 seconds to come up
  • Attempt to fix udev support for RHEL 5.1
  • Better support for automatic iLO Virtual Media with udev
  • Some VMWare support improvements (however, it seems that VMWare support won't be possible anytime soon)
  • during init at restore time, copy all static evices availble for udev, as some distro implementation are no

t yet supported correctly for udev. Not very elegant, but should solve our current issues

  • Fedora 8 now supported as a build target for pb
  • svn.log removed.
  • dependencies reviewd for rhel_3
  • Attempt to fix the lack of modules loaded at restore time - especially fs device drivers
  • removes bkphw dir before potential creation
  • render mount command more vebose at restore time
  • Should fix #217
  • Increase BOOT_SIZE and EXTRA_SIZE to support features such as HW recovery
  • Handles udev.files files which could be symlinks
  • Improve udev support for distro with compressed modules (mdv e.g.)
  • Fix modules.dep copy
  • /sbin/pam_console_apply is needed by mdv udev conf
  • Adds support for nohw boot option to avoid re-setuping the HW conf
  • Improved support for Proliant on cpqacuxe
  • RstHW should be called after driver initialization
  • For debian/ubuntu mindi dpends on mindi-busybox
  • Update mindi-busybox pbcl for correct debian changelog generation, and up2date infos
  • Should fix #215
  • Fix #214 (Thanks to xdelaruelle)
  • Fix again svn.log not used anymore with new pb version
  • Adaptation of build process to upcoming 0.8.12 version of pb
  • Remove MONOTONIC clock to continue to support 2.4 kernels (RHEL 3 e.g. or ESX)
  • Attempt to solve ia64 BMC access through the serial port
  • parted2fdisk binary no more generated
  • do not require perl modules (strict.pm) at restore time
  • try to avoid modprobe messages at restore time
  • on ia64 now use the perl script parted2fdisk at retore time also
  • Also modprobe modules for udev after decompressing the additional ones
  • replace gzip -v9 by gzip -c9. Fix a bug at least on ia64
  • For all modules supported, create symlinks under the mountpoint and extract dev files as some are not automat ically created at the moment
  • Support /vmfs/volumes for ESX
  • Finally do not use vdf for ESX. Only creates issues.
  • Avoids continuing hw support if no product name found
  • Improves ia64 support for bootable image build
  • Fix a potential problem with ramdisk_blocksize param
  • MAKEDEV should also be included in deplist.txt
  • More fixes for udev support for Debian
  • Do not mount /boot if it's already mounted - avoids ESX hang
  • Fix NICs renumbering on Debian at least
  • Udev startup improvement to support iLO + NFS so modprobing all modules seems required as of now
  • Update to version 1.7.3 of busybox for pb
  • Load USB earlier in order to support KBD such as with iLO
  • Do busybox ldd first in order to create a potential /lib64 link correctly and then use it later in the image
  • Use variable DF in mindi to be able to support the ESX vdf
  • Fix mindi for Debian x86_64 where /lib64 is a link
  • Fix issue at restore time for ext2fs params not reused (Fix from Klaus Ade Johnstad <klaus_at_skolelinux.no>)
  • Do not copy udev files if they do not exist In udev case do not insert modules at all (udev should do it alone) May avoid the issue with rhel4.5 kernel ? To be tested
  • Update dependencies for rpm base build as well
  • And also perl is a debian/ubuntu dep
  • Better debian/ubuntu dependecies requirements (mtools)
  • Fix modes on mindi-bkphw (Thanks Phil Walker phil.walker_at_hp.com)
  • Complete rev [1771] for upper case RESTORE cli with syslinux as well
  • Update mindi-busybox to 1.7.3
  • Use RESTORE consistently across mondo to restore without interaction (report from Takeshi Shoji t.shoji_at_tripodw.jp)

(merge -r1769:1841 $SVN_M/branches/2.2.5)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/rootfs/sbin/init

    r1770 r1842  
    7878    openvt 6 /bin/sh
    7979    openvt 7 /bin/sh /sbin/wait-for-petris
     80    openvt 8 /usr/bin/tail -f $LOGFILE
    8081}
    8182
     
    155156
    156157HHandleCDROM() {
     158    # Just in case we have an iLO ensure we will map it correctly
     159    echo "$DENY_MODS" | grep -q "usb-storage "
     160    if [ $? -eq 0 ]; then
     161        return
     162    fi
     163    echo "Activating a potential USB Storage device"
     164    if [ -f usb-storage.ko ] || [ -f usb-storage.ko.gz ]; then
     165        if [ -e "/tmp/USE-UDEV" ] ; then
     166            modprobe -q usb-storage
     167        else
     168            insmod usb-storage.ko*
     169        fi
     170    fi
     171    for i in 1 2 3 4 5 6 7 8 9 10 ; do
     172        sleep 1
     173        echo -en "."
     174    done
     175
    157176    find-and-mount-cdrom
    158177    res=$?
     
    171190        CD_MOUNTED_OK=""
    172191    else
    173         LogIt "OK, I am unable to go on. You seem to be missing a driver" 3
    174         LogIt "Your archives are probably fine but" 3
    175         LogIt "your tape streamer and/or CD-ROM drive are eccentric. :-)" 3
     192        LogIt "OK, I am falling back to floppy mode." 3
     193        LogIt "(You may not have the right drivers" 3
     194        LogIt "to support the hardware on which we are running)" 3
     195        LogIt "That means you'll have to copy the data disk images from" 3
     196        LogIt "the CD/hard disk/whatever to physical 1.44MB disks and" 3
     197        LogIt "insert them, one after the other. Please see the manual." 3
     198        LogIt "The images are in /images on the CD, or /root/images/mindi" 3
     199        LogIt "on your hard disk. Your archives are probably fine but" 3
     200        LogIt "your tape streamer and/or CD-ROM drive are eccentric. :-)" 3
    176201        CD_MOUNTED_OK=""
    177202    fi
     
    189214#   Load the VIA IDE module first thing if it exists (requires ide-core).
    190215#   This is to ensure that DMA is working for VIA chipsets with 2.6 kernels.
    191     for module in /ide-core.ko /via82cxxx.ko; do
     216    for module in /ide-core.ko* /via82cxxx.ko*; do
    192217        [ -f "$module" ] && MyInsmod $module > /dev/null 2> /dev/null
    193218    done
     
    264289}
    265290
     291create_dev_makedev() {
     292  if [ -e /sbin/MAKEDEV ]; then
     293    ln -sf /sbin/MAKEDEV /dev/MAKEDEV
     294  else
     295    ln -sf /bin/true /dev/MAKEDEV
     296  fi
     297}
    266298
    267299RunUdevd() {
     
    274306    mount -n -t devpts -o mode=620 none /dev/pts
    275307    mount -n -t tmpfs  none /dev/shm
     308    if [ -e /proc/sys/kernel/hotplug ]; then
     309        echo > /proc/sys/kernel/hotplug
     310    fi
    276311    PKLVL=`cut -f1 /proc/sys/kernel/printk`
    277312    echo 0 > /proc/sys/kernel/printk
     
    282317    /sbin/udevd --daemon &
    283318    sleep 2
    284     echo $PKLVL > /proc/sys/kernel/printk
     319    mkdir -p /dev/.udev/queue/
     320    if [ -x /sbin/udevtrigger ]; then
     321        /sbin/udevtrigger
     322    fi
     323    create_dev_makedev
    285324    # May avoid shell error messages
    286325    chmod 644 /dev/tty*
     326    if [ -x /sbin/udevsettle ]; then
     327        /sbin/udevsettle
     328    fi
     329    # It seems we need to have more static devs on some distro were
     330    # udev as some other requirements to be covered later on.
     331    # So in the mean time:
     332    for d in `ls /dev.static`; do
     333        if [ ! -e /dev/$d ]; then
     334            mv /dev.static/$d /dev
     335        fi
     336    done
     337    echo $PKLVL > /proc/sys/kernel/printk
    287338}
    288339
     
    292343    answer="NO"
    293344
     345    grep -q nohw /proc/cmdline
     346    if [ "$?" -eq 0 ]; then
     347        return
     348    fi
    294349    if [ -x ./mindi-rsthw ]; then
    295350        grep -q RESTORE /proc/cmdline
    296351        if [ "$?" -ne 0 ]; then
    297             clear
     352            #clear
    298353            echo "*********************************************************************"
    299354            echo "Do you want to restore the HW configuration of the original machine ?"
     
    333388    fi
    334389    rm -f /tmp/FLF
     390}
     391
     392StartUSBKbd() {
     393# Prepare minimal USB env in case we have USB kbd such as with iLO
     394[ -d /proc/bus/usb ] && ! grep -q /proc/bus/usb /proc/mounts && mount -t usbfs none /proc/bus/usb
     395echo "$DENY_MODS" | grep -Eq 'uhcd_hci |usbhid |usbcore '
     396if [ $? -eq 0 ]; then
     397    return
     398fi
     399if [ -e "/tmp/USE-UDEV" ] ; then
     400    if [ -f uhcd_hci.ko ] || [ -f uhcd_hci.ko.gz ]; then
     401        modprobe -q uhcd_hci
     402    fi
     403    if [ -f usbhid.ko ] || [ -f usbhid.ko.gz ]; then
     404        modprobe -q usbhid
     405    fi
     406else
     407    if [ -f uhcd_hci.ko ]; then
     408        insmod uhcd_hci.ko
     409    fi
     410    if [ -f usbhid.ko ]; then
     411        insmod usbcore.ko
     412        insmod usbhid.ko
     413    fi
     414fi
    335415}
    336416
     
    468548WelcomeMessage()
    469549{
     550    export ARCH=`uname -m`
     551
    470552    echo "********************************************************************"
    471553    echo "MINDI-LINUX by Mondo Dev Team - web site: http://www.mondorescue.org"
     
    490572}
    491573
     574ModprobeAllModules() {
     575
     576    for m in `find /lib/modules -name '*.ko*'`; do
     577        j=`basename $m | sed 's/\.ko.*$//'`
     578        echo "$DENY_MODS" | grep -q "$j "
     579        if [ $? -eq 0 ]; then
     580            echo "Denying $j..."
     581            continue
     582        fi
     583        echo "Probing $j..."
     584        modprobe -q $j
     585    done
     586}
    492587
    493588ExtractDataDisksAndLoadModules() {
    494589    echo "Installing additional tools ..."
    495590    install-additional-tools
    496     echo "Inserting modules ..."
    497591    # Keep the kernel silent again
    498592    PKLVL=`cut -f1 /proc/sys/kernel/printk`
    499593    echo 0 > /proc/sys/kernel/printk
    500     insert-all-my-modules >> $LOGFILE 2>> $LOGFILE
     594    if [ ! -e "/tmp/USE-UDEV" ] ; then
     595        echo "Inserting modules ..."
     596        insert-all-my-modules >> $LOGFILE 2>> $LOGFILE
     597        for i in $FORCE_MODS; do
     598            MyInsmod $i
     599        done
     600    else
     601        ModprobeAllModules
     602    fi
    501603    echo $PKLVL > /proc/sys/kernel/printk
    502604}
     
    524626mkdir /sys 2> /dev/null
    525627mount /sys/ /sys -v -t sysfs 2>> $LOGFILE
     628# For ESX 3
     629[ -d /proc/vmware ] && ! grep -q /vmfs /proc/mounts && mount -t vmfs /vmfs /vmfs
    526630rm -f /foozero
     631
     632if [ "`grep -i denymods /proc/cmdline`" ]; then
     633    export DENY_MODS="`cat /proc/cmdline | sed 's~.*denymods=\"\(.*\)\".*~\1~'` mondonone"
     634else
     635    export DENY_MODS=" "
     636fi
     637
     638if [ "`grep -i forcemods /proc/cmdline`" ]; then
     639    export FORCE_MODS="`cat /proc/cmdline | sed 's~.*forcemods=\"\(.*\)\".*~\1~'` mondonone"
     640else
     641    export FORCE_MODS=" "
     642fi
     643
     644echo "Activating a potential USB keyboard/mouse"
     645StartUSBKbd
    527646
    528647if [ -f /proc/sys/kernel/exec-shield ]; then
     
    536655if [ -e "/tmp/USE-UDEV" ] ; then
    537656    RunUdevd
    538 else
    539     ExtractDevTarballs
    540 fi
     657fi
     658ExtractDevTarballs
    541659LaunchTerminals
    542660
     
    544662PKLVL=`cut -f1 /proc/sys/kernel/printk`
    545663echo 0 > /proc/sys/kernel/printk
    546 InsertEssentialModules
     664if [ ! -e "/tmp/USE-UDEV" ] ; then
     665    InsertEssentialModules
     666else
     667    ModprobeAllModules
     668fi
    547669echo $PKLVL > /proc/sys/kernel/printk
    548670
    549671EnableCcissIfAppropriate
    550 RstHW
    551672#-------------------------------
    552673#WHOLIVESINAPINEAPPLEUNDERTHESEA#;# --- don't touch this :)
     
    590711    RunDevfsd
    591712fi
     713LoadKeymap
     714WelcomeMessage
     715RstHW
    592716echo "Starting potential Raid/LVMs ..."
    593717PauseForRaids
     
    595719StartLvms
    596720CopyBootDevEntry
    597 LoadKeymap
    598721mkdir -p /tmp/tmpfs
    599722sleep 2
     
    606729    cp -af /dev/md2 /dev/md/2 2> /dev/null
    607730fi
    608 export ARCH=`uname -m`
    609 WelcomeMessage
    610731# SpaceTests; # Mandrake Linux 8.1 doesn't like this
    611732[ -e "/tmp/mountlist.txt" ] && cp -f /tmp/mountlist.txt /tmp/mountlist.original
     
    619740fi
    620741hack-cfg-if-necessary || LogIt "Cannot find hack-cfg-if-necessary"
    621 openvt 8 /usr/bin/tail -f $LOGFILE
    622742
    623743# Log some useful info
    624 LogIt "init (from mindi v$MINDI_VER-r${MINDI_REV}"
     744LogIt "init (from mindi v$MINDI_VER-r${MINDI_REV})"
    625745LogIt "/proc/cmdline is:"
    626746cat /proc/cmdline  >> $LOGFILE
Note: See TracChangeset for help on using the changeset viewer.