Ignore:
Timestamp:
May 17, 2010, 5:57:40 AM (14 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2586:2634 svn+ssh://bruno@svn.mondorescue.org/mondo/svn/mondorescue/branches/2.2.9

  • Avoids error messages from stat in analyze-my-lvm
  • Avoid perl warning by removing non-exitent dirs from @INC in mindi-get-perl-modules r3744@localhost: bruno | 2010-03-16 01:44:33 +0100
    • Fix a bug on Mandriva modules analysis (at least) (Backport from mindi 2.1.0)
  • Try to improve exclusion of binded /proc mount with "none" fs type exclusion Cf: #397
  • Adds gmane mirror on the support page of the web site.
  • More website improvements based on Tom Metro feedbacks
  • Adds Nable ML archive
  • For gmane prefer the threaded view to the blog one.
  • Fix an initialization bug for network protocol in interactive mode (was NULL and not NFS by default)
  • Put an explicit notice of MondoRescue's license: GPLv2 or later (as per Hugo's notice in sources)
  • Adds tee to deplist
  • Fix #412 by supporting grub-install.unsupported for OpenSuSE and solving an issue with the parameter passed to grub for device which should be a device name, not a partition.
  • Fix #413 where list of devices was not re-initialized correctly in a loop (Michael Shapiro)
  • Fix #415 by avoiding integration of unknown devices report from pvscan (Mike Shapiro)
  • Fix #414 by adding a function GetPVsForLV to remove PVs from excluded LVs (Mike Shapiro)
  • Fixes for #414: remove comments from grub conf file if used and improve grub conf file generation
  • Fix a typo (Mike Shapiro)
  • Improved msg for USB device creation
  • Mondoarchive should not try to cerate a cmp binary if it doesn't exist.
  • Fix a bug on ia64 where the boot image generated was removed before use in mondo
  • Avoid to have multiple similar calls to mkisofs by using macros r3946@localhost: bruno | 2010-05-04 19:17:51 +0200
    • Solves an issue with usage of -V option in mkiofs wrongly placed
  • netfs_proto should be initialized in every case, not just in DR (should solve remaining NULL reports)
  • Integrate Michael Shapiro's patch on Xen Kernel support for RHEL 5 (only atm) and fixes #418 (Michael Shapiro)
  • Fox a typo in a Web page
  • Precise that GPL is v2+ (as per Hugo's wish)
  • Improve display of messages (removes extra \n) and replace a stract with "" with " ". trying to debug #421
  • Remove a wrong usage of mr_strcat with exclude_path in the 2.2.9 version (probably cause of #421)
  • Fix strcat call !
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/restore-scripts/mondo/grub-MR

    r2508 r2635  
    6969
    7070    echo -en "\
    71     device (hd$driveno) $mbrpart\n\
     71    device (hd$driveno) $mbrdev\n\
    7272    $extraline\n\
    7373    root (hd$driveno,$partno)\n\
     
    7777    log_file=/tmp/grub.output
    7878    if [ "$MNT_RESTORING" ] ; then
    79         chroot /mnt/RESTORING grub --batch < /tmp/feed.txt > $log_file
     79        chroot $MNT_RESTORING grub --batch < /tmp/feed.txt > $log_file
    8080    else
    8181        grub --batch < /tmp/feed.txt > $log_file
     
    104104
    105105echo "Now I'll use grub-install" >> $LOGFILE
    106 chroot /mnt/RESTORING grub-install $1 >> $LOGFILE
    107 res=$?
     106if [ "$MNT_RESTORING" ] ; then
     107    chroot $MNT_RESTORING grub-install $1 2>&1 | tee -a  $LOGFILE
     108    res=$?
     109else
     110    grub-install $1 2>&1 | tee -a $LOGFILE
     111    res=$?
     112fi
    108113echo "grub-install returned $res" >> $LOGFILE
    109114[ "$res" -eq "0" ] && exit 0
    110115
     116# For some OpenSuSE
     117echo "Now I'll use grub-install.unsupported" >> $LOGFILE
     118if [ "$MNT_RESTORING" ] ; then
     119    chroot $MNT_RESTORING grub-install.unsupported $1 2>&1 | tee -a $LOGFILE
     120    res=$?
     121else
     122    grub-install.unsupported $1 2>&1 | tee -a $LOGFILE
     123    res=$?
     124fi
     125echo "grub-install.unsupported returned $res" >> $LOGFILE
     126[ "$res" -eq "0" ] && exit 0
     127
    111128echo "Trying a hack" >> $LOGFILE
    112 FindBootPart $1 $2
    113 mbrpart=$1
     129FindBootPart $1 $2 2>&1 | tee -a $LOGFILE
     130mbrdev=`echo $1 | sed 's/\([^0-9]*\)[0-9]*$/\1/'`
    114131if echo $bootpart | grep "/cciss/" > /dev/null ; then
    115132    partno=`basename $bootpart | cut -d'p' -f2`
     133    mbrdev=`echo $mbrdev | cut -d'p' -f1`
    116134elif echo $bootpart | grep "/mapper/mpath" > /dev/null ; then
    117135    partno=`basename $bootpart | cut -d'p' -f3`
     136    mbrdev=`echo $mbrdev | cut -d'p' -f1`
    118137else
    119     partno=`basename $bootpart | sed s/[a-z]*//`
     138    partno=`basename $bootpart | sed 's/[a-z]*//'`
    120139fi
    121140if [ ! "$partno" ] ; then
     
    125144fi
    126145if echo $bootpart | grep "/md" > /dev/null ; then
     146    # FIXME: Why this if not used later
    127147    base=`basename $bootpart`
    128148    line=`grep $base /proc/mdstat | head -n1`
    129     echo "mbrpart was $mbrpart"
    130     mbrpart=`parted2fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' | cut -d' ' -f2`
    131     echo "mbrpart is $mbrpart"
     149    echo "mbrdev was $mbrdev" 2>&1 | tee -a $LOGFILE
     150    mbrdev=`parted2fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' | cut -d' ' -f2`
     151    echo "mbrdev is $mbrdev" 2>&1 | tee -a $LOGFILE
    132152    partno="0"; # cheating - FIXME   
    133153fi
    134 echo ".............Cool."
     154echo ".............Cool." 2>&1 | tee -a $LOGFILE
    135155
    136156grub=`FindPathOfRESTExe grub`
     
    142162for driveno in 0 1 2 ; do
    143163    try_grub_hack $driveno $partno "" >> $LOGFILE 2>> $LOGFILE && break
    144     try_grub_Hack $driveno $partno "find $BOOTPATHNAME/stage1" >> $LOGFILE 2>> $LOGFILE && break
     164    try_grub_hack $driveno $partno "find $BOOTPATHNAME/stage1" >> $LOGFILE 2>> $LOGFILE && break
    145165done
    146166res=$?
     
    152172echo "Now I'll use grub-install.patched" >> $LOGFILE
    153173cp -f `which grub-install.patched` /mnt/RESTORING/sbin
    154 chroot /mnt/RESTORING grub-install.patched $1 >> $LOGFILE
     174chroot /mnt/RESTORING grub-install.patched $1 2>&1 | tee -a $LOGFILE
    155175res=$?
    156176echo "grub-install.patched returned $res" >> $LOGFILE
     
    160180
    161181if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then
    162     GRUBCFGFILE=/boot/grub/menu.lst
     182    grep -vE '^#' /boot/grub/menu.lst > /mnt/RESTORING/tmp/grub.conf
    163183elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then
    164     GRUBCFGFILE=/boot/grub/grub.cfg
     184    grep -vE '^#' /boot/grub/grub.cfg > /mnt/RESTORING/tmp/grub.conf
    165185else
    166     echo "Unable to find Grub conf file"
     186    echo "Unable to find Grub conf file" | tee -a $LOGFILE
    167187    exit -1
    168188fi
    169 echo "Trying to use the existing $GRUBCFGFILE file in batch mode" >> $LOGFILE
    170 chroot /mnt/RESTORING grub --batch < /mnt/RESTORING$GRUBCFGFILE
     189echo "Trying to use the existing grub conf file in batch mode" >> $LOGFILE
     190cat /mnt/RESTORING/tmp/grub.conf >> $LOGFILE
     191chroot /mnt/RESTORING grub --batch < /mnt/RESTORING/tmp/grub.conf
    171192res=$?
    172 echo "$GRUBCFGFILE approach returned $res" >> $LOGFILE
     193echo "grub conf file approach returned $res" >> $LOGFILE
     194rm -f /mnt/RESTORING/tmp/grub.conf
    173195[ "$res" -eq "0" ] && exit 0
    174196
Note: See TracChangeset for help on using the changeset viewer.