Changeset 3253 for branches/3.2


Ignore:
Timestamp:
Feb 27, 2014, 3:48:28 AM (6 years ago)
Author:
bruno
Message:
  • mindo now uses mr-kernel-get-modules for automatic dependency analysis
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3248 r3253  
    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 stp garp"
     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 dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 i2o_block ide-scsi ieee1394 imm in2000 initio ips iscsi be2iscsi cxgb3i cxgb3 cxgb4i cxgb4 uio isp megaraid megaraid_mbox megaraid_sas mega_sr mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qla2400 qla2xxx qlogicfas qlogicfc qlogicisp qlogicfas qlogicfas408 raw1394 scsi_mod sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs intermodule emcpdm emcpgpx emcpmpx emcp dc395x diskdumplib 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 edd paride ata_generic ata_piix dock via82cxxx generic nvidia ahci 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 virtio"
    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 uhci-hcd ehci-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"
    70 NET_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 ptp_pch pps_core"
    71 CDROM_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"
     69USB_MODS="usb-storage usb_storage usb-ohci usb-uhci input hid uhci_hcd uhci-hcd ehci-hcd ehci-pci ohci-hcd ohci_hcd ohci-pci xhci xhci-hcd usbkbd usbhid keybdev mousedev scsi_mod ff-memless ums_cypress ums-cypress cp210x usbserial"
     70NET_MODS="nfs loop mii 3c59x e100 bcm5700 cnic be2net bnx2 bnx2x bnx2i mdio e1000 e1000e igb dca eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse netbk xenblktap r8169 virtio_net via_rhine ipv6 ptp"
     71CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS cdrom isocd isofs sg sr_mod iso9660 vfat fat"
    7272# Those modules will only go on the backup media, not the boot media.
    73 EXTRA_MODS="$CDROM_MODS loop md-mod linear raid0 raid1 xor raid10 raid5 raid456 raid6_pq async_raid6_recov async_pq xor async_tx async_memcpy async_xor lvm-mod dm-mod dm_mod dm-snapshot dm_snapshot dm-zero dm_zero dm-mirror dm_mirror dm-multipath dm-round-robin dm-emc dm-hp-sw dm-rdac dm-region-hash dm-snapshot dm-log multipath jfs xfs btrfs zlib_deflate xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache ext4 jbd2 crc16 ocfs2 ocfs2_dlm ocfs2_nodemanager configfs vxodm vxgms vxglm gab llt dmpaa vxspec vxio vxdmp vxportal fdd vxfs "
     73EXTRA_MODS="$CDROM_MODS loop md-mod lvm-mod dm-mod dm_mod dm-multipath dm-emc dm-hp-sw dm-rdac dm-region-hash multipath jfs xfs btrfs reiserfs ext2 ext3 minix nfs nfsd ext4 ocfs2 configfs vxfs "
    7474# Replace with that line for HP OCMP e.g.
    7575#DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams kqemu fdomain"
     
    525525    [ ! -e "$ISOLINUX" ] && Die "Please install isolinux first. If your syslinux RPM doesn't include isolinux, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue.org/downloads.shtml"
    526526    LogFile "INFO: Found isolinux.bin at $ISOLINUX"
    527 }
    528 
    529 
    530 FindSpecificModuleInPath() {
    531     local modpaths pwd line
    532     pwd=`pwd`
    533     cd /
    534     if [ ! -e "$1" ] ; then
    535         LogAll "WARNING: cannot search specific path '$1'"
    536         return 1
    537     fi
    538     # Find all files and links (required for some VMWare VMs)
    539     modpaths=`find "$1" -name $2.*o -o -name $2.o.gz -o -name $2.ko.gz -o -name $2.ko.xz -o -name $2 -type f -o -type l`
    540     echo "$modpaths"
    541     cd "$pwd"
    542527}
    543528
     
    26782663    echo -en "..."
    26792664    cd /
    2680     if [ "${kernelname}" != "" ]; then
    2681         needed_modules_path=lib/modules/${kernelname}
    2682     else
    2683         needed_modules_path=lib/modules/$KERVERRUN
    2684     fi
    26852665
    26862666    needed_modules=""
     
    26992679    done
    27002680
    2701     [ -e "$needed_modules_path" ] || LogIt "WARNING: path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
    2702     for i in $list_of_groovy_mods ; do
    2703         needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`"
    2704     done
    2705 
    2706     for i in `echo $needed_modules  | tr ' ' '\n' | sort -u`; do
    2707         [ -e "$i" ] && s=`du -sk $i | cut -f1` || s=""
    2708         LogFile "INFO: Adding $i ($s KB) to the rootfs"
    2709         tar cf - -C / $i 2>> $MINDI_TMP/$$.log | (cd "$mountpoint" ; tar xf -) || LogIt "ERROR: Unable to copy $i to $mountpoint" $MINDI_TMP/$$.log
    2710         # Uncompress modules if not using udev and native modprobe
    2711         if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
    2712             if [ "`echo "$i" | grep -F ".gz"`" ]; then
    2713                 LogFile "INFO: Uncompressing $i"
     2681    if [ "${kernelname}" != "" ]; then
     2682        needed_modules_path=lib/modules/${kernelname}
     2683        mkgmopt="-k $needed_modules_path"
     2684    else
     2685        needed_modules_path=lib/modules/$KERVERRUN
     2686        mkgmopt="-k $KERVERRUN"
     2687    fi
     2688
     2689    [ -e "$needed_modules_path" ] || LogIt "WARNING: path $needed_modules_path does not exist.\n         If you're not using a modular kernel then mindi won't probably work."
     2690    needed_modules=`mr-kernel-get-modules $mkgmopt $list_of_groovy_mods`
     2691
     2692    LogFile "INFO: Adding $needed_modules to the rootfs"
     2693    cp --parents -aL $needed_modules $mountpoint/ 2>> $MINDI_TMP/$$.log || LogIt "ERROR: Unable to copy modules to $mountpoint" $MINDI_TMP/$$.log
     2694
     2695    # Uncompress modules if not using udev and native modprobe
     2696    if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     2697        for i in $needed_modules; do
     2698            if [ "`echo "$i" | grep -E ".gz$"`" ]; then
    27142699                gunzip -f $mountpoint/$i
    27152700            fi
    2716         fi
    2717         if [ -L $mountpoint/$i ] && [ `echo "$i" | grep "\.ko$"` ]; then
    2718             echo "Replacing module symlink ($i) with actual file"
    2719             rm -f $mountpoint/$i
    2720             cp -Lf $i $mountpoint/$i
    2721             ls -l $mountpoint/$i
    2722         fi
    2723     done
     2701            if [ "`echo "$i" | grep -E ".bz$"`" ]; then
     2702                bunzip2 -f $mountpoint/$i
     2703            fi
     2704            if [ "`echo "$i" | grep -E ".xz$"`" ]; then
     2705                unxz -f $mountpoint/$i
     2706            fi
     2707            LogFile "INFO: Uncompressing $i"
     2708        done
     2709    fi
    27242710
    27252711    # Also copy modules.* in case of udev so that normal modprobe works
Note: See TracChangeset for help on using the changeset viewer.