Changeset 3241 in MondoRescue


Ignore:
Timestamp:
Jan 7, 2014, 2:47:57 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Should fix #735 by adding a function to detect potential ldlinux.c32 file with syslinux 5.x and addd it to all syslinux media generated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3239 r3241  
    6767IDE_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"
    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 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"
     69USB_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-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 ptp_pch pps_core"
    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"
     
    483483    rm -f $MINDI_TMP/keymaps.find
    484484    return 0
     485}
     486
     487
     488FindLdlinux32Binary() {
     489    LDLINUXC32=/usr/lib/syslinux/ldlinux.c32
     490    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/lib/syslinux/ldlinux.c32
     491    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/lib64/syslinux/ldlinux.c32
     492    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/share/syslinux/ldlinux.c32
     493    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/share/lib/syslinux/ldlinux.c32
     494    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/share/lib64/syslinux/ldlinux.c32
     495    #[ ! -e "$LDLINUXC32" ] && LDLINUXC32=`find / -name ldlinux.c32 | grep -x "/.*/ldlinux.c32"`
     496    if [ ! -e "$LDLINUXC32" ]; then
     497        LogFile "INFO: If you use syslinux 5.x, you may miss ldlinux.c32. If your syslinux RPM doesn't include ldlinux.c32, you may want to download another one"
     498        LDLINUXC32=/tmp/idoesnthopefullyexist
     499    else
     500        LogFile "INFO: Found ldlinux.c32 at $LDLINUXC32"
     501    fi
    485502}
    486503
     
    14851502    MakeMessageFile $MINDI_TMP/iso | cut -c1-80 > $MINDI_TMP/iso/message.txt
    14861503    if [ $KERNEL_IS_XEN = "yes" ]; then
     1504        FindMboot32Binary
    14871505        cp $xenkernelpath $MINDI_TMP/iso/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?"
    14881506        cp $MBOOTC32 $MINDI_TMP/iso/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?"
    14891507    fi
     1508    # Useful for syslinux 5.x
     1509    FindLdlinux32Binary
     1510    if [ -e $LDLINUXC32 ]; then
     1511        cp $LDLINUXC32 $MINDI_TMP/iso/ldlinux.c32  2>> $LOGFILE || Die "Cannot copy ldlinux.c32 ($LDLINUXC32) to mindi tmp ($MINDI_TMP/iso/ldlinux.c32). Did you run out of disk space?"
     1512    fi
    14901513    cp $kernelpath $MINDI_TMP/iso/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/vmlinuz). Did you run out of disk space?"
    14911514    cp $MINDI_TMP/initrd.img $MINDI_TMP/iso/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MINDI_TMP/iso/initrd.img. Did you run out of disk space?"
     
    14931516    if [ _"$MONDO_SHARE" != _"" ]; then
    14941517        if [ $KERNEL_IS_XEN = "yes" ]; then
    1495             cp $xenkernelpath $MONDO_ROOT/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?"
    1496             cp $MBOOTC32 $MONDO_ROOT/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?"
     1518            cp $xenkernelpath $MONDO_ROOT/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MONDO_ROOT/iso/xen.gz). Did you run out of disk space?"
     1519            cp $MBOOTC32 $MONDO_ROOT/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MONDO_ROOT/iso/mboot.c32). Did you run out of disk space?"
     1520        fi
     1521        if [ -e $LDLINUXC32 ]; then
     1522            cp $LDLINUXC32 $MONDO_ROOT/iso/ldlinux.c32  2>> $LOGFILE || Die "Cannot copy ldlinux.c32 ($LDLINUXC32) to $MONDO_ROOT/iso/ldlinux.c32. Did you run out of disk space?"
    14971523        fi
    14981524        cp $kernelpath $MONDO_ROOT/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     
    15081534        if [ _"$MONDO_SHARE" != _"" ]; then
    15091535            cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt,boot*.txt,pxe.txt} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?"
     1536            if [ -e $MINDI_TMP/iso/ldlinux.c32 ]; then
     1537                cp $MINDI_TMP/iso/ldlinux.c32 $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy ldlinux.c32 (from $MINDI_TMP/iso/$LDLINUXC32) to $MONDO_ROOT. Did you run out of disk space?"
     1538            fi
    15101539            if [ $KERNEL_IS_XEN = "yes" ]; then
    15111540                cp -f $MINDI_TMP/iso/{mboot.c32,xen.gz} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy Xen core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?"
     
    23902419        possible_xenkernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -i "xen" | sort -u | tr '\n' ' '`
    23912420        noof_xenkernels=`CountItemsIn "$possible_xenkernels"`
    2392         FindMboot32Binary
    23932421    fi
    23942422    possible_kernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -vi "xen" | sort -u | tr '\n' ' '`
     
    25162544   
    25172545    # Copy of files mandatory for ssh to automate mount if sshfs is used
    2518     mkdir $mountpoint/.ssh
     2546    mkdir $mountpoint/.ssh $mountpoint/tmp
    25192547    cp -a ~root/.ssh/* $mountpoint/.ssh 2> /dev/null
    2520     echo > $mountpoint/tmp/myssh << EOF
     2548    cat > $mountpoint/tmp/myssh << EOF
    25212549ssh -o StrictHostKeyChecking=no $*
    25222550EOF
Note: See TracChangeset for help on using the changeset viewer.