Changeset 543 in MondoRescue for branches/stable/mindi/mindi


Ignore:
Timestamp:
May 13, 2006, 8:52:38 PM (18 years ago)
Author:
bcornec
Message:

stable is now at same level as 2.0.8 (r538)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r542 r543  
    6767FLOPPY_MODS="ide-floppy floppy"
    6868TAPE_MODS="ht st osst ide-tape ide_tape"
    69 SCSI_MODS="3c59x 3w-xxxx 53c7,8xx a100u2w a320raid aacraid 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 ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs"
     69SCSI_MODS="3w-xxxx 53c7,8xx a100u2w a320raid aacraid 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 ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs"
    7070
    7171# ide-probe-mod
     
    7474USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd usbkbd"
    7575CDROM_MODS="$TAPE_MODS $FLOPPY_MODS $IDE_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate $USB_MODS $PCMCIA_MODS"
    76 NET_MODS="sunrpc nfs nfs_acl lockd loop mii e100 bcm5700 e1000 eepro100 tg3 pcnet32 vmxnet"
    77 EXTRA_MODS="$CDROM_MODS vfat fat loop linear raid0 raid1 raid5 lvm-mod dm-mod jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd"
     76NET_MODS="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet"
     77EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 lvm-mod dm-mod jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd"
    7878LOGFILE=/var/log/mindi.log
    7979FDDEVICE=/dev/fd0             ; # 1.44MB floppy #0
     
    452452    [ "$?" -ne "0" ] && cat /tmp/mke2fs.$$
    453453    rm -f /tmp/mke2fs.$$
    454     mount -t ext2 -o loop $imagefile $mountpoint || Die "Can't loopmount $mountpoint; does your kernel support loopfs? If not, please recompile your kernel. Your Linux distro is broken."
     454    mount -t ext2 -o loop $imagefile $mountpoint || Die "Can't loopmount $imagefile to $mountpoint! The reason may be missing support for loopfs or ext2 (or both) in the running kernel."
    455455    mv $tarball $mountpoint/
    456456    if [ "$?" -ne "0" ] ; then
     
    13151315    if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then
    13161316    echo -en "\rAnalyzing LVM...\r"
    1317     all_partitions=`$MINDI_SBIN/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`
     1317    all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`
    13181318    fi
    13191319    all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`"
     
    13301330    [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue
    13311331    if [ -h "$c_p" ] && [ "`echo "$c_p" | fgrep "/dev/hd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/sd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/md"`" = "" ] ; then
    1332             current_partition=`ResolveSoftlink $c_p`
     1332        current_partition=`ResolveSoftlink $c_p`
    13331333        [ "`echo "$current_partition" | fgrep "/dev/mapper"`" != "" ] && current_partition="$c_p"
    1334             [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$current_partition"`" ] && continue
     1334        [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$current_partition"`" ] && continue
    13351335    else
    13361336        current_partition="$c_p"
    13371337    fi
    13381338    [ "$c_p" = "none" ] && continue
    1339         absolute_partition=`ResolveSoftlink $c_p`
    1340     partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$current_partition" | grep -vx " *#.*" | $AWK '{print $2}' | head -n1`
    1341     redhat_label=""
    1342     if [ "`echo "$current_partition" | fgrep -i "LABEL="`" != "" ] ; then
     1339    absolute_partition=`ResolveSoftlink $c_p`
     1340    partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | /bin/grep -w "$current_partition" | /bin/grep -vx " *#.*" | $AWK '{print $2}' | head -n1`
     1341
     1342    # This part tries to retrieve the correct device from a LABEL line in /etc/fstab
     1343    # current_partition contains only first column of /etc/fstab
     1344    if [ "`echo "$current_partition" | /bin/grep -f -i "LABEL="`" != "" ] ; then
    13431345        str_to_find_fmt_with=$current_partition
    1344         redhat_label=`echo "$current_partition" | cut -d'=' -f2`
    1345         actual_dev=`mount -l | fgrep " [$redhat_label]" | cut -d' ' -f1`
    1346 #       partition_mountpt=$redhat_label
    1347         current_partition=$actual_dev
     1346        redhat_label=`echo "$current_partition" | /bin/cut -d'=' -f2`
     1347        actual_dev=""
     1348
     1349        # 1st try : blkid, the good way
     1350        if [ -x "/sbin/blkid" ] ; then
     1351            actual_dev=`/sbin/blkid | /bin/grep "$current_partition" | /bin/cut -d':' -f1`
     1352        fi
     1353
     1354        # 2nd try, which works on a standard partition (ext2/3), but not on swap
     1355        if [ "x$actual_dev" = "x" ] ; then
     1356            actual_dev=`/bin/mount -l | /bin/grep " [$redhat_label]" | /bin/cut -d' ' -f1`
     1357        fi
     1358
     1359        # 3rd try, with vol_id (which works with swap)
     1360        if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ] ; then
     1361                list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' `
     1362                for dev_swap in $list_swaps ; do
     1363                    dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"`
     1364                    if [ "x$dev_exists" != "x" ] ; then
     1365                        actual_dev=$dev_swap
     1366                        break;
     1367                    fi
     1368                done
     1369        fi
     1370
     1371        # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5
     1372        if [ "x$actual_dev" = "x" -a  "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then
     1373                try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`"
     1374                present_dev="`/bin/cat /proc/swaps | /bin/grep -w /dev/$try_dev`"
     1375                if [ "x$present_dev" != "x" ] ; then
     1376                    actual_dev="/dev/$try_dev"
     1377                fi
     1378        fi
     1379
     1380        # Check if one of all those tries has known success
     1381        if [ "x$actual_dev" != "x" ] ; then
     1382                current_partition=$actual_dev
     1383        else
     1384            Die "Your system uses a labelled swap partition, but you lack the tool to support it.\nPlease replace swap labels with their correct devices in /etc/fstab\n"
     1385        fi
    13481386    else
    13491387        str_to_find_fmt_with=$current_partition
    13501388    fi
     1389
    13511390    partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB`
    13521391    if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ] ; then
     
    22172256    cp -f $TMP_ROOT/mountlist.txt $CACHE_LOC
    22182257    [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MONDO_TMP/.
    2219     [ -d "/proc/lvm" ] && $MINDI_SBIN/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm
    2220     [ -d "/dev/mapper" ] && $MINDI_SBIN/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm
     2258    [ -d "/proc/lvm" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm
     2259    [ -d "/dev/mapper" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm
    22212260    cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE
    22222261    ZipMinidirsIntoTarballs $minidir_root $tardir $noof_disks
     
    25352574       root="/"
    25362575    fi
    2537     for fname in `find $root -maxdepth 2 -type f | fgrep lin | fgrep -v /proc/` ; do
     2576    for fname in `find $root -maxdepth 2 -type f | fgrep lin | egrep -v '^/proc/|^/net/'` ; do
    25382577    [ ! -e "$fname" ] && continue
    25392578        [ "$fname" = "/boot/vmlinuz.shipped" ] && [ -f "/boot/vmlinuz" ] && continue; # ignore SuSE's extra kernel
     
    26952734    echo -en "..."
    26962735    mkdir -p $mountpoint
    2697     mount -t ext2 -o loop $tempfile $mountpoint || Die "Cannot loopmount $tempfile to $mountpoint"
     2736    mount -t ext2 -o loop $tempfile $mountpoint || Die "Cannot loopmount $tempfile to $mountpoint! The reason may be missing support for loopfs or ext2 (or both) in the running kernel."
    26982737    echo -en "..."
    26992738    old_pwd=`pwd`
     
    31953234    else
    31963235        if ! PrepareBootDiskImage_LILO $imagesdir 1722 $kernelpath $ramdisk_size ; then
    3197         LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"
    3198         LogIt "if you want to make a 1.72MB floppy disk.\n"
    3199         fi
    3200         PrepareBootDiskImage_LILO $imagesdir 2880 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
     3236            LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"
     3237            LogIt "if you want to make a 1.72MB floppy disk.\n"
     3238        fi
     3239        if ! PrepareBootDiskImage_LILO $imagesdir 2880 $kernelpath $ramdisk_size ;  then
     3240            LogIt "Warning - failed to create 2.88MB floppy disk image.\n"
     3241            LogIt "Please reduce your kernel's size\n"
     3242            LogIt "if you want to make a 2.88MB floppy disk.\n"
     3243            PrepareBootDiskImage_LILO $imagesdir 5760 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
     3244        fi
    32013245    fi
    32023246else
Note: See TracChangeset for help on using the changeset viewer.