Changeset 1903 in MondoRescue


Ignore:
Timestamp:
Apr 10, 2008, 1:13:58 AM (16 years ago)
Author:
Bruno Cornec
Message:

merge -r 1842:1889 2.2.5

Location:
branches/stable
Files:
4 deleted
28 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi-busybox/.config

    r1842 r1903  
    22# Automatically generated make config: don't edit
    33# Busybox version: 1.7.3-rPBREV
    4 # Thu Nov 15 17:11:06 2007
     4# Mon Jan 14 22:59:00 2008
    55#
    66CONFIG_HAVE_DOT_CONFIG=y
     
    702702# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
    703703# CONFIG_FEATURE_SH_STANDALONE is not set
    704 # CONFIG_CTTYHACK is not set
     704CONFIG_CTTYHACK=y
    705705
    706706#
  • branches/stable/mindi/aux-tools/sbin/calc-disk-size

    r911 r1903  
    66CalcDiskSize() {
    77    local res cylinders sectorsize disksize i curr stub out
    8     res=`parted2fdisk -l $1 2> /dev/null | grep -i "cylinders of"`
     8    res=`parted2fdisk -l $1 2>/dev/null | grep -i "cylinders of"`
    99    cylinders=`echo "$res" | cut -d' ' -f5`
    1010    sectorsize=`echo "$res" | cut -d' ' -f7`
    11     cylindermod=`parted2fdisk -l $1 2> /dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info
     11    cylindermod=`parted2fdisk -l $1 2>/dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info
    1212    cylnum=`echo "$cylindermod" | cut -d' ' -f7`
    1313    predisksize=$(($cylinders*$sectorsize/1024))
  • branches/stable/mindi/mindi

    r1886 r1903  
    27152715    fi
    27162716
    2717     for w in cdrom floppy groovy-stuff ; do
     2717    for w in cdrom groovy-stuff ; do
    27182718        mkdir -p mnt/$w
    27192719    done
     
    27602760    done
    27612761
    2762     [ -e "$floppy_modules_path" ] || LogIt "path $floppy_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
     2762    [ -e "$needed_modules_path" ] || LogIt "path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
    27632763    for i in $list_of_groovy_mods ; do
    27642764        needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`"
     
    27792779
    27802780    # Also copy modules.dep in case of udev so that normal modprobe works
    2781     cp --parents -pdf /$floppy_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2781    cp --parents -pdf /$needed_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
    27822782
    27832783    # For all modules supported, create symlinks under the mountpoint
  • branches/stable/mindi/mindi-bkphw

    r1842 r1903  
    1515my $confdir = "$ARGV[1]";
    1616
     17die "You need dmidecode for Hardware support\n" if (! -x "/usr/sbin/dmidecode");
     18
    1719mkdir $bkpdir,0755 if (! -d $bkpdir) ;
    18 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' |") || die "You need /usr/sbin/dmidecode for mindi hardware support";
     20open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die "You need /usr/sbin/dmidecode for mindi hardware support";
    1921my $productname = <SYSTEM>;
    2022close(SYSTEM);
    2123
    22 die "No product name found for Hardware support\n" if (not defined $productname);
     24die "ERROR: No product name found for Hardware support\n" if (not defined $productname);
    2325
    2426chomp($productname);
     
    7173        }
    7274        if ($tool =~ /\.scexe$/) {
     75            print "Found $tool, that firmware will be applied at restore time on your HP Proliant\n";
    7376            print SCRIPT "$tool\n";
    7477        }
     
    8184    close(SCRIPT);
    8285} else {
    83     print "No Hardware support for $productname\n";
     86    print "WARNING: No Hardware support for $productname\n";
    8487    print "You may ask your manufacturer to contribute to the mindi project\n";
    8588}
  • branches/stable/mindi/parted2fdisk.pl

    r1842 r1903  
    277277if ($args =~ /^-/) {
    278278    # -l or -s
    279     open (FDISK, "$fdisk $fargs |") || die "Unable to read from $fdisk";
     279    open (FDISK, "$fdisk $fargs 2>/dev/null |") || die "Unable to read from $fdisk";
    280280    while (<FDISK>) {
    281281        print;
     
    284284} else {
    285285    # Modification mode
    286     open (FDISK, "| $fdisk $fargs") || die "Unable to modify through $fdisk";
     286    open (FDISK, "| $fdisk $fargs 2>/dev/null") || die "Unable to modify through $fdisk";
    287287    while (<STDIN>) {
    288288        print FDISK;
     
    444444my $foo;
    445445
    446 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";
     446open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk";
    447447while (<FDISK>) {
    448448    if ($_ =~ /heads/) {
     
    468468my $foo;
    469469
    470 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";
     470open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk";
    471471while (<FDISK>) {
    472472    print if (($_ !~ /^\/dev\//) and (not (defined $wpart)) and ($verbose == 1));
     
    606606my $type = "";
    607607
    608 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";
     608open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk";
    609609while (<FDISK>) {
    610610    if ($_ =~ /EFI GPT/) {
  • branches/stable/mindi/rootfs/README

    r1581 r1903  
    66which may be found at <http://www.mondorescue.org>.
    77
    8 This CD (or image) contains the tools required to do
     8This media image contains the tools required to do
    99basic system maintenance, e.g. formatting, moving files, mounting partitions.
    1010
  • branches/stable/mindi/rootfs/sbin/find-and-mount-cdrom

    r1842 r1903  
    2525        fi
    2626        if [ "$res" -ne "0" ] ; then
    27             res=`cat /tmp/mount.log`
    28             if [ "$res" = "mount: No medium found" ] ; then
    29                [ ! "$SECOND_TRY" ] && LogIt "There is a CD-ROM drive at $device but no CD in it."
    30             else
    31                [ ! "$SECOND_TRY" ] && LogIt "It's not in $device; I'll keep looking"
    32             fi
    33             continue
    34     fi
    35     LogIt "$device has a CD-ROM in it"
    36     umount /mnt/cdrom
    37     ln -sf $device /dev/cdrom
    38     if [ "$?" -ne "0" ]; then
    39         LogIt "Unable to softlink $device to /dev/cdrom. That's weird."
    40         continue
    41     fi
     27            res=`cat /tmp/mount.log`
     28            if [ "$res" = "mount: No medium found" ] ; then
     29                [ ! "$SECOND_TRY" ] && LogIt "There is a CD-ROM drive at $device but no CD in it."
     30            else
     31                [ ! "$SECOND_TRY" ] && LogIt "It's not in $device; I'll keep looking"
     32            fi
     33            continue
     34        fi
     35        LogIt "$device has a CD-ROM in it"
     36        umount /mnt/cdrom
     37        ln -sf $device /dev/cdrom
     38        if [ "$?" -ne "0" ]; then
     39            LogIt "Unable to softlink $device to /dev/cdrom. That's weird."
     40            continue
     41        fi
    4242        LogIt "CD-ROM found at $device"
    43         mount /mnt/cdrom
     43        mount $device -t iso9660 -o ro /mnt/cdrom 2> /tmp/mount.log
    4444        if [ "$?" -ne "0" ] ; then
    45             LogIt "Cannot mount /dev/cdrom (type $format) (dev=$device)"
     45            LogIt "Cannot mount /dev/cdrom (type iso9660) (dev=$device)"
    4646            continue
    4747        elif [ ! -d "/mnt/cdrom/archives" ] ; then
     
    5151            LogIt "$device is where the Mondo CD lives."
    5252            which hdparm > /dev/null 2> /dev/null && hdparm -u1 -c3 -d1 $device
    53         return 0
    54     fi
     53            return 0
     54        fi
    5555    done
    5656    LogIt "Failed to find CD-ROM"
     
    8080    exit 0
    8181fi
     82
     83LogIt "Unable to find and mount your CD-ROM" 1
     84LogIt "You probably miss the correct driver to support your CD-ROM drive" 1
     85exit 2
  • branches/stable/mindi/rootfs/sbin/init

    r1842 r1903  
    124124        LogIt "$tapedev failed to act as extended data disk for booting." 1
    125125        LogIt "Please specify an alternate tape device," 1
    126         LogIt "or hit <Enter> to boot from CD/floppies." 1
     126        LogIt "or hit <Enter> to boot from another media." 1
    127127        echo -en "---> "
    128128        read tapedev
     
    140140    if [ "$res" -ne "0" ] ; then
    141141        cd /
    142         LogIt "Failed to use tape as extended datadisk. Reverting to cd." 1
     142        LogIt "Failed to use tape as extended datadisk. Reverting to another media." 1
    143143        HandleCDROM
    144144        res=$?
     
    155155
    156156
    157 HHandleCDROM() {
     157HandleCDROM() {
    158158    # Just in case we have an iLO ensure we will map it correctly
    159159    echo "$DENY_MODS" | grep -q "usb-storage "
     
    186186        LogIt "OK, I am running on a CD-ROM. Good." 3
    187187        CD_MOUNTED_OK=yes
    188     elif [ "$res" -eq "1" ] ; then
    189         LogIt "OK, I am running on floppies. Good." 3
    190         CD_MOUNTED_OK=""
    191     else
    192         LogIt "OK, I am falling back to floppy mode." 3
    193         LogIt "(You may not have the right drivers" 3
    194         LogIt "to support the hardware on which we are running)" 3
    195         LogIt "That means you'll have to copy the data disk images from" 3
    196         LogIt "the CD/hard disk/whatever to physical 1.44MB disks and" 3
    197         LogIt "insert them, one after the other. Please see the manual." 3
    198         LogIt "The images are in /images on the CD, or /root/images/mindi" 3
    199         LogIt "on your hard disk. Your archives are probably fine but" 3
    200         LogIt "your tape streamer and/or CD-ROM drive are eccentric. :-)" 3
     188    else
     189        LogIt "You probably not have the right drivers" 3
     190        LogIt "to support the hardware on which we are running" 3
     191        LogIt "Your archives are probably fine but" 3
     192        LogIt "your tape streamer and/or CD-ROM drive are unsupported at that point." 3
    201193        CD_MOUNTED_OK=""
    202194    fi
     
    316308    # Depending on udevd version it gives back the hand or not :-(
    317309    /sbin/udevd --daemon &
    318     sleep 2
     310    sleep 5
    319311    mkdir -p /dev/.udev/queue/
    320312    if [ -x /sbin/udevtrigger ]; then
     
    619611mount -o remount rw /
    620612[ ! "$GROOVY" ] && Die "I'm not groovy!"
    621 for i in $GROOVY /mnt/floppy /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do
     613for i in $GROOVY /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do
    622614    mkdir -p $i
    623615done
     
    781773else
    782774    LogIt "backup-media-type is not specified in config file."
    783     LogIt "I think this CD/floppy has no archives on it."
     775    LogIt "I think this media has no archives on it."
    784776fi
    785777if grep "RESTORE" /proc/cmdline > /dev/null 2> /dev/null ; then
  • branches/stable/mindi/rootfs/sbin/untar

    r1770 r1903  
    1414# ---------------------- main ----------------------
    1515
    16 mountpoint=/mnt/floppy
     16mountpoint=/dev/null
    1717[ -e "/tmp/CDROM-LIVES-HERE" ] && mountpoint=/mnt/cdrom/images
    1818[ "$#" -eq "2" ] || Die "untar <tarball> <untar_to>"
     
    2222if [ -e "/tmp/CDROM-LIVES-HERE" ] ; then
    2323    [ -e "$tarball" ] || LogIt "Can't find CD's $tarball" 1
    24 else
    25     while [ ! -f "$tarball" ] ; do
    26         echo -e -n "Please insert data (floppy) disk #$diskno and press ENTER."
    27         read line
    28         mount /dev/fd0 -t ext2 -o ro $mountpoint
    29         [ -f "$tarball" ] || umount $mountpoint ; # unmount if tarball not on disk
    30         echo -en "Working..."
    31     done
    3224fi
    3325
  • branches/stable/mondo-doc/mindi.8

    r1693 r1903  
    3939.PP
    4040.B mindi
    41 creates a set of bootable ISO/USB images using
    42 files from the system it runs on.
     41creates a bootable ISO/USB image using files from the system it runs on.
    4342.B mindi
    4443will try hard to reproduce the environment of its host system including loaded
     
    4847is used by
    4948.B monodarchive(8)
    50 to produce the required boot/root USB/ISO images but can also be used
    51 stand-alone.
     49to produce the required USB/ISO images but can also be used stand-alone.
    5250
    5351For stand-alone usage,
     
    160158.I /var/cache/mindi/mindi-boot.F.img
    161159.B mindi
    162 boot image of size F [KB].
     160boot media of size F [KB].
    163161.TP
    164162.I /var/cache/mindi/mindi-root.F.img
    165163.B mindi
    166 root image of size F [KB].
     164root media of size F [KB].
    167165.TP
    168166.I /var/cache/mindi/mindi-data.N.img
    169167.B mindi
    170 data image number N for boot/root images.
     168data media number N for boot/root media.
    171169.TP
    172170.I /var/cache/mindi/mindi.iso
  • branches/stable/mondo-doc/mondoarchive.8

    r1770 r1903  
    6969To restore data, either run
    7070.I mondorestore
    71 from the command line or boot from the emergency CD generated during
     71from the command line or boot from the emergency media generated during
    7272the backup process. The latter will come in handy if a gremlin wipes your hard
    7373disk.
     
    212212.TP
    213213.BI "-o "
    214 Use LILO as boot loader of boot CD instead of SYSLINUX/ISOLINUX. By
    215 default, ISOLINUX is used for CD's. Use LILO if you
     214Use LILO as boot loader of boot media instead of SYSLINUX/ISOLINUX. By
     215default, SYSLINUX is used for USB and ISOLINUX for CD's. Use LILO if you
    216216prefer to use that boot loader. NB: This does not affect which boot loader you
    217 use to boot your PC, merely the boot loader used by the CD's created
     217use to boot your PC, merely the boot loader used by the media created
    218218by Mondo. Use ELILO instead which is mandatory for IA64 machines.
    219219
  • branches/stable/mondo-doc/mondorescue-howto.sgml

    r1693 r1903  
    3131other supported filesystem partitions to/from CD/DVD-+R/RW media, tape,
    3232NFS, ... and Mindi Linux provides the bootable emergency restore
    33 CD set which Mondo uses at boot-time.
     33media which Mondo uses at boot-time.
    3434</para>
    3535</abstract>
     
    445445</entry>
    446446</row>
    447 <row>
    448 <entry>
    449 <ulink url="images/10cd.png"><inlinemediaobject><imageobject>
    450 <imagedata fileref="images/10cd-mini">
    451 </imageobject></inlinemediaobject>
    452 </ulink>
    453 </entry>
    454 <entry>
    455 Do you want to create a boot image at the end? Yes, if you're a
    456 tape or NFS user. No, if you are using CD/DVD-R[W]'s and your computer
    457 supports bootable CD's or using PXE.
    458 </entry>
    459 </row>
    460447</tbody></tgroup></informaltable>
    461448
    462449<itemizedlist>
    463450<listitem>
    464 <para>Try to boot from the first CD of the backup. Choose 'Compare Mode' by typing
    465 compare at the boot screen.</para>
     451<para>Try to boot from the first media of the backup.
     452Choose 'Compare Mode' by typing compare at the boot screen.
     453</para>
    466454</listitem>
    467455<listitem>
     
    469457checkout the compatibility of your system. (see
    470458<link linkend="test-mindi">Testing Mindi</link> for more
    471 details). Remove the CD; boot your computer as usual;
     459details). Remove the media; boot your computer as usual;
    472460execute as root</para>
    473461<para></para>
     
    492480<row>
    493481<entry>
    494 
    495482bash# cdrecord dev=0,0,0 speed=4 -eject -v mindi.iso
    496 
     483</entry>
     484</row>
     485<row>
     486<entry>
     487bash# wodim dev=0,0,0 speed=4 -eject -v mindi.iso
    497488</entry>
    498489</row>
     
    504495<row>
    505496<entry>
    506 
    507497bash# cdrecord dev=0,0,0 speed=4 blank=fast -eject -v mindi.iso
    508 
     498</entry>
     499</row>
     500<row>
     501<entry>
     502bash# wodim dev=0,0,0 speed=4 blank=fast -eject -v mindi.iso
    509503</entry>
    510504</row>
     
    580574<entry>
    581575        bash# cdrecord dev=0,0,0 speed=4 -eject -v /var/cache/mindi/mindi.iso
    582 
    583576</entry>
    584577</row>
     
    608601If you find this to be the case for your computer, please use '-L'
    609602to force Mondo to use LILO instead of Syslinux as the boot loader
    610 for its CD. (NB: This has nothing to do with which boot
     603for its media. (NB: This has nothing to do with which boot
    611604loader your hard drive uses.) Also, it is a good habit to specify
    612605your tape streamer with '-d &lt;device&gt;'. You don't usually need
     
    687680<title>Mindi</title>
    688681<para>
    689 Mindi Linux creates a set of boot/root images
     682Mindi Linux creates a set of boot/root media images
    690683that will let you perform basic system maintenance on your Linux
    691684distro. The principal virtues of Mindi's boot disks are the fact
     
    758751command-line options.</para>
    759752</listitem>
    760 <listitem><para>Insert the CD when prompted.
     753<listitem><para>Insert the media when prompted.
    761754                Press &lt;Enter&gt;. Wait a moment.</para></listitem>
    762755<listitem><para>Select a subset of files to restore, e.g. /usr/local/man
     
    770763<itemizedlist>
    771764<listitem>
    772 <para>Boot from CD.</para>
     765<para>Boot from media.</para>
    773766</listitem>
    774767<listitem><para>Select 'Interactive Mode' at boot-time. (Type
     
    918911also</para>
    919912<para>vfat support in the active kernel - mindi needs this when creating
    920 syslinux boot images</para>
     913syslinux boot media</para>
    921914</listitem>
    922915</itemizedlist>
     
    12221215Do you want to use your own kernel to build the boot disk (y/n) ?y
    12231216Would you like to use LILO (instead of syslinux)
    1224 for your boot CD (y/n) ?n
     1217for your boot media (y/n) ?n
    12251218Analyzing dependency requirements                               Done.
    12261219Making complete dependency list                                 Done.
     
    12691262The easiest way to test Mindi is to say
    12701263'y' to the last question, then use the
    1271 separate application cdrecord to make a bootable CD-R or
     1264separate application cdrecord or wodim to make a bootable CD-R or
    12721265CD-RW.</para>
    1273 <para>Use the cdrecord application to write the CD image:</para>
    1274 <para></para>
    1275 <informaltable><tgroup cols="1"><tbody>
    1276 <row>
    1277 <entry>
    1278 
     1266<para>Use the cdrecord or wodim application to write the CD image:</para>
     1267<para></para>
     1268<informaltable><tgroup cols="1"><tbody>
     1269<row>
     1270<entry>
    12791271        bash# cd /var/cache/mindi
    12801272</entry>
     
    12831275        <entry>
    12841276        bash# cdrecord -scanbus
    1285 
    1286 </entry>
    1287 </row>
    1288 </tbody></tgroup></informaltable>
    1289 
    1290 <para>The output of the above call to cdrecord will tell you your
     1277</entry>
     1278</row>
     1279<row>
     1280        <entry>
     1281        bash# wodim --devices
     1282</entry>
     1283</row>
     1284</tbody></tgroup></informaltable>
     1285
     1286<para>The output of the above call will tell you your
    12911287CD writer's node. It is usually '0,0,0'. Choose one of the
    12921288following calls to write the CD, depending on whether the disk in
     
    12991295<row>
    13001296<entry>
    1301 
    13021297bash# cdrecord -v blank=fast dev=x,x,x speed=4 mindi.iso (for CD-RW)
    1303 
     1298</entry>
     1299</row>
     1300<row>
     1301<entry>
     1302        bash# wodim -v blank=fast dev=/dev/xxx speed=4 mindi.iso (for CD-RW)
    13041303</entry>
    13051304</row>
     
    13111310<row>
    13121311<entry>
    1313 
    13141312bash# cdrecord -v dev=x,x,x speed=4 mindi.iso (for CD-R)
    1315 
     1313</entry>
     1314</row>
     1315<row>
     1316<entry>
     1317        bash# wodim -v dev=/dev/xxx speed=4 mindi.iso (for CD-R)
    13161318</entry>
    13171319</row>
     
    13691371</tbody></tgroup></informaltable>
    13701372
    1371 <para>cdrecord will tell you where your CD recorder lives, in SCSI
     1373<para>cdrecord or wodim will tell you where your CD recorder lives, in SCSI
    13721374terms, which looks like '0,0,0'. The previous call to mondoarchive tells
    13731375Mondo to backup everything to a 4x CD-RW drive that has
     
    15131515isn't a good idea unless you're a Mondo expert because they'll try
    15141516to restore over a network by default, which is silly because the
    1515 archives are on the CD's). Or, you can boot from the Mindi
    1516 mondorescue.iso and hit ENTER a few times to restore.</para>
     1517archives are on the CD's). Or, you can boot from the Mindi media
     1518(or mondorescue.iso) and hit ENTER a few times to restore.</para>
    15171519<para>Those ISO images can also be used for a PXE restore. For this
    15181520        to work, please refer to the file README.pxe provided with
     
    18911893<para>If you find that you cannot make your PC boot from the CD,
    18921894it's mostly because not all the required drivers to support the CD are included.
    1893 </para>
     1895take heart: the first backup media of each set contains disk
     1896images to give you the same functionality as this media (minus the
     1897archives, of course) on other boot media. Remember, your Mondo CD is a
     1898fully functional CD-based mini-distribution as well as a recovery
     1899CD.</para>
    18941900<para>You can choose from the following modes:</para>
    18951901
     
    23342340<para>It is now possible to restore to a live filesystem using
    23352341Mondo. In other words, you do not have to boot your PC from your
    2336 CD in order to restore files. Mondo was originally designed
     2342media in order to restore files. Mondo was originally designed
    23372343for disaster recovery - situations in which you cannot boot your
    23382344PC. If you can boot your PC, it is not really a disaster, is it? :)
     
    23632369Choose your type of backup media. The live restoration process is
    23642370very similar to what you'll experience if you type mondorestore
    2365 with no parameters after booting from a Mondo CD.
     2371with no parameters after booting from a Mondo media.
    23662372</entry>
    23672373</row>
     
    27402746</qandaentry>
    27412747<qandaentry>
    2742 <question><para>Q: But why won't Mondo boot from my CD?
     2748<question><para>Q: Why won't Mondo boot from my CD?
    27432749It says my kernel is flawed/outdated/ whatever, and when I wrote to
    27442750the ML, they told me the same thing... but I still don't get it. I
     
    27592765<para>A: On the tape. :-) The first 32MB of the tape will be set
    27602766aside for a large tarball containing the data disks, a list of all
     2767<<<<<<< .courant
    27612768files backed up, and other sundries.
    27622769</para>
     
    29462953    </entry>
    29472954</row>
    2948 </tbody></tgroup></informaltable>
    2949 <para>or for ATAPI type of devices:</para>
     2955<row>
     2956    <entry>
     2957        bash# wodim --devices
     2958    </entry>
     2959</row>
     2960</tbody></tgroup></informaltable>
     2961<para>or for ATAPI type of devices on older kernel versions:</para>
    29502962<para></para>
    29512963<informaltable><tgroup cols="1"><tbody>
     
    31783190<qandaentry>
    31793191<question><para id="SEGF">Q: When I restore after
    3180 booting from the CD, I sometimes get errors like, "Running
     3192booting from the media, I sometimes get errors like, "Running
    31813193out of memory" or "Segmentation fault". What is going on?</para></question>
    31823194<answer><para>A: It sounds as if you are running out of disk
  • branches/stable/mondo-doc/mondorestore.8

    r1693 r1903  
    2525
    2626.SH SYNOPSIS
    27 .B mondorestore [-p prefix]
     27.B mondorestore [-p prefix][-K loglevel]
    2828: restore your PC
    2929
     
    5050.B mondorestore
    5151will use images named machine-1.iso, machine-2.iso, ...
     52
     53.TP
     54.BI "-K " "loglevel"
     55Specify the loglevel. Use 99 for full debug. Standard debug level is 4.
    5256
    5357.SH DIAGNOSTICS
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1770 r1903  
    4242#define DVDRWFORMAT 1
    4343
    44 #ifndef __FreeBSD__
    4544#ifndef _SEMUN_H
    4645#define _SEMUN_H
     
    5655};
    5756#endif
    58 #endif                          /* __FreeBSD__ */
    5957
    6058extern struct mr_ar_conf *mr_conf;
     
    615613        }
    616614#else
     615#ifdef __IA64__
     616        strcpy(bootdev, call_program_and_get_last_line_of_output
     617               ("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'"));
     618#else
    617619        strcpy(bootdev, call_program_and_get_last_line_of_output
    618620               ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'"));
     621#endif
    619622        if (strstr(bootdev, "/dev/cciss/")) {
     623#ifdef __IA64__
     624            strcpy(bootdev, call_program_and_get_last_line_of_output
     625                   ("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | cut -dp -f1"));
     626#else
    620627            strcpy(bootdev, call_program_and_get_last_line_of_output
    621628                   ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1"));
     629#endif
    622630        }
    623631        if (!bootdev[0]) {
     
    31923200    /*@ bool ******************************************************** */
    31933201    bool that_one_was_ok;
    3194     bool using_nfs;
    31953202    bool orig_vfy_flag_val;
    31963203
     
    32043211    }
    32053212
    3206     if (strlen(bkpinfo->nfs_mount) > 1) {
    3207         using_nfs = TRUE;
    3208     } else {
    3209         using_nfs = FALSE;
    3210     }
    32113213    mr_msg(1, "OK, time to make %s #%d",
    32123214            bkpinfo->backup_media_string,
  • branches/stable/mondo/src/common/libmondo-devices.c

    r1842 r1903  
    15761576    }
    15771577    if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) {
    1578         popup_and_OK(_("Please remove CD from drive"));
     1578        popup_and_OK(_("Please remove media from drive"));
    15791579    }
    15801580    mr_msg(3, "media type = %s",
     
    18041804
    18051805    case nfs:
     1806        /* Never try to eject a NFS device */
     1807        bkpinfo->please_dont_eject = TRUE;
     1808
     1809        /* Initiate bkpinfo nfs_mount path from running environment if not already done */
    18061810        if (!bkpinfo->nfs_mount[0]) {
    18071811            strcpy(bkpinfo->nfs_mount,
     
    18401844            mr_free(command);
    18411845
    1842             mr_asprintf(&comment,
     1846            if (!bkpinfo->restore_data) {
     1847                mr_asprintf(&comment,
    18431848                    _("How much data (in Megabytes) will each media store?"));
    1844             if (!popup_and_get_string(_("Size"), comment, sz_size, 5)) {
    1845                 log_to_screen(_("User has chosen not to backup the PC"));
    1846                 finish(1);
     1849                if (!popup_and_get_string(_("Size"), comment, sz_size, 5)) {
     1850                    log_to_screen(_("User has chosen not to backup the PC"));
     1851                    finish(1);
     1852                }
     1853            } else {
     1854                sz_size = 0;
    18471855            }
    18481856            mr_free(comment);
     
    18631871            }
    18641872        }
    1865         if (!is_this_device_mounted(bkpinfo->nfs_mount)) {
     1873        /* Initiate bkpinfo isodir path from running environment if mount already done */
     1874        if (is_this_device_mounted(bkpinfo->nfs_mount)) {
     1875            strcpy(bkpinfo->isodir,
     1876                   call_program_and_get_last_line_of_output
     1877                   ("mount | grep \":\" | cut -d' ' -f3 | head -n1"));
     1878        } else {
    18661879            sprintf(bkpinfo->isodir, "%s/nfsdir", bkpinfo->tmpdir);
    18671880            mr_asprintf(&command, "mkdir -p %s", bkpinfo->isodir);
  • branches/stable/mondo/src/common/libmondo-filelist.c

    r1817 r1903  
    15271527    time_t time_of_last_full_backup = 0;
    15281528    struct stat statbuf;
     1529    char *tmp1 = NULL;
     1530    char *tmp2 = NULL;
    15291531
    15301532    malloc_string(sz_datefile);
     
    15861588        mr_msg(2, "include_paths = '%s'", include_paths);
    15871589        mr_msg(1, "Calculating filelist");
    1588         mr_asprintf(&exclude_paths, " %s %s %s %s %s %s %s . .. \
    1589 " MNT_CDROM " /mnt/floppy /media \
    1590 /proc /sys /tmp /var/log/lastlog /root/images/mondo " MINDI_CACHE " " MONDO_CACHE, excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);
     1590        mr_asprintf(&tmp2, call_program_and_get_last_line_of_output("mount | grep -Ew 'ntfs|fat|vfat|dos' | awk '{print $3}'"));
     1591        if (strlen(tmp2) < 1) {
     1592            mr_asprintf(&tmp1,"");
     1593        } else {
     1594            mr_msg(2, "Found windows FS: %s",tmp2);
     1595            mr_asprintf(&tmp1, "find %s -name '/win386.swp' -o -name '/hiberfil.sys' -o -name '/pagefile.sys' 2> /dev/null\n",tmp2);
     1596            mr_free(tmp2);
     1597            mr_asprintf(&tmp2, call_program_and_get_last_line_of_output(tmp1));
     1598            mr_msg(2, "Found windows files: %s",tmp2);
     1599        }
     1600        mr_free(tmp1);
    15911601
    15921602        mr_msg(2, "Excluding paths = '%s'", exclude_paths);
     1603        mr_asprintf(&exclude_paths, " %s %s %s %s %s %s . .. \
     1604" MNT_CDROM " " MNT_FLOPPY " /media /tmp /var/log/lastlog \
     1605/proc /sys /root/images/mondo ", MINDI_CACHE, MONDO_CACHE, excp, tmp2, (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);
     1606        paranoid_free(tmp2);
     1607
    15931608        mr_msg(2,
    15941609                "Generating skeleton filelist so that we can track our progress");
  • branches/stable/mondo/src/common/libmondo-stream.c

    r1663 r1903  
    885885        return (1);
    886886    }
     887    /* Not used
    887888    mr_asprintf(&tmp, "Reading file from tape; writing to '%s'; %ld KB",
    888889             outfname, (long) size >> 10);
    889     log_to_screen(tmp);
    890     mr_free(tmp);
     890            */
    891891
    892892    if (foutstream) {
  • branches/stable/mondo/src/common/libmondo-tools.c

    r1842 r1903  
    901901
    902902    // abort if Windows partition but no ms-sys and parted
    903     if (!run_program_and_log_output
    904         ("mount | grep -w vfat | grep -vE \"/dev/fd|nexdisk\"", 0)
    905         ||
    906         !run_program_and_log_output
    907         ("mount | grep -w dos | grep -vE \"/dev/fd|nexdisk\"", 0)) {
     903    if (!run_program_and_log_output("mount | grep -Ew 'vfat|fat|dos' | grep -vE \"/dev/fd|nexdisk\"", 0)) {
    908904        log_to_screen(_("I think you have a Windows 9x partition."));
    909905        retval += whine_if_not_found("parted");
    910 #ifndef __IA64__
    911         /* IA64 always has one vfat partition for EFI even without Windows */
    912         // retval +=
    913         if (!find_home_of_exe("ms-sys")) {
    914             log_to_screen("Please install ms-sys just in case.");
    915         }
    916 #endif
    917906    }
    918907
  • branches/stable/mondo/src/common/newt-specific.c

    r1770 r1903  
    259259    kill_anything_like_this(char *str) {
    260260
    261     char *tmp = NULL;
    262 
    263     mr_asprintf(&tmp,"kill `ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"`", ps_options, str, ps_proc_id);
     261char *tmp = NULL;
     262char *tmp1 = NULL;
     263
     264    mr_asprintf(&tmp,"ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"", ps_options, str, ps_proc_id);
    264265    run_program_and_log_output(tmp, TRUE);
     266    if (strlen(tmp) > 0) {
     267        mr_asprintf(&tmp1,"kill `%s`", tmp);
     268        run_program_and_log_output(tmp1, TRUE);
     269        paranoid_free(tmp1);
     270    }
    265271    mr_free(tmp);
    266272}
  • branches/stable/mondo/src/mondoarchive/mondo-cli.c

    r1842 r1903  
    472472    if (flag_set['n']) {
    473473        bkpinfo->backup_media_type = nfs;
     474        /* Never try to eject a NFS device */
     475        bkpinfo->please_dont_eject = TRUE;
    474476    }
    475477    if (flag_set['r']) {
     
    761763                (_("Your kernel appears not to support vfat filesystems. I am therefore"));
    762764            log_to_screen
    763                 (_("using LILO instead of SYSLINUX as the CD's boot loader."));
     765                (_("using LILO instead of SYSLINUX as the media boot loader."));
    764766        }
    765767        if (run_program_and_log_output("which mkfs.vfat", 2)) {
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r1842 r1903  
    5656char *g_getfacl = NULL;
    5757
     58extern void kill_anything_like_this(char *str);
     59
    5860/**
    5961 * @addtogroup restoreUtilityGroup
     
    387389
    388390    char *command = NULL;
     391    char *tmp = NULL;
    389392    char *mountdir = NULL;
    390393    char *mountpoint = NULL;
     
    439442        mr_msg(2, "command='%s'", command);
    440443    }
     444
    441445    res = run_program_and_log_output(command, TRUE);
     446    if (res && (strstr(command, "xattr") || strstr(command, "acl"))) {
     447        mr_msg(1, "Re-trying without the fancy extra parameters");
     448        mr_asprintf(&tmp, "mount -t %s %s %s 2>> %s", format, device,
     449            mountdir, MONDO_LOGFILE);
     450        res = run_program_and_log_output(tmp, TRUE);
     451        mr_free(tmp);
     452    }
    442453    if (res) {
    443454        mr_msg(1, "Unable to mount device %s (type %s) at %s", device,
     
    449460        } else {
    450461            mr_msg(2, "Retrying w/o the '-t' switch");
    451             mr_free(command);
    452 
    453             mr_asprintf(&command, "mount %s %s 2>> %s", device, mountdir,
     462            mr_asprintf(&tmp, "mount %s %s 2>> %s", device, mountdir,
    454463                    MONDO_LOGFILE);
    455             mr_msg(2, "2nd command = '%s'", command);
    456             res = run_program_and_log_output(command, TRUE);
     464            mr_msg(2, "2nd command = '%s'", tmp);
     465            res = run_program_and_log_output(tmp, TRUE);
     466            mr_free(tmp);
    457467            if (res == 0) {
    458468                mr_msg(1,
     
    473483    }
    474484    mr_free(mountpoint);
    475 
    476485    return (res);
    477486}
     
    623632            mr_msg(1, "isodir is being set to %s", bkpinfo->isodir);
    624633        }
     634
    625635#ifdef __FreeBSD__
    626636        mr_asprintf(&mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir,
     
    687697            break;
    688698        } else {
    689             mr_msg(2, "Failed to mount CD-ROM drive.");
     699            mr_msg(2, "Failed to mount device.");
    690700            sleep(5);
    691701            run_program_and_log_output("sync", FALSE);
     
    806816        } else if (!strcmp(value, "nfs")) {
    807817            bkpinfo->backup_media_type = nfs;
     818            bkpinfo->please_dont_eject = TRUE;
    808819            if (read_cfg_var(cfg_file, "iso-prefix", value) == 0) {
    809820                mr_allocstr(bkpinfo->prefix,value);
     
    842853        fatal_error("backup-media-type not specified!");
    843854    }
     855
    844856    if (bkpinfo->disaster_recovery) {
    845857        if (bkpinfo->backup_media_type == cdstream) {
     
    12861298#endif
    12871299    char *name = NULL;
     1300    char *cmd = NULL;
    12881301
    12891302    malloc_string(device);
    12901303    malloc_string(name);
     1304
     1305    /* In order to have a working bootloader, we need to have all devices
     1306     * ready in the chroot. If they are not there (udev) then copy them from
     1307     * the current /dev location
     1308     */
     1309    asprintf(&cmd,"tar cf - /dev | ( cd %s ; tar xf - )",MNT_RESTORING);
     1310    run_program_and_log_output(cmd, 3);
     1311    paranoid_free(cmd);
     1312
    12911313    backup_crucial_file(MNT_RESTORING, "/etc/fstab");
    12921314    backup_crucial_file(MNT_RESTORING, "/etc/grub.conf");
    12931315    backup_crucial_file(MNT_RESTORING, "/etc/lilo.conf");
    12941316    backup_crucial_file(MNT_RESTORING, "/etc/elilo.conf");
     1317    backup_crucial_file(MNT_RESTORING, "/boot/grub/device.map");
     1318    backup_crucial_file(MNT_RESTORING, "/etc/mtab");
    12951319    read_cfg_var(g_mondo_cfg_file, "bootloader.device", device);
    12961320    read_cfg_var(g_mondo_cfg_file, "bootloader.name", name);
     
    13121336        mr_free(tmp);
    13131337    } else {
    1314         mr_asprintf(&tmp, "ls /dev | grep -Eq '^%ss[1-4].*$'", device);
     1338        mr_asprintf(&tmp, "ls /dev | grep -Eq '^%ss[1-4].*'", device);
    13151339        if (!system(tmp)) {
    13161340            mr_free(tmp);
     
    15341558                    newtSuspend();
    15351559                }
    1536                 mr_asprintf(&tmp, "%s " MNT_RESTORING "/etc/fstab", editor);
     1560                mr_asprintf(&tmp, "chroot %s %s /etc/fstab", MNT_RESTORING, editor);
    15371561                paranoid_system(tmp);
    15381562                mr_free(tmp);
    15391563
    1540                 mr_asprintf(&tmp, "%s " MNT_RESTORING "/etc/elilo.conf", editor);
     1564                mr_asprintf(&tmp, "chroot %s %s /etc/elilo.conf", MNT_RESTORING, editor);
    15411565                paranoid_system(tmp);
    15421566                mr_free(tmp);
     
    21732197            if (!does_file_exist("tmp/mondo-restore.cfg")) {
    21742198                log_to_screen(_
    2175                               ("Cannot find config info on tape/CD"));
     2199                              ("Cannot find config info on media"));
    21762200                return (1);
    21772201            }
  • branches/stable/mondo/src/mondorestore/mondorestore.c

    r1770 r1903  
    437437    read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
    438438    iamhere("Done loading config file; resizing ML");
    439     if (bkpinfo->backup_media_type != usb) {
     439    if (bkpinfo->backup_media_type == nfs) {
    440440        mr_asprintf(&tmp,bkpinfo->prefix);
    441441        if (popup_and_get_string
     
    19941994                       _("Please wait. This may take some time."),
    19951995                       "", total_slices);
    1996     for (bigfileno = 0, finished = FALSE; !finished;) {
     1996    for (bigfileno = 0 ; bigfileno < noof_biggiefiles ;) {
    19971997        mr_msg(2, "Thinking about restoring bigfile %ld", bigfileno + 1);
    19981998        if (!does_file_exist(slice_fname(bigfileno, 0, ARCHIVES_PATH, ""))) {
     
    20042004                    g_current_media_number);
    20052005            mr_msg(3, "Slicename would have been %s",
    2006                     slice_fname(bigfileno + 1, 0, ARCHIVES_PATH, ""));
     2006                    slice_fname(bigfileno, 0, ARCHIVES_PATH, ""));
    20072007            // I'm not positive 'just_changed_cds' is even necessary...
    20082008            if (just_changed_cds) {
     
    20172017                just_changed_cds = TRUE;
    20182018            } else {
     2019                /* That big file doesn't exist, but the followings may */
     2020                /* So we need to continue looping */
    20192021                mr_msg(2, "There was no bigfile #%ld. That's OK.",
    2020                         bigfileno + 1);
     2022                    bigfileno + 1);
    20212023                mr_msg(2, "I'm going to stop restoring bigfiles now.");
    2022                 finished = TRUE;
     2024                retval++;
     2025                bigfileno++;
    20232026            }
    20242027        } else {
     
    30123015    }
    30133016
     3017    if (argc == 3 && strcmp(argv[1], "-K") == 0) {
     3018        g_loglevel = atoi(argv[2]);
     3019        log_msg(1,"Loglevel forced to %s",g_loglevel);
     3020    }
    30143021
    30153022    if (argc == 2 && strcmp(argv[1], "--live-grub") == 0) {
     
    31693176            mvaddstr_and_log_it(g_currentY++,
    31703177                                0,
    3171                                 _("Run complete. Please remove CD/media and reboot."));
     3178                                _("Run complete. Please remove media and reboot."));
    31723179        } else {
    31733180            run_program_and_log_output("sync", FALSE);
     
    32263233    unlink("/tmp/mondo-run-prog.tmp");
    32273234    set_signals(FALSE);
    3228     mr_asprintf(&tmp, "rm -Rf %s", bkpinfo->tmpdir);
    3229     run_program_and_log_output(tmp, FALSE);
    3230     mr_free(tmp);
    32313235
    32323236    log_to_screen
     
    32433247        run_program_and_log_output("mount / -o remount,rw", 2);
    32443248    }                           // for b0rken distros
     3249    mr_asprintf(&tmp, "rm -Rf %s", bkpinfo->tmpdir);
     3250    run_program_and_log_output(tmp, FALSE);
     3251    mr_free(tmp);
     3252
    32453253    paranoid_MR_finish(retval); // frees global stuff plus bkpinfo
    32463254    free_libmondo_global_strings(); // it's fine to have this here :) really :)
  • branches/stable/pbconf/mindi-busybox/ebuild/mindi-busybox.ebuild

    r1586 r1903  
    2828src_install() {
    2929    # bundle up the symlink files for use later
    30     emake PREFIX="${D}/usr/lib/mindi/rootfs" install || die
     30    emake CONFIG_PREFIX="${D}/usr/lib/mindi/rootfs" install || die
    3131}
  • branches/stable/pbconf/mindi/rpm/mindi.spec

    r1842 r1903  
    5050%defattr(-,root,root)
    5151%config(noreplace) %{_sysconfdir}/%{name}
    52 %doc ChangeLog INSTALL COPYING README TODO README.ia64 README.pxe README.busybox README.proliant README.bkphw NEWS
     52%doc ChangeLog INSTALL COPYING README TODO README.* NEWS
    5353#svn.log
    5454%{_mandir}/man8/*
  • branches/stable/pbconf/mondo-doc/du/mondo-doc.doc-base

    r1674 r1903  
    66 effortlessly backup and interactively restore Linux, Windows and other
    77 supported filesystem partitions to/from CD-R/RW media, tape, NFS, ... and
    8  Mindi Linux provides the bootable emergency restore CD/floppy set which Mondo
     8 Mindi Linux provides the bootable emergency restore media set which Mondo
    99 uses at boot-time.
    1010Section: PBGRP
  • branches/stable/pbconf/mondo/ebuild/mondo-rescue.ebuild

    r1770 r1903  
    2323    sys-devel/binutils
    2424    >=app-arch/bzip2-0.9
    25     app-cdr/cdrtools
    26     >=sys-apps/mindi-1.2.4
     25    virtual/cdrtools
     26    >=sys-apps/mindi-2.0.0
    2727    >=dev-libs/newt-0.50
    2828    >=sys-libs/slang-1.4.1
     29    sys-apps/parted
    2930    >=sys-boot/syslinux-1.52"
    3031
  • branches/stable/pbconf/mondorescue.pb

    r1886 r1903  
    1717# Packager label
    1818#
    19 pbpackager mondorescue = "Bruno Cornec <bruno@mondorescue.org>"
     19packager mondorescue = Bruno Cornec <bruno@mondorescue.org>
    2020
    2121#
     
    7979extpkgdir mindi-busybox = mindi-busybox
    8080extpkgdir mondo-doc = mondo-doc
     81# Gentoo doesn't name the package mondo as it conflicts
     82# So we create an additional fake package just for it
     83extpkgdir mondo-rescue = mondo
    8184
    8285# Hash of valid version names
  • branches/stable/tools/updateqemu

    r1693 r1903  
    1515fi
    1616
    17 export PBPROJ=pb
    18 export PBROOT=/users/bruno/pb/svn/0.8.5
     17export PBPROJ=mondorescue
     18export PBROOT=/users/bruno/mondo/svn/branches/2.2.5
    1919
    2020for m in $opt; do
     
    2525    echo "Halting $m"
    2626    echo "/sbin/halt -p" > /tmp/pbscript
    27     pb -m $m -a root -s /tmp/pbscript script2vm
     27    #pb -m $m -a root -s /tmp/pbscript script2vm
    2828    sleep 120
    29     job=`ps auhxww | grep qemu | grep -Ev 'grep|updateqemu' | awk '{print $2}'`
     29    job=`ps auhxww | grep qemu | grep $m | grep -Ev 'grep|updateqemu' | awk '{print $2}'`
    3030    if [ _"$job" != _"" ]; then
    3131        echo "Really halting $m"
    32         kill $job
     32        #kill $job
    3333    fi
    3434done
Note: See TracChangeset for help on using the changeset viewer.