Changeset 1880 in MondoRescue
- Timestamp:
- Jan 27, 2008, 9:24:51 PM (17 years ago)
- Location:
- branches/2.2.5/mindi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mindi/mindi
r1876 r1880 6 6 # mindi - mini-Linux distro based on the user's filesystem & distribution 7 7 # 8 # Mindi can create a multi- floppy boot/root kit. The first floppyis the boot8 # Mindi can create a multi-image boot/root kit. The first image is the boot 9 9 # disk: it contains a kernel, a ramdisk etc. The second disk is data disk #1; 10 10 # the third disk is data disk #2; and so it goes. … … 19 19 20 20 #RUN_AFTER_INITIAL_BOOT_PHASE="echo \"Who lives in a pineapple under the sea?\" > /tmp/spongebob.squarepants.txt" 21 # after booting from floppy/CD imagebut before21 # after booting from image/CD but before 22 22 # accessing auxiliary data disks (or the rest of 23 23 # the CD), the initscript will run the above command. … … 82 82 LOGFILE=/var/log/mindi.log 83 83 FDDEVICE=/dev/fd0 ; # 1.44MB floppy #0 84 CACHE_LOC=/var/cache/mindi84 MINDI_CACHE=/var/cache/mindi 85 85 FORCE_DUAL_FLOPPIES=no 86 86 BOOT_MEDIA_MESSAGE="\ … … 112 112 113 113 # Purge from potential old run 114 rm -rf $ CACHE_LOC/* 2> /dev/null115 mkdir -p $ CACHE_LOC114 rm -rf $MINDI_CACHE/* 2> /dev/null 115 mkdir -p $MINDI_CACHE 116 116 # ---------------------------------------------------------------------------- 117 117 … … 142 142 Aborted() { 143 143 trap SIGHUP SIGTERM SIGTRAP SIGINT 144 [ "$ CACHE_LOC" != "" ] && rm -f $CACHE_LOC/mindi*img $CACHE_LOC/*gz $CACHE_LOC/mindi.iso144 [ "$MINDI_CACHE" != "" ] && rm -f $MINDI_CACHE/mindi*img $MINDI_CACHE/*gz $MINDI_CACHE/mindi.iso 145 145 [ "$minidir_root" != "" ] && rm -Rf $minidir_root/* 146 146 Die "User abort." … … 427 427 if [ "$?" -ne "0" ] ; then 428 428 umount $mountpoint 429 Die "Tarball $tarball is too big for disk! (CODI)\nTell Dev Team to adjust MAX_COMPRESSED_SIZE" 429 rmdir $mountpoint 430 Die "Tarball $tarball is too big for disk! (CODI)\nAdjust mindi_max_compressed_size in your $MINDI_CONFIG" 430 431 fi 431 432 [ "$diskno" -eq "$noof_disks" ] && echo "This is the last disk ($diskno=$noof_disks)" >> $mountpoint/LAST-DISK … … 1717 1718 [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE 1718 1719 if [ "$ARCH" != "ia64" ] ; then 1719 mkisofs -U -J -r -o $ CACHE_LOC/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log1720 else 1721 mkisofs -J -r -o $ CACHE_LOC/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log1720 mkisofs -U -J -r -o $MINDI_CACHE/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log 1721 else 1722 mkisofs -J -r -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log 1722 1723 fi 1723 1724 if [ "$?" -ne "0" ] ; then … … 1728 1729 LogIt "Failed to create ISO image." 1729 1730 else 1730 echo "Created bootable ISO image at $ CACHE_LOC/mindi.iso" | tee -a $LOGFILE1731 echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" | tee -a $LOGFILE 1731 1732 fi 1732 1733 rm -f $MINDI_TMP/mkisofs.log … … 2049 2050 t=vfat 2050 2051 else 2051 mke2fs -N 26 -m 0 -F $imagefile >> $LOGFILE 2>> $LOGFILE 2052 echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE 2053 mke2fs -N 26 -m 0 -F $imagefile &> /dev/null || Die "Unable to create an ext2 file system on $imagefile" 2052 2054 t=ext2 2053 2055 fi … … 2880 2882 2881 2883 # Management of potential HW info (Proliant only at the moment) 2882 rm -rf $ CACHE_LOC/bkphw2883 mindi-bkphw $ CACHE_LOC$MINDI_CONF | tee -a $LOGFILE2884 if [ -d $ CACHE_LOC/bkphw ]; then2884 rm -rf $MINDI_CACHE/bkphw 2885 mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE 2886 if [ -d $MINDI_CACHE/bkphw ]; then 2885 2887 LogIt "Hardware Information found and saved ..." 2886 cp -rp $ CACHE_LOC/bkphw .2887 if [ -f $ CACHE_LOC/tools.files ]; then2888 lis=`grep -Ev '^#' $ CACHE_LOC/tools.files`2888 cp -rp $MINDI_CACHE/bkphw . 2889 if [ -f $MINDI_CACHE/tools.files ]; then 2890 lis=`grep -Ev '^#' $MINDI_CACHE/tools.files` 2889 2891 LocateDeps $lis > $MINDI_TMP/tools.lis 2890 2892 cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` . 2891 2893 fi 2892 if [ -f $ CACHE_LOC/mindi-rsthw ]; then2893 mv -f $ CACHE_LOC/mindi-rsthw .2894 if [ -f $MINDI_CACHE/mindi-rsthw ]; then 2895 mv -f $MINDI_CACHE/mindi-rsthw . 2894 2896 chmod 755 ./mindi-rsthw 2895 2897 fi 2896 rm -f $MINDI_TMP/tools.lis $ CACHE_LOC/tools.files2898 rm -f $MINDI_TMP/tools.lis $MINDI_CACHE/tools.files 2897 2899 fi 2898 2900 … … 3338 3340 mkdir -p $MINDI_TMP 3339 3341 # This is the scratch dir in mondo - subdir images 3340 CACHE_LOC=$33341 if [ _"$ CACHE_LOC" != _"" ]; then3342 mkdir -p $ CACHE_LOC3342 MINDI_CACHE=$3 3343 if [ _"$MINDI_CACHE" != _"" ]; then 3344 mkdir -p $MINDI_CACHE 3343 3345 fi 3344 3346 kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath="" … … 3402 3404 [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time" 3403 3405 # MONDO_ROOT is the real scratchdir 3404 MONDO_ROOT=`echo $ CACHE_LOC| sed 's/\(.*\)\/.*/\1/'`3406 MONDO_ROOT=`echo $MINDI_CACHE | sed 's/\(.*\)\/.*/\1/'` 3405 3407 if [ _"$MONDO_ROOT" != _"" ]; then 3406 3408 mkdir -p $MONDO_ROOT … … 3507 3509 YOUR_KERNEL_SUCKS="Your kernel sucks" 3508 3510 fi 3509 echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$ CACHE_LOC" >> $LOGFILE3511 echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$MINDI_CACHE" >> $LOGFILE 3510 3512 [ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty..." 3511 3513 3512 3514 [ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it.\nGo to http://www.mondorescue.org and download it, then install it." 3513 3515 3514 PrepareDataDiskImages $ CACHE_LOC3516 PrepareDataDiskImages $MINDI_CACHE 3515 3517 noof_disks=$? 3516 3518 ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE)) … … 3520 3522 echo "Ramdisk will be $ramdisk_size KB" >> $LOGFILE 3521 3523 if [ "$ARCH" = "ia64" ] ; then 3522 PrepareBootDiskImage_LILO $ CACHE_LOC$BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image."3524 PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image." 3523 3525 else 3524 3526 if [ "$USE_LILO" = "yes" ] ; then 3525 if ! PrepareBootDiskImage_LILO $ CACHE_LOC1722 $kernelpath $ramdisk_size ; then3527 if ! PrepareBootDiskImage_LILO $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then 3526 3528 LogIt "WARNING - failed to create 1.72MB boot image." 3527 3529 LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk." 3528 3530 fi 3529 if ! PrepareBootDiskImage_LILO $ CACHE_LOC2880 $kernelpath $ramdisk_size ; then3531 if ! PrepareBootDiskImage_LILO $MINDI_CACHE 2880 $kernelpath $ramdisk_size ; then 3530 3532 LogIt "WARNING - failed to create 2.88MB floppy disk image." 3531 3533 LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk." 3532 PrepareBootDiskImage_LILO $ CACHE_LOC$BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."3533 fi 3534 else 3535 if ! PrepareBootDiskImage_SYSLINUX $ CACHE_LOC1722 $kernelpath $ramdisk_size ; then3534 PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image." 3535 fi 3536 else 3537 if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then 3536 3538 LogIt "WARNING - failed to create 1.72MB boot image." 3537 3539 LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk." 3538 if ! PrepareBootDiskImage_SYSLINUX $ CACHE_LOC2880 $kernelpath $ramdisk_size ; then3540 if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 2880 $kernelpath $ramdisk_size ; then 3539 3541 LogIt "WARNING - failed to create 2.88MB floppy disk image." 3540 3542 LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk." 3541 PrepareBootDiskImage_SYSLINUX $ CACHE_LOC$BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE kB floppy disk image."3543 PrepareBootDiskImage_SYSLINUX $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE kB floppy disk image." 3542 3544 fi 3543 3545 fi … … 3549 3551 3550 3552 if [ _"$MONDO_SHARE" = _"" ]; then 3551 ListImagesForUser $ CACHE_LOC3553 ListImagesForUser $MINDI_CACHE 3552 3554 boot_dev=/dev/fd0u1722 3553 3555 [ ! -e "$boot_dev" ] && mknod $boot_dev b 2 60 … … 3555 3557 [ ! -e "$boot_dev" ] && Die "Oh Lord, will you PLEASE tell the vendor to create the 1.72MB devices in /dev?" 3556 3558 if [ "$PROMPT_WRITE_BOOT_FLOPPIES" = "yes" ]; then 3557 OfferToCopyImagesToDisks $ CACHE_LOC$boot_dev $FDDEVICE3559 OfferToCopyImagesToDisks $MINDI_CACHE $boot_dev $FDDEVICE 3558 3560 fi 3559 3561 if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then 3560 OfferToMakeBootableUSB $ CACHE_LOC3561 fi 3562 OfferToMakeBootableISO $ CACHE_LOC3562 OfferToMakeBootableUSB $MINDI_CACHE 3563 fi 3564 OfferToMakeBootableISO $MINDI_CACHE 3563 3565 LogIt "Finished." 3564 3566 elif [ "$TAPEDEV" ] ; then 3565 OfferToMakeBootableISO $ CACHE_LOC3566 if [ -e "$ CACHE_LOC/all.tar.gz" ] ; then3567 cp -f $ CACHE_LOC/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE3567 OfferToMakeBootableISO $MINDI_CACHE 3568 if [ -e "$MINDI_CACHE/all.tar.gz" ] ; then 3569 cp -f $MINDI_CACHE/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE 3568 3570 else 3569 3571 Die "Cannot find all.tar.gz, to be written to tape" 3570 3572 fi 3571 3573 elif [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then 3572 OfferToMakeBootableUSB $ CACHE_LOC3574 OfferToMakeBootableUSB $MINDI_CACHE 3573 3575 else 3574 OfferToMakeBootableISO $ CACHE_LOC3576 OfferToMakeBootableISO $MINDI_CACHE 3575 3577 fi 3576 3578 # cleanup -
branches/2.2.5/mindi/mindi-bkphw
r1877 r1880 77 77 } 78 78 if ($tool =~ /\.scexe$/) { 79 print "Found $tool, that firmware will be applied at restore time on your HP Proliant\n"; 79 80 print SCRIPT "$tool\n"; 80 81 }
Note:
See TracChangeset
for help on using the changeset viewer.