Ignore:
Timestamp:
Dec 15, 2007, 2:24:34 AM (12 years ago)
Author:
Bruno Cornec
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/mindi

    r1770 r1842  
    428428    rmdir $mountpoint || LogIt "Cannot rmdir (CODI)"
    429429}
     430
    430431
    431432# Last function called before exiting
     
    659660    fi
    660661    modpaths=`find $1 -name $2.*o -type f`
    661     [ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed"
     662    #[ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed"
    662663    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f`
    663664    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f`
     
    956957    grep -vx " *#.*" $MY_FSTAB | grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d||^LABEL=\/|^UUID=/ && !/fdd|cdr|zip|floppy/ {print $1}'
    957958    [ -e "/etc/raidtab" ] && $AWK '/^ *device/ {print $2}' /etc/raidtab
     959    if [ -e "/vmfs/volumes" ]; then
     960        # For VMWare ESX 3 get the device names of these volumes
     961        vdf -P | grep -E '/vmfs/volumes' | awk '{print $1}'
     962    fi
    958963    return
    959964}
     
    10031008}
    10041009
    1005 
     1010#
     1011# Critical function which computes all dependencies (dyn. lib.)
     1012# for a list of binaries
     1013#
    10061014LocateDeps() {
    10071015    local incoming fname deps
     
    10421050    fi
    10431051    if [ -h "$d" ]; then
    1044         echo "$link $d"
     1052        echo "$link"
     1053        echo "$d"
    10451054    else
    10461055        echo "$link"
     
    12121221        [ "$c_p" = "none" ] && continue
    12131222        redhat_label=""
     1223        label=""
    12141224        uuid=""
    12151225        absolute_partition=`readlink -f $c_p`
     
    16171627        LogIt "Failed to create ISO image."
    16181628    else
    1619         echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" >> $LOGFILE
     1629        echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" | tee -a $LOGFILE
    16201630    fi
    16211631    rm -f $MINDI_TMP/mkisofs.log
     
    16271637    local i old_pwd
    16281638    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    1629         echo "Shall I make a bootable USB image ? (y/[n] "
     1639        echo -n "Shall I make a bootable USB image ? (y/[n]) "
    16301640        read i
    16311641        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
     
    18981908        el=`find /boot/efi -name elilo.efi`
    18991909        cp $el $mountpoint
    1900         cp $liloconf $mountpoint/elilo.efi $mountpoint/efi/boot
     1910        cp $liloconf $mountpoint
    19011911        if [ $mountefi -eq 1 ]; then
    19021912            umount /boot/efi 2>&1 > /dev/null
     
    19471957    echo "Free space left on image = $free_space KB" >> $LOGFILE
    19481958    echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE
    1949 # make it bootable
     1959    # make it bootable
    19501960    rm -f $mountpoint/zero
    19511961    [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE
     
    19531963        if [ "$ARCH" != "ia64" ] ; then
    19541964            $LILO_EXE -r $mountpoint >> $LOGFILE 2>> $LOGFILE
     1965        else
     1966            /bin/true
    19551967        fi
    19561968    else
     
    21202132        done
    21212133        for i in $EXTRA_MODS ; do
    2122             j=`find lib/modules/$FAILSAFE_KVER -name $i.*o 2> /dev/null`
    2123             [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o" >> $LOGFILE
     2134            j=`find lib/modules/$FAILSAFE_KVER -name $i.*o.gz 2> /dev/null`
     2135            [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o.gz" >> $LOGFILE
    21242136            for k in $j ; do
    21252137                if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then
     
    22102222
    22112223ProcessLDD() {
    2212     local incoming f
     2224    local incoming f d nd bd bnd
    22132225    read incoming
    2214     while [ "$incoming" != "" ] ; do
     2226    while [ "$incoming" != "" ]; do
    22152227        # We take the full path name of the dyn. lib. we want
    22162228        incoming=`echo "$incoming" | awk '{if (match($1,/\//)) {print $1} else {if (match($3,/\//)) print $3} fi}'`
    22172229        for f in $incoming ; do
     2230            # echo modified file name if one of the parent dir is a link
     2231            # by replacing the original dirname by the destination of the link
     2232            d="`dirname $f`"
     2233            found="false"
     2234            while [ "$d" != "/" ]; do
     2235                if [ -h "$d" ]; then
     2236                    nd=`readlink -f $d`
     2237                    bd=`basename $d`
     2238                    bnd=`basename $nd`
     2239                    f=`echo $f | sed "s~/$bd/~/$bnd/~"`
     2240                    echo $d
     2241                fi
     2242                d="`dirname $d`"
     2243            done
     2244
    22182245            echo "$f"
    22192246            echo "`ReadAllLink $f`"
     
    25902617    [ -e "/dev/.devfsd" ] && echo "/dev/.devfsd found" > tmp/USE-DEVFS
    25912618
     2619    # Handle the case where busybox is dynamically linked
     2620    # Should be done first so that if /lib64 is a link, it's
     2621    # created first like that, instead of as a real dir later on
     2622    file $MINDI_LIB/rootfs/bin/busybox 2>&1 | grep -q "dynamically"
     2623    if [ $? -eq 0 ]; then
     2624        LocateDeps $MINDI_LIB/rootfs/bin/busybox > $MINDI_TMP/busy.lis
     2625        cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
     2626        rm -f $MINDI_TMP/busy.lis
     2627    fi
     2628
    25922629    # Management of udev (which includes modprobe in rules)
    25932630    ps auxww | grep -v grep | grep -qw udevd
     
    25962633        LogIt "udev device manager found"
    25972634        cp --parents -Rdf /etc/udev . 2> /dev/null
     2635        # This avoids NIC remapping if on another machine at restore time on Debian at least
     2636        rm -f ./etc/udev/rules.d/z25_persistent-net.rules
    25982637        cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
    25992638        if [ -x /sbin/udevd ]; then
    2600             lis=`grep -Ev '^#' $MINDI_CONF/udev.files`
     2639            lis2=`grep -Ev '^#' $MINDI_CONF/udev.files`
     2640            lis=""
     2641            # Get only the files which exist in that list
     2642            # and potentially their symlink structure
     2643            for i in $lis2; do
     2644                if [ -h $i ]; then
     2645                    j=$i
     2646                    while [ -h $j ]; do
     2647                        lis="$lis $j"
     2648                        j=`readlink $j`
     2649                    done
     2650                    lis="$lis $j"
     2651                elif [ -f $i ]; then
     2652                    lis="$lis $i"
     2653                fi
     2654            done
     2655            # And their deps
    26012656            LocateDeps $lis > $MINDI_TMP/udev.lis
    26022657            for i in $lis; do
     
    26142669        fi
    26152670    fi
     2671
    26162672    # Management of potential HW info (Proliant only at the moment)
     2673    rm -rf $MINDI_CACHE/bkphw
    26172674    mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE
    26182675    if [ -d $MINDI_CACHE/bkphw ]; then
     
    26412698    cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
    26422699
    2643     # Handle the case where busybox is dynamically linked
    2644     file $MINDI_LIB/rootfs/bin/busybox 2>&1 | grep -q "dynamically"
    2645     if [ $? -eq 0 ]; then
    2646         LocateDeps $MINDI_LIB/rootfs/bin/busybox > $MINDI_TMP/busy.lis
    2647         cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
    2648         rm -f $MINDI_TMP/busy.lis
    2649     fi
    26502700    cd $old_pwd
    26512701    echo -en "..."
     
    26892739        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    26902740        cp --parents -pdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
    2691         if [ "`echo "$i" | grep -F ".gz"`" ]; then
     2741        # Uncompress modules if not useing udev and native modprobe
     2742        if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     2743            if [ "`echo "$i" | grep -F ".gz"`" ]; then
    26922744                gunzip -f $mountpoint/$i
    2693                 i=`echo $i | sed 's/.gz//'`
    2694         fi
     2745                #i=`echo $i | sed 's/.gz//'`
     2746            fi
     2747        fi
     2748    done
     2749
     2750    # Also copy modules.dep in case of udev so that normal modprobe works
     2751    cp --parents -pdf /$floppy_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2752
     2753    # For all modules supported, create symlinks under the mountpoint
     2754    for i in $EXTRA_MODS $NET_MODS $SCSI_MODS; do
     2755        all_modules="$all_modules `FindSpecificModuleInPath $mountpoint $i | sed 's~^$mountpoint/~~g'`"
     2756    done
     2757    for i in $all_modules; do
    26952758        (cd $mountpoint ; ln -s $i . 2>/dev/null)
    2696         [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
    2697     done
    2698     # Also copy modules.dep in case of udev so that normal modprobe works
    2699     p=`echo $i | cut -d/ -f1-3`
    2700     cp -df $p/modules.dep $mountpoint/$p 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2759    done
    27012760    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    27022761        echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE
     
    27242783    "ext2fs")
    27252784        # say what will be used
    2726         echo "Creating an ext2 initrd image..." >> $LOGFILE
     2785        echo "Creating an ext2 initrd image..." >> $LOGFILE
    27272786        # kernel expects linuxrc in ext2 filesystem
    27282787        ( cd $mountpoint && ln -sf sbin/init linuxrc )
     
    27302789        umount $mountpoint || Die "Cannot unmount $tempfile"
    27312790        dd if=$tempfile bs=1k 2> /dev/null > ${rdz_fname}.tmp 2> /dev/null
    2732         bs=`tune2fs -l ${rdz_fname}.tmp | grep -E '^Block size:' | cut -d: -f2`
     2791        bs=`tune2fs -l ${rdz_fname}.tmp | grep -E '^Block size:' | cut -d: -f2 | sed 's/^ *//'`
    27332792        ADDITIONAL_BOOT_PARAMS="$ADDITIONAL_BOOT_PARAMS ramdisk_blocksize=$bs"
    2734         gzip -v9 ${rdz_fname}.tmp > $rdz_fname 2> /dev/null
     2793        gzip -c9 ${rdz_fname}.tmp > $rdz_fname
    27352794        rm -f ${rdz_fname}.tmp
    27362795        # log that we are done
    2737         echo "...done." >> $LOGFILE
     2796        echo "...done." >> $LOGFILE
    27382797    ;;
    27392798    "initramfs")
    27402799        # say what will be used
    2741         echo "Creating a gzip'ed cpio (AKA initramfs) initrd image..." >> $LOGFILE
     2800        echo "Creating a gzip'ed cpio (AKA initramfs) initrd image..." >> $LOGFILE
    27422801        # make sure that cpio is there
    27432802        which cpio &> /dev/null; [ $? -eq 0 ] || Die "cpio not found. Please install package cpio and try again."
     
    29733032echo "LVM set to $LVM" >> $LOGFILE
    29743033echo "----------" >> $LOGFILE
    2975 echo "df result:" >> $LOGFILE
    2976 echo "----------" >> $LOGFILE
    2977 df -T >> $LOGFILE
    2978 echo "-------------" >> $LOGFILE
    29793034echo "mount result:" >> $LOGFILE
    29803035echo "-------------" >> $LOGFILE
     
    29973052MODULES="`cat /proc/modules | awk '{print $1}'`"
    29983053if [ -x /usr/sbin/esxcfg-module ]; then
     3054    echo "-------------" >> $LOGFILE
    29993055    echo "VMWare ESX server detected - Enabling dedicated support" >> $LOGFILE
    30003056    echo "-------------" >> $LOGFILE
     
    30053061fi
    30063062echo "-------------" >> $LOGFILE
     3063echo "df result:" >> $LOGFILE
     3064echo "----------" >> $LOGFILE
     3065df -T >> $LOGFILE
     3066echo "-------------" >> $LOGFILE
    30073067echo "Liste of extra modules is:" >> $LOGFILE
    30083068echo "$EXTRA_MODS" >> $LOGFILE
     
    30103070
    30113071# Compute libata version
    3012 laver=`modinfo libata | grep -Ei '^Version:' | cut -d: -f2 | cut -d. -f1 | sed 's/  *//g'`
     3072laver=`modinfo libata | grep -Ei '^Version:' | cut -d: -f2 | cut -d. -f1 | sed 's/  *//g' 2> /dev/null`
    30133073# If libata v2 is used then remove ide-generic as it will perturbate boot
    30143074if [ "`echo $MODULES | grep libata`" ]; then
     
    30793139        [ ! "$2" ] && Die "Please specify the binary to look at"
    30803140        LocateDeps $2
     3141        # Avoids logfile content for mondo
     3142        export MONDO_SHARE=""
     3143        MindiExit $?
     3144    elif [ "$1" = "--readalllink" ] ; then
     3145        [ ! "$2" ] && Die "Please specify the binary to look at"
     3146        ReadAllLink $2
    30813147        # Avoids logfile content for mondo
    30823148        export MONDO_SHARE=""
     
    32153281    if [ _"$MONDO_SHARE" != _"" ]; then
    32163282        Die "Please use -k <path> to specify kernel."
     3283    else
     3284        USE_OWN_KERNEL="no"
    32173285    fi
    32183286    if [ "$INTERACTIVE" = "yes" ]; then
Note: See TracChangeset for help on using the changeset viewer.