Changeset 1977 in MondoRescue for branches/stable/mindi


Ignore:
Timestamp:
Jun 2, 2008, 10:49:01 AM (16 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 1938:1976 $SVN_M/branches/2.2.6

Location:
branches/stable/mindi
Files:
2 deleted
7 edited

Legend:

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

    r1939 r1977  
    2121server is the ip addr of the NFS server
    2222mountpoint is the mount point on the NFS server to use (should be in /etc/exports of the NFS server)
     23rmadisk_size may have to be increase to 131072 on more recent distributions such as rhel 5
    2324The [] mean this parameter is optional
    2425The () mean that you have a choice with the '|' meaning 'or'
     
    4041During boot mondorestore will start your NFS configuration and mount mondo's content from the network rather than from a physical media. You may alter the IP configuration stored from the original machine by passing the ipconf option describing respectively the IP address, netmask, broadcast and default gateway you want to setup for the machine, separated by ':'. Or alternatively, you may specify the dhcp keyword so that a DHCP request is made to get those information. In the 2 cases, you have to mention on which physical interface those parameters should apply. On some configurations, you may also want to increase the number of ping queries made before the NFS mount, which is of 3 by default, using the ping option and give the number you want. If you have a different NFS server for the deployment than for the archiving, you can also precise it through the nfsmount option. The structure on both server under the mountpoint has to be the same.
    4142
     43CAVEAT: the limit to the number of char on the append line is 255. Use symlinks to reduce the size of your path if needed.
     44
    4245Please report any problem around that tool to bruno@mondorescue.org
    4346
  • branches/stable/mindi/analyze-my-lvm

    r1489 r1977  
    1313GetValueFromField() {
    1414    local res
    15     sed s/'    '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%dm",$1;} else if ($2=="KB") {printf "%dk",$1;} else if ($2=="GB") {printf "%dg",$1;} else {print $0;};}'
     15    sed s/'    '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%dm",$1;} else if ($2=="KB") {printf "%dk",$1;} else if ($2=="GB") {printf "%fg",$1;} else {print $0;};}'
    1616}
    1717
  • branches/stable/mindi/distributions/conf/mindi.conf.dist

    r1939 r1977  
    9292# Modules supported by mindi and required at boot time
    9393#
    94 mindi_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"
     94mindi_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 intermodule"
    9595mindi_ide_mods="ide ide-generic ide-detect ide-mod ide-disk 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"
    9696# Replace with that line for HP OCMP e.g.
  • branches/stable/mindi/mindi

    r1939 r1977  
    13851385    rm -Rf $MINDI_TMP/iso
    13861386    mkdir -p $MINDI_TMP/iso/{images,archives,isolinux}
    1387     cp -f $1/*.img $1/*.gz $MINDI_TMP/iso/images 2>> $LOGFILE || LogIt "OfferToMakeBootableISO: Cannot copy $i to $MINDI_TMP/iso/images"
     1387    cp -f $1/*.gz $MINDI_TMP/iso/images 2>> $LOGFILE || LogIt "OfferToMakeBootableISO: Cannot copy $1/*.gz to $MINDI_TMP/iso/images"
    13881388    old_pwd=`pwd`
    13891389    cd $MINDI_TMP/iso
     
    14271427    else
    14281428        $ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
     1429        rm -f images/mindi-bootroot.$BOOT_SIZE.img
    14291430    fi
    14301431    if [ "$?" -ne "0" ] ; then
     
    16301631            else
    16311632                options="interactive expert compare iso nuke isonuke"
    1632 # hda hdb hdc hdd"
    16331633            fi
    16341634        else
     
    21002100    rm -f $orig_file
    21012101    return 0
    2102 }
    2103 
    2104 
    2105 ScanCDandTape() {
    2106     local i
    2107 
    2108     for i in /dev/st0 /dev/ht0 /dev/cdrom /dev/cdrom0 /dev/cdrom 1 ; do
    2109         dd if=$i of=/dev/null bs=64k count=1 &> /dev/null
    2110     done
    21112102}
    21122103
     
    28802871    fi
    28812872fi
    2882 #ScanCDandTape
    28832873[ "$CDRECOVERY" = "yes" ] || CDRECOVERY=no
    28842874if [ "$CDRECOVERY" = "yes" ] ; then
     
    29562946fi
    29572947if [ _"$MONDO_SHARE" = _"" ] && [ "$INTERACTIVE" = "yes" ] && [ "$ARCH" != "ia64" ] ; then
    2958     echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot image (y/[n]) ?"
    2959     read ch
    2960     if [ "$ch" != "y" ] && [ "$ch" != "Y" ] ; then
    2961         USE_LILO=no
    2962     else
    2963         USE_LILO=yes
    2964     fi
     2948    USE_LILO=no
    29652949fi
    29662950if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then
  • branches/stable/mindi/rootfs/sbin/init

    r1939 r1977  
    105105    [ "$1" != "" ] && tapedev=$1
    106106    [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg | tr -s ' ' ' ' | cut -d' ' -f2`
    107 #    tar -zxf $tapedev
     107    mt -f $tapedev rewind
     108    mt -f $tapedev fsf 2
    108109    dd if=$tapedev bs=32k count=1024 | tar -zx
    109110    res=$?
    110111    if [ "$res" -eq "0" ] ; then
    111     grep -v media-dev /tmp/mondo-restore.cfg > /tmp/mr.cfg
    112     echo "media-dev=$tapedev" >> /tmp/mr.cfg
    113         cp -f /tmp/mr.cfg /tmp/mondo-restore.cfg
     112        # Store the dev name in case we changed it interactively
     113        sed -i "s/^media-dev .*$/media-dev  $tapedev/" /tmp/mondo-restore.cfg
     114
     115        #grep -v media-dev /tmp/mondo-restore.cfg > /tmp/mr.cfg
     116        #echo "media-dev $tapedev" >> /tmp/mr.cfg
     117        #cp -f /tmp/mr.cfg /tmp/mondo-restore.cfg
    114118    fi
    115119    cd $old_pwd
     
    120124    local res tapedev
    121125    tapedev="" ; # will be set by UntarTapeStuff()
     126
     127    # Here we can add the USB storage module, it's working even with OBDR !
     128    modprobe -q usb-storage
     129    # Tape takes some time to appear
     130    sleep 10
    122131    cd $GROOVY
    123     UntarTapeStuff $tapedev || UntarTapeStuff /dev/st0 || UntarTapeStuff /dev/osst0 || UntarTapeStuff /dev/ht0
     132    UntarTapeStuff $tapedev
    124133    res=$?
    125134    while [ "$res" -ne "0" ] ; do
     
    139148        fi
    140149    done
     150    # For post-init
     151    export TAPEDEV=$tapedev
    141152
    142153    if [ "$res" -ne "0" ] ; then
     
    146157        res=$?
    147158    else
    148     #   clear
    149159        LogIt "Using tape as extended datadisk. Good." 3
    150160        echo "Using tape as extd ddisk." > /tmp/TAPEDEV-HAS-DATA-DISKS
     
    584594    export DENY_MODS=" "
    585595fi
    586 
     596if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then
     597    # Do not try to load usb storage when dealing with OBDR it makes the modprobe hang :-(
     598    export DENY_MODS="usb-storage $DENY_MODS"
     599fi
    587600if [ "`grep -i forcemods /proc/cmdline`" ]; then
    588601    export FORCE_MODS="`cat /proc/cmdline | sed 's~.*forcemods=\"\(.*\)\".*~\1~'` mondonone"
     
    623636fi
    624637
    625 if [ "`grep -i 'tape ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i udev /tmp/mondo-restore.cfg`" ]; then
     638if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg`" ]; then
    626639    HandleTape
    627640    ExtractDataDisksAndLoadModules
     
    635648    ExtractDataDisksAndLoadModules
    636649elif [ "`grep -i usb= /proc/cmdline`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg | grep media-type`" ]; then
    637     # We need to get here exported variables from start-nfs
    638650    . /sbin/start-usb
    639651
  • branches/stable/mindi/rootfs/sbin/post-init

    r1621 r1977  
    104104done
    105105
     106mondoopt=""
     107if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg`" ]; then
     108    mondoopt="$mondoopt -o -d $TAPEDEV"
     109fi
     110
     111if [ "`grep -i 'debug' /proc/cmdline`" ]; then
     112    mondoopt="$mondoopt -K 99"
     113fi
     114
    106115if [ "$compare" ] ; then
    107116    LogIt "------------------COMPARE MODE-----------------" 1
    108     mondorestore --compare
     117    mondorestore $mondoopt -Z compare
    109118elif [ "$nuke" ] ; then
    110119    LogIt "-------------------NUKE MODE-------------------" 1
    111     mondorestore --nuke
     120    mondorestore $mondoopt -Z nuke
    112121elif [ "$expert" ] ; then
    113122    if [ "`grep tapedev /tmp/mondo-restore.cfg`" ] ; then
     
    119128        LogIt "Tape Mode -- calling mondorestore..."
    120129            if [ "$nuke" ] ; then
    121                 mondorestore --nuke
     130                mondorestore $mondoopt -Z nuke
    122131            else
    123                 mondorestore; # MR will detect & access the tape
     132                mondorestore $mondoopt; # MR will detect & access the tape
    124133            fi
    125134    fi
     
    132141            LogIt "Cdstream Mode -- calling mondorestore..."
    133142            if [ "$nuke" ] ; then
    134                 mondorestore --nuke
     143                mondorestore -Z nuke $mondoopt
    135144            else
    136                 mondorestore; # MR will detect & access the cdstream
     145                mondorestore $mondoopt; # MR will detect & access the cdstream
    137146            fi
    138147        fi
     
    147156else
    148157    LogIt "------------------INTERACTIVE------------------" 1
    149     mondorestore --interactive
     158    mondorestore -Z interactive $mondoopt
    150159fi
    151160
    152 [ -e "/tmp/DO-MBR-PLEASE" ] && LogIt "PLEASE RUN 'mondorestore --mbr' NOW TO INITIALIZE YOUR BOOT SECTOR." 1
     161[ -e "/tmp/DO-MBR-PLEASE" ] && LogIt "PLEASE RUN 'mondorestore -Z mbr' NOW TO INITIALIZE YOUR BOOT SECTOR." 1
    153162
    154163exit 0
Note: See TracChangeset for help on using the changeset viewer.