Changeset 1842 in MondoRescue for branches/stable/mindi


Ignore:
Timestamp:
Dec 15, 2007, 2:24:34 AM (16 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)

Location:
branches/stable/mindi
Files:
3 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/README.bkphw

    r1770 r1842  
    2727echo /usr/local/lib >> /etc/ld.so.conf
    2828ldconfig
    29 perl -pi -e 's~^HOME=.*~HOME="/usr/local/bin"~' /usr/local/bin/cpqacuxe
    30 sed -i -e '/LD_LIBRARY_PATH/d' /usr/local/bin/cpqacuxe
    3129
    32 You also may have to remove the LD_ASSUME_KERNEL line in that script.
     30You're now ready to check your configuration by running:
     31mindi-bkphw /var/cache/mindi /etc/mindi
     32[First parameter is the directory where files will be generated,
     33 Second parameter is the directory of the file proliant.files is located]
    3334
    34 You're now ready to check your configuration by running mindi-bkphw.
     35For these tools to work you may have to install additional packages such as hpasm and hprsm from the HP Web site, as well as some libstdc++ compatibility packages (compat-libstdc++-33 and compat-libstdc++-296 on RHEL 5 e.g.)
    3536
    3637In order to have a working hponcfg binary you also need to install the hprsm/hpasm packages from HP Web site. Refer to http://welcome.hp.com/country/us/en/support.html?pageDisplay=drivers
  • branches/stable/mindi/deplist.txt

    r1770 r1842  
    3232/usr/bin/strace
    3333
     34# For udev
     35/sbin/MAKEDEV
     36
    3437# For file command
    3538/usr/share/misc/file/magic /usr/share/file/magic
    3639
    37 # For swap uuid support and probably then more in the future
     40# For swap uuid support, ia64 and probably then more in the future
    3841/usr/bin/perl
     42# For menu management on ia64
     43efibootmgr
    3944
    4045# For Debug  mode
  • branches/stable/mindi/distributions/conf/mindi.conf.dist

    r1600 r1842  
    1616# Extra space for Ram disk
    1717#
    18 mindi_extra_space=24576
     18mindi_extra_space=32768
    1919
    2020#
     
    9797#
    9898mindi_scsi_mods="3w-xxxx 3w_xxxx 3w-9xxx 3w_9xxx 53c7,8xx a100u2w a320raid aacraid adpahci advansys aha152x aha1542 aha1740 aic79xx aic79xx_mod aic7xxx aic7xxx_mod aic7xxx_old AM53C974 atp870u BusLogic cciss cpqfc dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 i2o_block i2o_core ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid megaraid_mm megaraid_mbox megaraid_sas mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qla2xxx qla2xxx_conf qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod scsi_transport_sas scsi_transport_spi sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs"
    99 mindi_ide_mods="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell"
    100 mindi_usb_mods="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev"
     99mindi_ide_mods="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks"
     100mindi_usb_mods="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual"
    101101mindi_pcmcia_mods="pcmcia_core ds yenta_socket"
    102 mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate"
     102mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 nls_utf8 sg sr_mod zlib_inflate"
    103103mindi_tape_mods="ht st osst ide-tape ide_tape"
    104104mindi_net_mods="sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmnet"
     
    108108# created for recovery time
    109109#
    110 mindi_deny_mods=""
     110mindi_deny_mods="kqemu"
    111111# Replace with that line for HP OCMP e.g.
    112 #mindi_deny_mods="MPS_Driver_Mapper mps octtldrv tscttl streams"
     112#mindi_deny_mods="kqemu MPS_Driver_Mapper mps octtldrv tscttl streams"
    113113#
    114114# Modules that SHOULD be part of the mini distribution
  • branches/stable/mindi/install.sh

    r1770 r1842  
    128128sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" mindi > $local/sbin/mindi
    129129sed -e "s~= "YYY"~= "$subconf"~" mindi-bkphw > $local/sbin/mindi-bkphw
    130 sed -e "s~^my \$mindiconf=YYY~my \$mindiconf=\"$subconf\";~" mindi-bkphw > $local/sbin/mindi-bkphw
    131 chmod 755 $local/sbin/mindi $local/sbin/mindi-bkphw
    132130install -m 755 parted2fdisk.pl $local/sbin
    133131
     
    142140if [ "$ARCH" = "ia64" ] ; then
    143141    (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
    144     make -f Makefile.parted2fdisk DEST=$locallib/mindi install
    145     if [ -f $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then
    146         echo "Installing parted2fdisk ..."
    147         install -s -m 755 $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH $locallib/mindi/rootfs/sbin/parted2fdisk
    148         install -s -m 755 $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/sbin/parted2fdisk
    149     else
    150         echo "WARNING: no parted2fdisk found, mindi will not work on this arch ($ARCH)"
    151     fi
     142    install -s -m 755 $local/sbin/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
     143    # Try to avoid the need ot additional perl modules at the moment
     144    perl -pi -e 's/use strict;//' $locallib/mindi/rootfs/sbin/parted2fdisk
    152145else
    153146    # FHS requires fdisk under /sbin
     
    156149    ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
    157150fi
    158 # Remove left parted2fdisk
    159 rm -f $locallib/mindi/rootfs/sbin/parted2fdisk-*
    160151
    161152if [ "$PKGBUILDMINDI" != "true" ]; then
  • branches/stable/mindi/isolinux-H.cfg

    r30 r1842  
    55label RESTORE
    66  kernel vmlinuz
    7   append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=24000 rw root=/dev/ram nuke restore
     7  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=24000 rw root=/dev/ram nuke RESTORE
    88label expert
    99  kernel vmlinuz
  • 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
  • branches/stable/mindi/mindi-bkphw

    r1770 r1842  
    11#!/usr/bin/perl -w
     2#
     3# $Id$
    24#
    35# Backup the hardware configuration on machine supporting it
     
    1315my $confdir = "$ARGV[1]";
    1416
    15 my $tool = "";
    16 my $tooldir = "";
    17 my $ret = 0;
    18 
    1917mkdir $bkpdir,0755 if (! -d $bkpdir) ;
    20 open(SYSTEM,"dmidecode -s 'system-product-name' |") || die "You need dmidecode for mindi hardware support";
     18open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' |") || die "You need /usr/sbin/dmidecode for mindi hardware support";
    2119my $productname = <SYSTEM>;
    2220close(SYSTEM);
    2321
     22die "No product name found for Hardware support\n" if (not defined $productname);
     23
    2424chomp($productname);
    2525if ($productname =~ /proliant/i) {
    26     print "Detected an HP Hardware. Nice. Continue to support my job :-)\n";
     26    print "Detected a $productname. Nice. Continue to support my job :-)\n";
    2727    print "Activating Proliant support for mindi\n";
    2828    open(PROLIANT,"$confdir/proliant.files") || die "Unable to open $confdir/proliant.files";
    2929    open(TOOLS,"> $bkpdir/../tools.files") || die "Unable to open $bkpdir/../tools.files";
    3030    open(SCRIPT,"> $bkpdir/../mindi-rsthw") || die "Unable to open $bkpdir/../mindi-rsthw";
    31     print SCRIPT  << "EOF";
     31    print SCRIPT  << 'EOF';
    3232#!/bin/bash
    3333#
     
    3838# may have an impact on you restoration process
    3939#
     40# put dynamic libraries at an accessible place
     41for l in /usr/local/lib/*; do
     42    ln -sf $l /usr/lib
     43done
    4044EOF
    4145    while($tool = <PROLIANT>) {
     
    5256        }
    5357        if ($tool =~ /\/conrep$/) {
    54             $ret = system("(cd $tooldir ; $tool -s -f$bkpdir/conrep.dat)");
    55             print SCRIPT "(cd $tooldir ; $tool -s -f$bkpdir/conrep.dat)");
     58            $ret = system("cd $tooldir ; $tool -s -f$bkpdir/conrep.dat");
     59            print SCRIPT "(cd $tooldir ; $tool -l -f$bkpdir/conrep.dat)\n";
    5660            print TOOLS "$tool.xml\n";
    5761        }
    58         if ($tool =~ /\/cpqacuxe$/) {
    59             $ret = system("$tool -c $bkpdir/cpqacuxe.dat");
    60             print SCRIPT "$tool -r $bkpdir/cpqacuxe.dat");
     62        if ($tool =~ /\/.acuxebin$/) {
     63            my $dir=basename($tool);
     64            $ret = system("export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -c $bkpdir/cpqacuxe.dat");
     65            print SCRIPT "export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -i $bkpdir/cpqacuxe.dat\n";
    6166            print TOOLS "$tooldir/bld\n";
    6267        }
    6368        if ($tool =~ /\/hponcfg$/) {
    6469            $ret = system("$tool -w $bkpdir/hponcfg.dat");
    65             print SCRIPT "$tool -r $bkpdir/hponcfg.dat");
     70            print SCRIPT "$tool -r $bkpdir/hponcfg.dat\n";
    6671        }
    6772        if ($tool =~ /\.scexe$/) {
    68             print SCRIPT "$tool");
     73            print SCRIPT "$tool\n";
    6974        }
    7075        if ($ret != 0) {
     
    7782} else {
    7883    print "No Hardware support for $productname\n";
    79     print "Ask your manufacturer to contribute to the mindi project\n";
     84    print "You may ask your manufacturer to contribute to the mindi project\n";
    8085}
    8186rmdir $bkpdir if (-d $bkpdir) ;
  • branches/stable/mindi/parted2fdisk.pl

    r1570 r1842  
    3838my $arch;
    3939my $fake = 0;
     40my $mega = 1048576;
    4041
    4142# Determine on which arch we're running
     
    165166                        if (defined $start{$part-1}) {
    166167                            # in MB => cyl
    167                             $cylstart = sprintf("%d",$end{$part-1}*1048576/$un + 1);
     168                            $cylstart = sprintf("%d",$end{$part-1}*$mega/$un + 1);
    168169                            print FLOG "no start cyl given for creation... assuming the following $cylstart\n";
    169170                        } else {
     
    179180                        $start = 0.01;
    180181                    } else {
    181                         $start = $cylstart* $un / 1048576 +0.001;
     182                        $start = $cylstart* $un / $mega + 0.001;
    182183                    }
    183184                    # this is a size in B/KB/MB/GB
     
    205206                    print FLOG "end cyl : $cylend\n";
    206207                    # parted needs MB
    207                     $end = $cylend * $un / 1048576;
     208                    $end = $cylend * $un / $mega;
    208209                    print FLOG "n $l $part $cylstart $cylend => mkpart primary $start $end\n";
    209210                    system "$parted -s $device mkpart primary ext2 $start $end\n" if ($fake == 0);
     
    388389    # start and end are in cylinder in fdisk format
    389390    # so return in MB * 1MB / what represents 1 cyl in B
    390     $mstart = sprintf("%d",$$start{$n}*1048576/$un);
     391    $mstart = sprintf("%d",$$start{$n}*$mega/$un);
    391392    $mstart = 1 if ($mstart < 1);
    392393    $mstart = $endmax if ($mstart > $endmax);
    393     $mend = sprintf("%d",$$end{$n}*1048576/$un - 1);
     394    $mend = sprintf("%d",$$end{$n}*$mega/$un - 1);
    394395    $mend = $endmax if ($mend > $endmax);
    395396    $mend = 1 if ($mend < 1);
     
    497498my $mode;
    498499my $size;
     500my $unit;
    499501
    500502open (PARTED, "$parted -v |") || die "Unable to read from $parted";
     
    514516    $mode=1;
    515517} else {
    516     # RHEL 3 parted <= 1.6.3
     518    # RHEL 3 parted 1.6.3
     519    # RHEL 4 parted 1.6.19
    517520    $mode=0;
    518521}
     
    528531    if ($mode == 0) {
    529532        ($$start{$n},$$end{$n},$$type{$n},$void) = split(/ /,$d);
     533        $unit = 1;
    530534    } elsif ($mode == 1) {
    531535        ($$start{$n},$$end{$n},$size,$$type{$n},$void) = split(/ /,$d);
     536        $unit = $mega;
    532537    } else {
    533538        die "Undefined mode $mode";
     
    537542    $$type{$n} = "" if (not defined $$type{$n});
    538543    # Handles potential suffixes in latest parted version. Return MB
    539     $ret = decode_Bsuf($$start{$n},1048576);
     544    $ret = decode_Bsuf($$start{$n},$unit);
    540545    $$start{$n} = $ret;
    541     $ret = decode_Bsuf($$end{$n},1048576);
     546    $ret = decode_Bsuf($$end{$n},$unit);
    542547    $$end{$n} = $ret;
    543548    print FLOG "$n      $$start{$n}      $$end{$n}     $$type{$n}\n";
     
    553558
    554559#print FLOG "decode_Bsuf input: $size / $unit ";
    555 if ($size =~ /KB$/i) {
    556     $size =~ s/KB$//i;
     560if ($size =~ /K[B]*$/i) {
     561    $size =~ s/K[B]*$//i;
    557562    $size *= 1024;
    558 } elsif ($size =~ /MB$/i) {
    559     $size =~ s/MB$//i;
     563} elsif ($size =~ /M[B]*$/i) {
     564    $size =~ s/M[B]*$//i;
    560565    $size *= 1048576;
    561 } elsif ($size =~ /GB$/i) {
    562     $size =~ s/GB$//i;
     566} elsif ($size =~ /G[B]*$/i) {
     567    $size =~ s/G[B]*$//i;
    563568    $size *= 1073741824;
    564 } elsif ($size =~ /TB$/i) {
    565     $size =~ s/TB$//i;
     569} elsif ($size =~ /T[B]*$/i) {
     570    $size =~ s/T[B]*$//i;
    566571    $size *= 1099511627776;
    567572} else {
  • branches/stable/mindi/proliant.files

    r1770 r1842  
    11/usr/local/bin/hponcfg
    22/usr/local/bin/conrep
    3 /usr/local/bin/cpqacuxe/cpqacuxe
     3/opt/compaq/cpqacuxe/bld/.acuxebin
     4/usr/local/bin/bld/.acuxebin
  • branches/stable/mindi/rootfs/etc/udev-links.conf

    r1770 r1842  
    5050M tty7      c 4 7
    5151M tty8      c 4 8
     52M ttyS0     c 4 64
     53M ttyS1     c 4 65
    5254L console   /dev/tty0
    5355L tty       /dev/tty0
  • branches/stable/mindi/rootfs/sbin/find-and-mount-cdrom

    r1770 r1842  
    4141    fi
    4242        LogIt "CD-ROM found at $device"
    43     mount /mnt/cdrom
     43        mount /mnt/cdrom
    4444        if [ "$?" -ne "0" ] ; then
    4545            LogIt "Cannot mount /dev/cdrom (type $format) (dev=$device)"
  • 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
  • branches/stable/mindi/rootfs/sbin/install-additional-tools

    r1770 r1842  
    7878cd $mountdir
    7979if [ -f etc/fstab ]; then
    80     mv etc/fstab /tmp
     80    cp etc/fstab /tmp
    8181fi
    8282if [ -f etc/raidtab ]; then
    83     mv etc/raidtab /tmp
     83    cp etc/raidtab /tmp
    8484fi
    8585
  • branches/stable/mindi/rootfs/sbin/start-nfs

    r1770 r1842  
    3535done
    3636
    37 if [ "$ipdev" = "" ] && [ "$ipconf" = "" ]; then
    38     # No network configuration neither stored during archive
    39     # nor on cmdline so no network wanted => exiting
    40     exit 0
    41 else
     37if [ "$ipdev" != "" ] || [ "$ipconf" != "" ]; then
     38    # Network configuration stored during archive
     39    # or on cmdline so network wanted => starting it
    4240    LogIt "Starting Network..."
     41
     42    # Activate loobback
     43    ifconfig lo 127.0.0.1
     44
     45    echo "$ipconf" | grep -q "dhcp"
     46    if [ $? -eq 0 ]; then
     47        ipdev=`echo $ipconf | cut -d: -f1`
     48        LogIt "Making DHCP request on $ipdev"
     49        udhcpc -i $ipdev
     50    else
     51        if [ "$ipconf" != "" ]; then
     52            ipdev=`echo $ipconf | cut -d: -f1`
     53            ipaddress=`echo $ipconf | cut -d: -f2`
     54            ipnetmask=`echo $ipconf | cut -d: -f3`
     55            ipbroadcast=`echo $ipconf | cut -d: -f4`
     56            ipgateway=`echo $ipconf | cut -d: -f5`
     57        fi
     58        LogIt "Configuring $ipdev statically ($ipaddress/$ipnetmask)"
     59        ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast
     60        route add default gw $ipgateway
     61    fi
     62
     63    # ping server helps waking interface up
     64    LogIt "Pinging NFS server..."
     65    nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1`
     66    ping -c $ipcount $nfs_server_ipaddr
     67
     68    # Finally mounts the NFS share
     69    LogIt "Mounting NFS share ($nfsmount) on /tmp/isodir..."
     70    mount -t nfs -o nolock $nfsmount /tmp/isodir
     71   
     72    LogIt "Mounting NFS image ${imgname}-1.iso in $dirimg on /mnt/cdrom in loopback"
     73    mount -o ro -t iso9660 /tmp/isodir/$dirimg/${imgname}-1.iso /mnt/cdrom
    4374fi
    44 
    45 # Activate loobback
    46 ifconfig lo 127.0.0.1
    47 
    48 echo "$ipconf" | grep -q "dhcp"
    49 if [ $? -eq 0 ]; then
    50     ipdev=`echo $ipconf | cut -d: -f1`
    51     LogIt "Making DHCP request on $ipdev"
    52     udhcpc -i $ipdev
    53 else
    54     if [ "$ipconf" != "" ]; then
    55         ipdev=`echo $ipconf | cut -d: -f1`
    56         ipaddress=`echo $ipconf | cut -d: -f2`
    57         ipnetmask=`echo $ipconf | cut -d: -f3`
    58         ipbroadcast=`echo $ipconf | cut -d: -f4`
    59         ipgateway=`echo $ipconf | cut -d: -f5`
    60     fi
    61     LogIt "Configuring $ipdev statically ($ipaddress/$ipnetmask)"
    62     ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast
    63     route add default gw $ipgateway
    64 fi
    65 
    66 # ping server helps waking interface up
    67 LogIt "Pinging NFS server..."
    68 nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1`
    69 ping -c $ipcount $nfs_server_ipaddr
    70 
    71 # Finally mounts the NFS share
    72 LogIt "Mounting NFS share ($nfsmount) on /tmp/isodir..."
    73 mount -t nfs -o nolock $nfsmount /tmp/isodir
    74 
    75 LogIt "Mounting NFS image ${imgname}-1.iso in $dirimg on /mnt/cdrom in loopback"
    76 mount -o ro -t iso9660 /tmp/isodir/$dirimg/${imgname}-1.iso /mnt/cdrom
  • branches/stable/mindi/rootfs/sbin/start-usb

    r1770 r1842  
    2020fi
    2121
    22 [ -d /proc/bus/usb ] && ! grep -q /proc/bus/usb /proc/mounts && mount -t usbfs none /proc/bus/usb
    23 
    2422echo -en "Mounting USB device (${usbdev}1) on /mnt/cdrom..."
    2523/sbin/modprobe usb-storage
  • branches/stable/mindi/syslinux-H.cfg

    r30 r1842  
    55label RESTORE
    66  kernel vmlinuz
    7   append initrd=initrd.img ramdisk_size=24000 rw root=/dev/ram0 nuke restore
     7  append initrd=initrd.img ramdisk_size=24000 rw root=/dev/ram0 nuke RESTORE
    88label expert
    99  kernel vmlinuz
  • branches/stable/mindi/udev.files

    r1770 r1842  
    1212/sbin/udevstart
    1313/sbin/udevcontrol
     14/sbin/udevtrigger
     15/sbin/pam_console_apply
     16/bin/bash
Note: See TracChangeset for help on using the changeset viewer.