Changeset 3561 in MondoRescue


Ignore:
Timestamp:
Apr 11, 2016, 6:12:30 PM (8 years ago)
Author:
Bruno Cornec
Message:

Backports from 3.0 future and 3.2:

  • Adds support for the hpvsa driver
  • Fix #724 by adding ehci-pci support in USB_MODS
  • Adds support for ohci-hcd and ohci_hcd
  • Fix a keyboard detection bug (wrong directory added /usr/share)
  • Fix keyboard support on Fedora 19 (no conf file found so used the X11 one)
  • Fix kernel detection on 3.9+ where the message was lacking <> around the 6
  • Fix #753 by forcing LV creation which on RHEL7 now asks a question in case something was already there before.
Location:
branches/3.0-mindi-2.1
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.0-mindi-2.1/mindi/analyze-my-lvm

    r3066 r3561  
    7575    fi
    7676
    77     echo "# $LVMCMD lvcreate$params -n $logical_volume $volume_group"
     77    echo "# $LVMCMD echo y | lvcreate$params -n $logical_volume $volume_group"
    7878}
    7979
  • branches/3.0-mindi-2.1/mindi/deplist.d/minimal.conf

    r3160 r3561  
    116116/etc/conf.modules
    117117/etc/modules.conf.local
     118/etc/depmod.d/hpvsa.conf
    118119# Debian 7
    119120/bin/kmod
  • branches/3.0-mindi-2.1/mindi/mindi

    r3184 r3561  
    3939TMPDIR=/tmp
    4040
    41 EXTRA_SPACE=120000      # increase if you run out of ramdisk space
    42 BOOT_SIZE=65600         # size of the boot disk
     41EXTRA_SPACE=140000      # increase if you run out of ramdisk space
     42BOOT_SIZE=75600         # size of the boot disk
    4343
    4444PROMPT_MAKE_CD_IMAGE="yes"
     
    6262MY_FSTAB=/etc/fstab
    6363TAPE_MODS="ht st osst ide-tape ide_tape"
    64 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 be2iscsi cxgb3i cxgb3 cxgb4i cxgb4 libcxgbi iscsi_boot_sysfs iscsi_target_mod iscsi_tcp libiscsi libiscsi2 scsi_transport_iscsi scsi_transport_iscsi2 libiscsi_tcp uio 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 scsi_dh_emc scsi_dh_alua dc395x diskdumplib scsi_dump_register arcmsr"
     64SCSI_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 hpvsa 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 be2iscsi cxgb3i cxgb3 cxgb4i cxgb4 libcxgbi iscsi_boot_sysfs iscsi_target_mod iscsi_tcp libiscsi libiscsi2 scsi_transport_iscsi scsi_transport_iscsi2 libiscsi_tcp uio 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 scsi_dh_emc scsi_dh_alua dc395x diskdumplib scsi_dump_register arcmsr"
    6565
    6666# ide-probe-mod
    67 IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs ide-core ide_core ide-gd_mod ide_gd_mod edd paride ata_generic ide_pci_generic ata_piix libata dock via82cxxx generic nvidia ahci libahci sata_nv cmd64x pata_via pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron pata_atiixp pata_acpi amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw blkbk virtio virtio_ring virtio_pci virtio_blk virtio_balloon"
     67IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs ide-core ide_core ide-gd_mod ide_gd_mod edd paride ata_generic ide_pci_generic ata_piix libata dock via82cxxx generic nvidia ahci libahci sata_nv cmd64x pata_via pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron pata_atiixp pata_acpi amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw blkbk virtio virtio_ring virtio_pci virtio_blk virtio_balloon hv_storvsc"
    6868PCMCIA_MODS="pcmcia_core ds yenta_socket"
    69 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_common usb-common usb_storage input hid hid_generic uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd xhci usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless ums_cypress ums-cypress cp210x usbserial"
     69USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_common usb-common usb_storage input hid hid_generic uhci_hcd ehci-hcd uhci-hcd ehci-pci ohci-hcd ohci_hcd ohci-pci xhci xhci-hcd usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless ums_cypress ums-cypress cp210x usbserial"
    7070NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 cnic be2net 8021q bnx2 bnx2x bnx2i mdio e1000 e1000e igb dca eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse crc32c libcrc32c netbk xenblktap r8169 virtio_net via_rhine garp lzo lzo_decompress lzo_compress ipv6 ptp_pch"
    7171CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_base nls_cp437 nls_utf8 sg sr_mod zlib_inflate iso9660 vfat fat"
     
    373373    local r res mapfile mappath included_item included_list keyfile mp locale
    374374    LogAll "INFO: Analyzing your keyboard's configuration."
    375     KEYDIR=/lib/kbd
     375    KEYDIR=/usr/lib/kbd
    376376    [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share/kbd     # Slackware
    377     [ ! -e "$KEYDIR" ] && KEYDIR=/usr/lib/kbd
    378     [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share
    379     [ ! -e "$KEYDIR" ] && KEYDIR=/etc/condole
    380     [ ! -e "$KEYDIR" ] && KEYDIR=/etc/condole-setup
     377    [ ! -e "$KEYDIR" ] && KEYDIR=/etc/console
     378    [ ! -e "$KEYDIR" ] && KEYDIR=/etc/console-setup
     379    [ ! -e "$KEYDIR" ] && KEYDIR=/lib/kbd
    381380    if [ ! -e "$KEYDIR" ] ; then
    382381        LogAll "WARNING: Keyboard mapping directory not found. I shall use default map at boot-time."
     
    386385        LogFile "INFO: Red Hat-style config detected."
    387386        keyfile=/etc/sysconfig/keyboard
     387    elif [ -e "/etc/vconsole.conf" ] ; then
     388        LogFile "INFO: New Fedora style config detected."
     389        keyfile=/etc/vconsole.conf
    388390    elif [ -e "/etc/rc.d/rc.keymap" ] ; then
    389391        LogFile "INFO: Slackware-style config detected."
     
    423425        LogFile "INFO: Gentoo-style config detected."
    424426        keyfile=/etc/conf.d/keymaps
     427    elif [ -e "/etc/X11/xorg.conf.d/00-keyboard.conf" ] ; then
     428        LogFile "INFO: X11-style config detected."
     429        keyfile=/etc/X11/xorg.conf.d/00-keyboard.conf
    425430    else
    426431        LogFile "Searching for rc.config ..."
     
    441446    locale=`grep -F KEYTABLE "$keyfile" | grep -v '^#' | tr -d '"' |cut -d'=' -f2 | sed 's/.map.gz$//'`
    442447    [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'`        # Slackware
    443     [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | grep -v '^#' | tr -d '"' |cut -d'=' -f2`     # Gentoo & ArchLinux
     448    [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | grep -v '^#' | tr -d '"' |cut -d'=' -f2`     # Gentoo, ArchLinux & New fedora
     449    [ ! "$locale" ] && locale=`grep -E 'XkbLayout' "$keyfile" | grep -v '^#' | awk '{print $3}' | tr -d '"'`        #  Fedora 19
    444450    LogFile "INFO: locale=$locale"
    445451    #
     
    550556#       LogFile "INFO: '$incoming' generates filelist '$filelist'"
    551557        for fname in $filelist ; do
    552             [ "$fname" != "" ] && echo "$fname" >> $tempfile
     558            [ "$fname" != "" ] && echo "$fname" >> $tempfile
    553559        done
    554560        progress=$(($progress+1))
     
    707713    local lcMagicExt2fs="EXT2-fs: blocksize too small for device."
    708714    local lcMagicExt3fs="<3>EXT3-fs: blocksize too small for journal device."
    709     local lcMagicInitfs="<6>checking if image is initramfs...|<6>Unpacking initramfs...|<6>Trying to unpack rootfs image as initramfs"
     715    local lcMagicInitfs="<6>checking if image is initramfs...|[<]*6[>]*Unpacking initramfs...|[<]*6[>]*Trying to unpack rootfs image as initramfs"
    710716
    711717    # local variables
     
    869875                LogFile "          This warning only affects you if you are using LVM."
    870876                if echo "$MODULES" | grep lvm &> /dev/null ; then
    871                     LogFile "          I think you are, so please take heed!"
     877                    LogFile "          I think you are, so please take heed!"
    872878                else
    873                     LogFile "          I don't think you are, so don't worry about it."
     879                    LogFile "          I don't think you are, so don't worry about it."
    874880                fi
    875881            fi
     
    891897    while [ `echo $file | grep -Ec '\.\./'` -ne 0 ]; do
    892898        # We need to normalise the path with .. in it
    893         file=`echo $file | perl -pi -e 's|([^/]*)/([^/]+)/\.\./([^/]+)|$1/$3|g'`
     899        file=`echo $file | perl -p -e 's|([^/]*)/([^/]+)/\.\./([^/]+)|$1/$3|g'`
    894900    done
    895901    echo "$file"
     
    17261732            if [ -e "$MINDI_TMP/NETFS-DEV" ] ; then
    17271733                echo -en "Press <enter> to continue.\n"
     1734                echo -en "$BOOT_MEDIA_MESSAGE"
    17281735            elif [ ! "$MINDI_TMP" ] ; then
    17291736                echo -en "FYI, this is _not_ a Mondo Rescue CD.\n"
     
    21372144        Die "You have $res files present in dependency list\nbut absent from filesystem."
    21382145    fi
    2139     FindAndAddUserKeyboardMappingFile
    21402146    mkdir -p $bigdir/tmp
    21412147    if [ _"$MONDO_SHARE" != _"" ]; then
     
    21432149        cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
    21442150    fi
     2151
     2152    # Needs to be done after the MRCFG creation
     2153    FindAndAddUserKeyboardMappingFile
     2154
    21452155    [ -d "/mnt/.boot.d" ] && echo "GENTOO" > $bigdir/tmp/DUMBASS-GENTOO
    21462156    DropOptimizedLibraries $needlist $bigdir
     
    23512361        if [ "$?" -eq "0" ] ; then
    23522362            # Used by ia64
    2353             fkern_ver=`gzip -cd $fname | strings 2> /dev/null | grep -E '[2-9]+[.][0-9]+[.][0-9]+[^\@]*@'`
     2363            fkern_ver=`gzip -cd $fname | strings 2> /dev/null | grep -E "[2-9]+\.[0-9]+\.[0-9]+[^\@]*@"`
    23542364        else
    2355             fkern_ver=`strings $fname 2> /dev/null | grep -E '[2-9]+[.][0-9]+[.][0-9]+[^\@]*@'`
     2365            fkern_ver=`strings $fname 2> /dev/null | grep -E "[2-9]+\.[0-9]+\.[0-9]+[^\@]*@"`
    23562366        fi
    23572367        echo "$fkern_ver"
     
    25522562   
    25532563    # Copy of files mandatory for ssh to automate mount if sshfs is used
    2554     mkdir $mountpoint/.ssh
    2555     cp -rp ~root/.ssh/* $mountpoint/.ssh 2> /dev/null
    2556     echo > $mountpoint/tmp/myssh << EOF
     2564    mkdir -p $mountpoint/.ssh $mountpoint/tmp
     2565    cp -a ~root/.ssh/* $mountpoint/.ssh 2> /dev/null
     2566    cat > $mountpoint/tmp/myssh << EOF
    25572567ssh -o StrictHostKeyChecking=no $*
    25582568EOF
     
    25602570
    25612571    # Copy of files mandatory for ld.so
    2562     cp -rp /etc/ld.so.c* $mountpoint/etc
     2572    cp -a /etc/ld.so.c* $mountpoint/etc
    25632573
    25642574    # Handle the case where busybox and mount are dynamically linked
     
    25692579    fi
    25702580
    2571     # Copy of files from the minimal env needed as per the deplist.d/minimal.conf file (which includes all busybox deps)
     2581    # Copy of files from the minimal env needed as per the deplist.d/minimal.conf & udev.conf file (which includes all busybox deps)
    25722582    rm -f $MINDI_TMP/minimal.lis $MINDI_TMP/minimal2.lis
    2573     for f in `grep -v " *#.*" $DEPLIST_DIR/minimal.conf | sort -u`; do
    2574         if [ -r $f ]; then
    2575             echo $f >> $MINDI_TMP/minimal.lis
    2576             LocateDeps $f >> $MINDI_TMP/minimal2.lis
     2583    for f in `cat $DEPLIST_DIR/minimal.conf $DEPLIST_DIR/udev.conf | grep -vE " *#.*|^#" | sort -u` ; do
     2584        if [ -d $f ]; then
     2585            for g in `find $f`; do
     2586                echo $g >> $MINDI_TMP/minimal.lis
     2587                LocateDeps $g  >> $MINDI_TMP/minimal2.lis
     2588            done
     2589        else
     2590            if [ -r $f ]; then
     2591                echo $f >> $MINDI_TMP/minimal.lis
     2592                LocateDeps $f >> $MINDI_TMP/minimal2.lis
     2593            fi
    25772594        fi
    25782595    done
     
    26072624        LogIt "INFO: udev device manager found"
    26082625        tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "ERROR: Problem in /etc/udev analysis" $MINDI_TMP/$$.log
    2609         # This avoids NIC remapping if on another machine at restore time on Debian at least
    2610         rm -f ./etc/udev/rules.d/z[0-9][0-9]_persistent-net.rules
    2611         # This avoids NIC remapping if on another machine at restore time on Ubuntu at least
    2612         rm -f ./etc/udev/rules.d/[0-9][0-9]-persistent-net.rules
     2626        # This avoids NIC remapping if on another machine at restore time on Debian/Ubuntu at least
     2627        rm -f ./etc/udev/rules.d/[z]*[0-9][0-9][-_]persistent-net.rules
    26132628        # Do not do it if it's a link (Ubuntu 64 bits #503)
    2614         if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [  ! -h "/lib64/udev" ]; then
     2629        if [ -e "/lib64/udev" ] && [ ! -h "/lib64" ] && [ ! -h "/lib64/udev" ]; then
    26152630            tar cf - -C / /lib64/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "ERROR: Problem in /lib64/udev analysis" $MINDI_TMP/$$.log
    26162631        fi
     
    26202635        if [ -e "/lib/udev" ] && [ ! -h "/lib" ] && [  ! -h "/lib/udev" ]; then
    26212636            tar cf - -C / /lib/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "ERROR: Problem in /lib/udev analysis" $MINDI_TMP/$$.log
     2637        fi
     2638        if [ -e "/usr/lib/udev" ] && [ ! -h "/usr/lib" ] && [  ! -h "/usr/lib/udev" ]; then
     2639            tar cf - -C / /usr/lib/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogIt "ERROR: Problem in /usr/lib/udev analysis" $MINDI_TMP/$$.log
    26222640        fi
    26232641        if [ -x /sbin/udevd ] || [ -x /usr/bin/udevd ] || [ -x /usr/lib/systemd/systemd-udevd ]; then
     
    26312649                    while [ -h $j ]; do
    26322650                        lis="$lis $j"
    2633                         j=`readlink $j`
     2651                        j=`readlink -f $j`
    26342652                    done
    26352653                    lis="$lis $j"
     
    26452663                    [ "$j" != "" ] && rm -f $j
    26462664                fi
     2665                echo "$i" >> $MINDI_TMP/udev.lis
    26472666            done
    26482667            tar cf - -C / $lis `sort -u $MINDI_TMP/udev.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "ERROR: Problem in udev.lis analysis" $MINDI_TMP/$$.log
     
    27432762    # Copy FW in case some drivers needs it
    27442763    for d in "/lib" "/usr/lib"; do
    2745         if [ -d "$d/firmware" ]; then
     2764        if [ -d "$d/firmware" -a ! -h $d ]; then
    27462765            cp -a "$d/firmware" "$mountpoint/$d"
    27472766        fi
     
    27502769    # Copy multipath dynamic libraries in case multipath is used (RHEL 6.4 and later)
    27512770    for d in "/lib" "/usr/lib" "/lib64" "/usr/lib64"; do
    2752         if [ -d "$d/multipath" ]; then
     2771        if [ -d "$d/multipath" -a ! -h $d ]; then
    27532772            cp -a "$d/multipath" "$mountpoint/$d"
    27542773        fi
Note: See TracChangeset for help on using the changeset viewer.