Changeset 2850 in MondoRescue for branches/2.2.10/mindi


Ignore:
Timestamp:
Jul 24, 2011, 4:12:44 AM (13 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2773:2849 2.2.9 in 2.2.10

  • Adds 3 binaries called potentially by udev o support USB key mount at restore time (Victor Gattegno)
  • Really support both mkisofs and genisoimage everywhere
  • Try to handle netfs_user better in all cases (NFS and SSHFS)
    • Improve logging in init script
    • Format improvement
    • Removes a warning when trying to launch udevadm and it doesn't exist (RHEL 5 e.g.)
    • Fix syntax description in mondoarchive man page for -E & -I with |
  • Adds download entries for new distro supported (Mageia, Fedora 15, Ubuntu 11.04)

-Fix mindi-get-perl-modules when perl dirs in @INC are symlinks (case on Ubuntu 11.04)

  • Fix option --findkernel in case of Xen kernel so that mondoarchive get a correct answer instead of an empty one.
  • Fix multi-media restore by umounting it before looping to ask for the next (as if already mounted, will not pass to the next alone)
  • Fix 485 by replacing a wrong call to mr_asprintf which was provoking core dumped.
  • Fix -E and -I example in man page which were lacking the '|' as separator
  • Fix #484 by adding support for the arcmsr driver (to support the Areca ARC-1220 RAID Controller)
    • Avoids error msgs if no mondo-restore.cfg file exists (when mindi used stdalone)
    • Adds the swapon feature to mindi-busybox
    • Attempt to fix Xen kernel support by avoiding to remove xen kernel fro; the possible_kernels list too early, whereas it's used afterwards to get them.
    • Fix #481 by supporting the new kbd file in latest Ubuntu 10.10+ (victor.gattegno_at_hp.com)
  • Update from Lester Wade on P2V doc including RHEL6 validation and some minor additions
  • removes telinit call in busybox o try to fix problems whn reboot at end of restore.
  • if -E option for mondoarchive was not specified, variable excp points to NULL, so string exclude_pathes contained '(null)' instead of being avoided (derived from a patch from taguchi_at_ff.iij4u.or.jp)
  • fix -maxdepth option for find command. it sould be '-maxdepth .. -name ..', not '-name .. -maxdepth ..' (patch from taguchi_at_ff.iij4u.or.jp)
  • Adds an extraversion for revision support
  • Adds support for ifconfig and ping for PXE+NFS boot for this version of mindi-busybox
  • Example of MINDI_ADDITIONAL_BOOT_PARAMS in mindi.conf added
  • fix a compilation error
  • Remove an absolute ref in the docs web page
Location:
branches/2.2.10/mindi
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/deplist.d/minimal.conf

    r2816 r2850  
    110110/sbin/udevsend
    111111/sbin/udevd
     112/sbin/hwup
     113/sbin/path_id
     114/sbin/scsi_tur
    112115# On ArchLinux
    113116/sbin/udevadm
  • branches/2.2.10/mindi/mindi

    r2830 r2850  
    5757MY_FSTAB=/etc/fstab
    5858TAPE_MODS="ht st osst ide-tape ide_tape"
    59 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 hpsa 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 iscsi_tcp libiscsi scsi_transport_iscsi libiscsi_tcp isp megaraid megaraid_mm megaraid_mbox megaraid_sas mega_sr mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qla2400 qla2xxx qla2xxx_conf qlogicfas qlogicfc qlogicisp qlogicfas qlogicfas408 raw1394 scsi_mod scsi_transport_sas scsi_transport_spi scsi_transport_fc sd_mod crc_t10dif crc-t10dif seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs intermodule scsi_dh scsi_tgt emcpdm emcpgpx emcpmpx emcp dc395x diskdumplib scsi_dump_register"
     59SCSI_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 hpsa 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 iscsi_tcp libiscsi scsi_transport_iscsi libiscsi_tcp isp megaraid megaraid_mm megaraid_mbox megaraid_sas mega_sr mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qla2400 qla2xxx qla2xxx_conf qlogicfas qlogicfc qlogicisp qlogicfas qlogicfas408 raw1394 scsi_mod scsi_transport_sas scsi_transport_spi scsi_transport_fc sd_mod crc_t10dif crc-t10dif seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs intermodule scsi_dh scsi_tgt emcpdm emcpgpx emcpmpx emcp dc395x diskdumplib scsi_dump_register arcmsr"
    6060
    6161# ide-probe-mod
     
    369369        echo -e "$DONE"
    370370        return 0
    371     elif [ -e "/etc/console-setup/boottime.kmap.gz" ] ; then
     371    elif [ -e "/etc/console-setup/boottime.kmap.gz" ] || [ -e "/etc/console-setup/cached.kmap.gz" ] ; then
    372372        LogFile "Ubuntu-style config detected."
    373373        mkdir -p $bigdir/tmp
    374         echo "/etc/console-setup/boottime.kmap.gz" > $MINDI_CACHE/KEYMAP-LIVES-HERE
     374        if [ -e "/etc/console-setup/boottime.kmap.gz" ] ; then
     375            kbdfile="/etc/console-setup/boottime.kmap.gz"
     376        else
     377            kbdfile="/etc/console-setup/cached.kmap.gz"
     378        fi
     379        echo $kbdfile > $bigdir/tmp/KEYMAP-LIVES-HERE
    375380        KBDEPTH=0
    376381        mkdir -p $bigdir/etc/console-setup
    377         cp /etc/console-setup/boottime.kmap.gz $bigdir/etc/console-setup 2>> $LOGFILE
     382        cp $kbdfile $bigdir/etc/console-setup 2>> $LOGFILE
    378383        echo -e "$DONE"
    379384        return 0
     
    938943    [ "$ESTIMATED_TOTAL_NOOF_SLICES" ] && echo "total-slices $ESTIMATED_TOTAL_NOOF_SLICES" >> $outfile
    939944    AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-MOUNT  netfs-server-mount  $outfile
     945    AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-USER  netfs-server-user  $outfile
    940946    AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-PATH   netfs-server-path   $outfile
     947    AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-IPADDR netfs-server-ipaddr $outfile
     948    AddFileToCfgIfExists $MINDI_TMP/NETFS-PROTO         netfs-proto           $outfile
    941949    AddFileToCfgIfExists $MINDI_TMP/NETFS-DEV           netfs-dev           $outfile
    942950    AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-IPADDR netfs-client-ipaddr $outfile
     
    944952    AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-BROADCAST netfs-client-broadcast $outfile
    945953    AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-DEFGW  netfs-client-defgw  $outfile
     954    AddFileToCfgIfExists $MINDI_TMP/ISO-DEV           iso-dev           $outfile
     955    AddFileToCfgIfExists $MINDI_TMP/ISO-MNT           iso-mnt           $outfile
     956    AddFileToCfgIfExists $MINDI_TMP/ISO-PREFIX        iso-prefix        $outfile
     957    AddFileToCfgIfExists $MINDI_TMP/ISODIR            isodir            $outfile
    946958    AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.DEVICE bootloader.device $outfile
    947959    AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.NAME   bootloader.name   $outfile
     
    10421054            # 1st try, findfs - the RHEL way of finding labels and their partitions
    10431055            if [ -x "/sbin/findfs" ]; then
    1044                 actual_dev=`/sbin/findfs LABEL=${redhat_label} 2> /dev/null`
     1056                actual_dev=`/sbin/findfs LABEL="${redhat_label}" 2> /dev/null`
    10451057            fi
    10461058   
     
    21372149        fi
    21382150    fi
    2139     possible_kernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -vi "xen" | sort -u | tr '\n' ' '`
    2140     noof_kernels=`CountItemsIn "$possible_kernels"`
    21412151    if [ $KERNEL_IS_XEN = "yes" ]; then
    21422152        possible_xenkernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -i "xen" | sort -u | tr '\n' ' '`
     
    21442154        FindMboot32Binary
    21452155    fi
     2156    possible_kernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -vi "xen" | sort -u | tr '\n' ' '`
     2157    noof_kernels=`CountItemsIn "$possible_kernels"`
    21462158    if [ "$noof_kernels" -eq "0" ] ; then
    21472159        LogAll "Could not find your kernel."
     
    21602172            if echo $i | grep "$KERVERRUN" ; then
    21612173                LogAll "OK, I used my initiative and found that "
    2162                 LogAll "$i is probably your kernel. "
     2174                LogAll "$i is probably your kernel. "
    21632175                output="$i"
    21642176            fi
     
    21842196        else
    21852197            for i in $possible_xenkernels ; do
    2186                 if echo $i | grep "$KERVERRUN" ; then
     2198                    if echo $i | grep "$KERVERRUN" ; then
    21872199                    LogIt "OK, I used my initiative and found that "
    2188                     LogIt "$i is probably your Xen kernel. "
     2200                        LogIt "$i is probably your Xen kernel. "
    21892201                    xenkernelpath="$i"
    21902202                fi
     
    21962208                    LogIt "Using $xenkernelpath"
    21972209                else
    2198                     LogIt "Two or more possible Xen kernels found. You may specify any one of them and the "
     2210                        LogIt "Two or more possible Xen kernels found. You may specify any one of them and the "
    21992211                    LogIt "boot disks will still work, probably. If one does not work, try another."
    2200                     LogIt "$possible_xenkernels"
     2212                        LogIt "$possible_xenkernels"
    22012213                    echo ""
    22022214                    xenkernelpath=`echo $possible_xenkernels | tr -s ' ' '\n' | head -1`
     
    26812693        export MONDO_SHARE=""
    26822694        if [ "$res" = "" ] ; then
    2683             MindiExit -1
     2695            if [ $KERNEL_IS_XEN = "yes" ]; then
     2696                echo "$xenkernelpath"
     2697                MindiExit 0
     2698            else
     2699                MindiExit -1
     2700            fi
    26842701        else
    26852702            echo "$res"
  • branches/2.2.10/mindi/mindi-get-perl-modules

    r2635 r2850  
    66
    77use File::Find;
     8use Cwd;
    89
    910my $file = get_perl_modules(@ARGV) if (defined $ARGV[0]);
     
    2829#
    2930foreach my $d (@INC) {
     31    $d = read_all_link($d) if (-l $d);
    3032    push @includes,$d if (-d $d);
    3133}
     
    5355}
    5456
     57# Cf: http://www.stonehenge.com/merlyn/UnixReview/col27.html
     58sub read_all_link {
     59
     60my $dir = cwd;
     61my $link;
     62
     63find sub {
     64    return unless -l;
     65    my @right = split /\//, $File::Find::name;
     66    my @left = do {
     67        @right && ($right[0] eq "") ?
     68        shift @right :            # quick way
     69        split /\//, $dir;
     70    };    # first element always null
     71    while (@right) {
     72        my $item = shift @right;
     73        next if $item eq "." or $item eq "";
     74        if ($item eq "..") {
     75            pop @left if @left > 1;
     76            next;
     77        }
     78        my $link = readlink (join "/", @left, $item);
     79        if (defined $link) {
     80            my @parts = split /\//, $link;
     81            if (@parts && ($parts[0] eq "")) { # absolute
     82                @left = shift @parts;   # quick way
     83            }
     84        unshift @right, @parts;
     85        next;
     86        } else {
     87            push @left, $item;
     88            next;
     89        }
     90    }
     91    #print "$File::Find::name is ", join("/", @left), "\n";
     92    $link = join("/", @left);
     93}, @_;
     94return($link);
     95}
     96
    5597# Adapted From /usr/lib/rpm/mandriva/perl.req
    5698# by Ken Estes Mail.com kestes@staff.mail.com
  • branches/2.2.10/mindi/mindi.conf

    r2816 r2850  
    88# EXTRA_SPACE=80152     # increase if you run out of ramdisk space
    99# BOOT_SIZE=32768       # size of the boot disk
     10# MINDI_ADDITIONAL_BOOT_PARAMS="devfs=nomount noresume selinux=0 barrier=off udevtimeout=10 acpi=off"
  • branches/2.2.10/mindi/rootfs/sbin/init

    r2832 r2850  
    102102    if which loadkeys > /dev/null 2> /dev/null ; then
    103103        loadkeys $fname
     104        LogIt "Using $fname keyboard map." 1
    104105    else
    105106        LogIt "Using default US keyboard map." 1
     
    240241
    241242# Taken from udev management in Mandriva 2008.0. Kudos guys
    242 make_extra_nodes () {
     243MakeExtraNodes () {
    243244    # there are a few things that sysfs does not export for us.
    244245    # these things are listed in /etc/udev/links.conf
     
    255256}
    256257
    257 create_dev_makedev() {
     258CreateDevMakedev() {
    258259  if [ -e /sbin/MAKEDEV ]; then
    259260    ln -sf /sbin/MAKEDEV /dev/MAKEDEV
     
    266267    # Inspiration from Mandriva 2008.0 startup script
    267268    echo "Preparing udev environment..."
     269    LogIt "Preparing udev environment..."
    268270    mv /dev /dev.static
    269271    mkdir /dev
    270272    mount -n -o size=5M,mode=0755 -t tmpfs none /dev
    271     make_extra_nodes
     273    MakeExtraNodes
    272274    mount -n -t devpts -o mode=620 none /dev/pts
    273275    mount -n -t tmpfs  none /dev/shm
     
    289291        echo "Waiting for udev to start..."
    290292        sleep 5
     293        LogIt "udev started manually"
    291294    fi
    292295    mkdir -p /dev/.udev/queue/
     
    295298    fi
    296299    echo "Waiting for udev to discover..."
    297     create_dev_makedev
     300    CreateDevMakedev
    298301    # Newer version use udevadm for that
    299302    if [ -x /sbin/udevsettle ]; then
    300303        /sbin/udevsettle --timeout=10
     304        LogIt "Discovering with udevsettle"
    301305    elif [ -x /sbin/udevadm ]; then
    302         /sbin/udevadm trigger
     306        UdevadmTrigger
    303307        /sbin/udevadm settle --timeout=10
     308        LogIt "Discovering with udevadm"
    304309    fi
    305310    # It seems we need to have more static devs on some distro where
     
    343348
    344349
    345 #RunDevfsd() {
    346 #    loc=`which devfsd 2> /dev/null`
    347 #    if [ "$loc" != "" ] ; then
    348 #        LogIt "Starting devfsd"
    349 #        devfsd /dev &
    350 #        sleep 5
    351 #    fi
    352 #}
    353 
    354 
    355 
    356350StartUSBKbd() {
    357351# Prepare minimal USB env in case we have USB kbd such as with iLO
     
    374368        LogIt "Scanning LVM's..." 1
    375369        if which lvm ; then
    376             modprobe -q dm-mod
    377             modprobe -q dm_mod
    378             lvm vgscan --mknodes
     370            modprobe -q dm-mod
     371            modprobe -q dm_mod
     372            lvm vgscan --mknodes
    379373        else
    380             vgscan
     374            vgscan
    381375        fi
    382376
     
    413407        /tmp/start-lvm &
    414408        for i in 1 2 3 4 5 ; do
    415             echo -en "."
    416             sleep 1
     409            echo -en "."
     410            sleep 1
    417411        done
    418412        rm -f /tmp/start-lvm
     
    427421
    428422    # Taken from the init script of EMC PowerPath on RHEL
    429     if [ -f /etc/emcp_devicesDB.dat ]; then
    430         if [ -f /etc/emcp_devicesDB.idx ]; then
    431             /etc/opt/emcpower/emcpmgr map -p > /dev/null 2>&1
    432         fi
    433     fi
    434 
    435     /sbin/powermt config > /dev/null 2>&1
    436     #  Wait for udev to finish creating emcpower devices
    437     #
    438     pdfound=1
    439     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
    440         pdfound=1
    441         for pd in `/bin/ls -d /sys/block/emcpower* 2> /dev/null`; do
    442            bpd=`basename $pd`
    443            if [ ! -e /dev/$bpd ]; then
    444               pdfound=0
    445               sleep 2
    446               break;
    447            fi
    448         done
    449         if [ "$pdfound" -eq 1 ]; then
     423    if [ -f /etc/emcp_devicesDB.dat ]; then
     424        if [ -f /etc/emcp_devicesDB.idx ]; then
     425            /etc/opt/emcpower/emcpmgr map -p > /dev/null 2>&1
     426        fi
     427    fi
     428
     429    /sbin/powermt config > /dev/null 2>&1
     430    #   Wait for udev to finish creating emcpower devices
     431    #
     432    pdfound=1
     433    for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
     434        pdfound=1
     435        for pd in `/bin/ls -d /sys/block/emcpower* 2> /dev/null`; do
     436            bpd=`basename $pd`
     437            if [ ! -e /dev/$bpd ]; then
     438                pdfound=0
     439                sleep 2
     440                break;
     441            fi
     442        done
     443        if [ "$pdfound" -eq 1 ]; then
    450444            break
    451         fi
    452     done
    453     if [ "$pdfound" -eq 0 ]; then
    454        echo "Unable to start PowerPath"
    455     fi
    456 
    457     /sbin/powermt load      > /dev/null 2>&1
    458     /etc/opt/emcpower/emcpmgr map   > /dev/null 2>&1
    459     /etc/opt/emcpower/powercf -C    > /dev/null 2>&1
    460     if [ ! -e /etc/powermt.custom ]; then
    461        /sbin/powermt save       > /dev/null 2>&1
    462     fi
    463     /sbin/powermt register  > /dev/null 2>&1
    464     /sbin/powermig transition -startup -noprompt   > /dev/null 2>&1
     445        fi
     446    done
     447    if [ "$pdfound" -eq 0 ]; then
     448        echo "Unable to start PowerPath"
     449    fi
     450
     451    /sbin/powermt load      > /dev/null 2>&1
     452    /etc/opt/emcpower/emcpmgr map   > /dev/null 2>&1
     453    /etc/opt/emcpower/powercf -C    > /dev/null 2>&1
     454    if [ ! -e /etc/powermt.custom ]; then
     455        /sbin/powermt save      > /dev/null 2>&1
     456    fi
     457    /sbin/powermt register  > /dev/null 2>&1
     458    /sbin/powermig transition -startup -noprompt    > /dev/null 2>&1
    465459}
    466460
     
    482476                /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p p"
    483477            fi
     478            LogIt "Multipath started"
    484479        fi
    485480    fi
     
    678673
    679674ExtractDataDisksAndLoadModules() {
    680     echo "Installing additional tools ..."
     675    LogIt "Installing additional tools ..." 1
    681676    install-additional-tools
    682677    # Keep the kernel silent again
     
    898893# Not sure it's still needed, but shouldn't hurt
    899894if [ "$USE_UDEV" = "yes" ]; then
    900     if [ -x /sbin/udevadm ]; then
    901         UdevadmTrigger
    902     fi
     895    UdevadmTrigger
    903896
    904897fi
Note: See TracChangeset for help on using the changeset viewer.