Changeset 1903 in MondoRescue
- Timestamp:
- Apr 10, 2008, 1:13:58 AM (17 years ago)
- Location:
- branches/stable
- Files:
-
- 4 deleted
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/.config
r1842 r1903 2 2 # Automatically generated make config: don't edit 3 3 # Busybox version: 1.7.3-rPBREV 4 # Thu Nov 15 17:11:06 20074 # Mon Jan 14 22:59:00 2008 5 5 # 6 6 CONFIG_HAVE_DOT_CONFIG=y … … 702 702 # CONFIG_FEATURE_SH_EXTRA_QUIET is not set 703 703 # CONFIG_FEATURE_SH_STANDALONE is not set 704 # CONFIG_CTTYHACK is not set 704 CONFIG_CTTYHACK=y 705 705 706 706 # -
branches/stable/mindi/aux-tools/sbin/calc-disk-size
r911 r1903 6 6 CalcDiskSize() { 7 7 local res cylinders sectorsize disksize i curr stub out 8 res=`parted2fdisk -l $1 2> 8 res=`parted2fdisk -l $1 2>/dev/null | grep -i "cylinders of"` 9 9 cylinders=`echo "$res" | cut -d' ' -f5` 10 10 sectorsize=`echo "$res" | cut -d' ' -f7` 11 cylindermod=`parted2fdisk -l $1 2> 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 12 12 cylnum=`echo "$cylindermod" | cut -d' ' -f7` 13 13 predisksize=$(($cylinders*$sectorsize/1024)) -
branches/stable/mindi/mindi
r1886 r1903 2715 2715 fi 2716 2716 2717 for w in cdrom floppygroovy-stuff ; do2717 for w in cdrom groovy-stuff ; do 2718 2718 mkdir -p mnt/$w 2719 2719 done … … 2760 2760 done 2761 2761 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." 2763 2763 for i in $list_of_groovy_mods ; do 2764 2764 needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`" … … 2779 2779 2780 2780 # 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" 2782 2782 2783 2783 # For all modules supported, create symlinks under the mountpoint -
branches/stable/mindi/mindi-bkphw
r1842 r1903 15 15 my $confdir = "$ARGV[1]"; 16 16 17 die "You need dmidecode for Hardware support\n" if (! -x "/usr/sbin/dmidecode"); 18 17 19 mkdir $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";20 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die "You need /usr/sbin/dmidecode for mindi hardware support"; 19 21 my $productname = <SYSTEM>; 20 22 close(SYSTEM); 21 23 22 die " No product name found for Hardware support\n" if (not defined $productname);24 die "ERROR: No product name found for Hardware support\n" if (not defined $productname); 23 25 24 26 chomp($productname); … … 71 73 } 72 74 if ($tool =~ /\.scexe$/) { 75 print "Found $tool, that firmware will be applied at restore time on your HP Proliant\n"; 73 76 print SCRIPT "$tool\n"; 74 77 } … … 81 84 close(SCRIPT); 82 85 } else { 83 print " No Hardware support for $productname\n";86 print "WARNING: No Hardware support for $productname\n"; 84 87 print "You may ask your manufacturer to contribute to the mindi project\n"; 85 88 } -
branches/stable/mindi/parted2fdisk.pl
r1842 r1903 277 277 if ($args =~ /^-/) { 278 278 # -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"; 280 280 while (<FDISK>) { 281 281 print; … … 284 284 } else { 285 285 # 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"; 287 287 while (<STDIN>) { 288 288 print FDISK; … … 444 444 my $foo; 445 445 446 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";446 open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk"; 447 447 while (<FDISK>) { 448 448 if ($_ =~ /heads/) { … … 468 468 my $foo; 469 469 470 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";470 open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk"; 471 471 while (<FDISK>) { 472 472 print if (($_ !~ /^\/dev\//) and (not (defined $wpart)) and ($verbose == 1)); … … 606 606 my $type = ""; 607 607 608 open (FDISK, "$fdisk -l $device |") || die "Unable to read from $fdisk";608 open (FDISK, "$fdisk -l $device 2>/dev/null |") || die "Unable to read from $fdisk"; 609 609 while (<FDISK>) { 610 610 if ($_ =~ /EFI GPT/) { -
branches/stable/mindi/rootfs/README
r1581 r1903 6 6 which may be found at <http://www.mondorescue.org>. 7 7 8 This CD (or image)contains the tools required to do8 This media image contains the tools required to do 9 9 basic system maintenance, e.g. formatting, moving files, mounting partitions. 10 10 -
branches/stable/mindi/rootfs/sbin/find-and-mount-cdrom
r1842 r1903 25 25 fi 26 26 if [ "$res" -ne "0" ] ; then 27 28 29 30 31 32 33 34 fi35 LogIt "$device has a CD-ROM in it"36 umount /mnt/cdrom37 ln -sf $device /dev/cdrom38 if [ "$?" -ne "0" ]; then39 LogIt "Unable to softlink $device to /dev/cdrom. That's weird."40 continue41 fi27 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 42 42 LogIt "CD-ROM found at $device" 43 mount /mnt/cdrom43 mount $device -t iso9660 -o ro /mnt/cdrom 2> /tmp/mount.log 44 44 if [ "$?" -ne "0" ] ; then 45 LogIt "Cannot mount /dev/cdrom (type $format) (dev=$device)"45 LogIt "Cannot mount /dev/cdrom (type iso9660) (dev=$device)" 46 46 continue 47 47 elif [ ! -d "/mnt/cdrom/archives" ] ; then … … 51 51 LogIt "$device is where the Mondo CD lives." 52 52 which hdparm > /dev/null 2> /dev/null && hdparm -u1 -c3 -d1 $device 53 return 054 fi53 return 0 54 fi 55 55 done 56 56 LogIt "Failed to find CD-ROM" … … 80 80 exit 0 81 81 fi 82 83 LogIt "Unable to find and mount your CD-ROM" 1 84 LogIt "You probably miss the correct driver to support your CD-ROM drive" 1 85 exit 2 -
branches/stable/mindi/rootfs/sbin/init
r1842 r1903 124 124 LogIt "$tapedev failed to act as extended data disk for booting." 1 125 125 LogIt "Please specify an alternate tape device," 1 126 LogIt "or hit <Enter> to boot from CD/floppies." 1126 LogIt "or hit <Enter> to boot from another media." 1 127 127 echo -en "---> " 128 128 read tapedev … … 140 140 if [ "$res" -ne "0" ] ; then 141 141 cd / 142 LogIt "Failed to use tape as extended datadisk. Reverting to cd." 1142 LogIt "Failed to use tape as extended datadisk. Reverting to another media." 1 143 143 HandleCDROM 144 144 res=$? … … 155 155 156 156 157 H HandleCDROM() {157 HandleCDROM() { 158 158 # Just in case we have an iLO ensure we will map it correctly 159 159 echo "$DENY_MODS" | grep -q "usb-storage " … … 186 186 LogIt "OK, I am running on a CD-ROM. Good." 3 187 187 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 201 193 CD_MOUNTED_OK="" 202 194 fi … … 316 308 # Depending on udevd version it gives back the hand or not :-( 317 309 /sbin/udevd --daemon & 318 sleep 2310 sleep 5 319 311 mkdir -p /dev/.udev/queue/ 320 312 if [ -x /sbin/udevtrigger ]; then … … 619 611 mount -o remount rw / 620 612 [ ! "$GROOVY" ] && Die "I'm not groovy!" 621 for i in $GROOVY /mnt/ floppy /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do613 for i in $GROOVY /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do 622 614 mkdir -p $i 623 615 done … … 781 773 else 782 774 LogIt "backup-media-type is not specified in config file." 783 LogIt "I think this CD/floppyhas no archives on it."775 LogIt "I think this media has no archives on it." 784 776 fi 785 777 if grep "RESTORE" /proc/cmdline > /dev/null 2> /dev/null ; then -
branches/stable/mindi/rootfs/sbin/untar
r1770 r1903 14 14 # ---------------------- main ---------------------- 15 15 16 mountpoint=/ mnt/floppy16 mountpoint=/dev/null 17 17 [ -e "/tmp/CDROM-LIVES-HERE" ] && mountpoint=/mnt/cdrom/images 18 18 [ "$#" -eq "2" ] || Die "untar <tarball> <untar_to>" … … 22 22 if [ -e "/tmp/CDROM-LIVES-HERE" ] ; then 23 23 [ -e "$tarball" ] || LogIt "Can't find CD's $tarball" 1 24 else25 while [ ! -f "$tarball" ] ; do26 echo -e -n "Please insert data (floppy) disk #$diskno and press ENTER."27 read line28 mount /dev/fd0 -t ext2 -o ro $mountpoint29 [ -f "$tarball" ] || umount $mountpoint ; # unmount if tarball not on disk30 echo -en "Working..."31 done32 24 fi 33 25 -
branches/stable/mondo-doc/mindi.8
r1693 r1903 39 39 .PP 40 40 .B mindi 41 creates a set of bootable ISO/USB images using 42 files from the system it runs on. 41 creates a bootable ISO/USB image using files from the system it runs on. 43 42 .B mindi 44 43 will try hard to reproduce the environment of its host system including loaded … … 48 47 is used by 49 48 .B monodarchive(8) 50 to produce the required boot/root USB/ISO images but can also be used 51 stand-alone. 49 to produce the required USB/ISO images but can also be used stand-alone. 52 50 53 51 For stand-alone usage, … … 160 158 .I /var/cache/mindi/mindi-boot.F.img 161 159 .B mindi 162 boot imageof size F [KB].160 boot media of size F [KB]. 163 161 .TP 164 162 .I /var/cache/mindi/mindi-root.F.img 165 163 .B mindi 166 root imageof size F [KB].164 root media of size F [KB]. 167 165 .TP 168 166 .I /var/cache/mindi/mindi-data.N.img 169 167 .B mindi 170 data image number N for boot/root images.168 data media number N for boot/root media. 171 169 .TP 172 170 .I /var/cache/mindi/mindi.iso -
branches/stable/mondo-doc/mondoarchive.8
r1770 r1903 69 69 To restore data, either run 70 70 .I mondorestore 71 from the command line or boot from the emergency CDgenerated during71 from the command line or boot from the emergency media generated during 72 72 the backup process. The latter will come in handy if a gremlin wipes your hard 73 73 disk. … … 212 212 .TP 213 213 .BI "-o " 214 Use LILO as boot loader of boot CDinstead of SYSLINUX/ISOLINUX. By215 default, ISOLINUX is usedfor CD's. Use LILO if you214 Use LILO as boot loader of boot media instead of SYSLINUX/ISOLINUX. By 215 default, SYSLINUX is used for USB and ISOLINUX for CD's. Use LILO if you 216 216 prefer 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'screated217 use to boot your PC, merely the boot loader used by the media created 218 218 by Mondo. Use ELILO instead which is mandatory for IA64 machines. 219 219 -
branches/stable/mondo-doc/mondorescue-howto.sgml
r1693 r1903 31 31 other supported filesystem partitions to/from CD/DVD-+R/RW media, tape, 32 32 NFS, ... and Mindi Linux provides the bootable emergency restore 33 CD setwhich Mondo uses at boot-time.33 media which Mondo uses at boot-time. 34 34 </para> 35 35 </abstract> … … 445 445 </entry> 446 446 </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 a456 tape or NFS user. No, if you are using CD/DVD-R[W]'s and your computer457 supports bootable CD's or using PXE.458 </entry>459 </row>460 447 </tbody></tgroup></informaltable> 461 448 462 449 <itemizedlist> 463 450 <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. 452 Choose 'Compare Mode' by typing compare at the boot screen. 453 </para> 466 454 </listitem> 467 455 <listitem> … … 469 457 checkout the compatibility of your system. (see 470 458 <link linkend="test-mindi">Testing Mindi</link> for more 471 details). Remove the CD; boot your computer as usual;459 details). Remove the media; boot your computer as usual; 472 460 execute as root</para> 473 461 <para></para> … … 492 480 <row> 493 481 <entry> 494 495 482 bash# cdrecord dev=0,0,0 speed=4 -eject -v mindi.iso 496 483 </entry> 484 </row> 485 <row> 486 <entry> 487 bash# wodim dev=0,0,0 speed=4 -eject -v mindi.iso 497 488 </entry> 498 489 </row> … … 504 495 <row> 505 496 <entry> 506 507 497 bash# cdrecord dev=0,0,0 speed=4 blank=fast -eject -v mindi.iso 508 498 </entry> 499 </row> 500 <row> 501 <entry> 502 bash# wodim dev=0,0,0 speed=4 blank=fast -eject -v mindi.iso 509 503 </entry> 510 504 </row> … … 580 574 <entry> 581 575 bash# cdrecord dev=0,0,0 speed=4 -eject -v /var/cache/mindi/mindi.iso 582 583 576 </entry> 584 577 </row> … … 608 601 If you find this to be the case for your computer, please use '-L' 609 602 to force Mondo to use LILO instead of Syslinux as the boot loader 610 for its CD. (NB: This has nothing to do with which boot603 for its media. (NB: This has nothing to do with which boot 611 604 loader your hard drive uses.) Also, it is a good habit to specify 612 605 your tape streamer with '-d <device>'. You don't usually need … … 687 680 <title>Mindi</title> 688 681 <para> 689 Mindi Linux creates a set of boot/root images682 Mindi Linux creates a set of boot/root media images 690 683 that will let you perform basic system maintenance on your Linux 691 684 distro. The principal virtues of Mindi's boot disks are the fact … … 758 751 command-line options.</para> 759 752 </listitem> 760 <listitem><para>Insert the CDwhen prompted.753 <listitem><para>Insert the media when prompted. 761 754 Press <Enter>. Wait a moment.</para></listitem> 762 755 <listitem><para>Select a subset of files to restore, e.g. /usr/local/man … … 770 763 <itemizedlist> 771 764 <listitem> 772 <para>Boot from CD.</para>765 <para>Boot from media.</para> 773 766 </listitem> 774 767 <listitem><para>Select 'Interactive Mode' at boot-time. (Type … … 918 911 also</para> 919 912 <para>vfat support in the active kernel - mindi needs this when creating 920 syslinux boot images</para>913 syslinux boot media</para> 921 914 </listitem> 922 915 </itemizedlist> … … 1222 1215 Do you want to use your own kernel to build the boot disk (y/n) ?y 1223 1216 Would you like to use LILO (instead of syslinux) 1224 for your boot CD(y/n) ?n1217 for your boot media (y/n) ?n 1225 1218 Analyzing dependency requirements Done. 1226 1219 Making complete dependency list Done. … … 1269 1262 The easiest way to test Mindi is to say 1270 1263 'y' to the last question, then use the 1271 separate application cdrecord to make a bootable CD-R or1264 separate application cdrecord or wodim to make a bootable CD-R or 1272 1265 CD-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> 1279 1271 bash# cd /var/cache/mindi 1280 1272 </entry> … … 1283 1275 <entry> 1284 1276 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 1291 1287 CD writer's node. It is usually '0,0,0'. Choose one of the 1292 1288 following calls to write the CD, depending on whether the disk in … … 1299 1295 <row> 1300 1296 <entry> 1301 1302 1297 bash# 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) 1304 1303 </entry> 1305 1304 </row> … … 1311 1310 <row> 1312 1311 <entry> 1313 1314 1312 bash# 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) 1316 1318 </entry> 1317 1319 </row> … … 1369 1371 </tbody></tgroup></informaltable> 1370 1372 1371 <para>cdrecord will tell you where your CD recorder lives, in SCSI1373 <para>cdrecord or wodim will tell you where your CD recorder lives, in SCSI 1372 1374 terms, which looks like '0,0,0'. The previous call to mondoarchive tells 1373 1375 Mondo to backup everything to a 4x CD-RW drive that has … … 1513 1515 isn't a good idea unless you're a Mondo expert because they'll try 1514 1516 to 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.isoand hit ENTER a few times to restore.</para>1517 archives 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> 1517 1519 <para>Those ISO images can also be used for a PXE restore. For this 1518 1520 to work, please refer to the file README.pxe provided with … … 1891 1893 <para>If you find that you cannot make your PC boot from the CD, 1892 1894 it's mostly because not all the required drivers to support the CD are included. 1893 </para> 1895 take heart: the first backup media of each set contains disk 1896 images to give you the same functionality as this media (minus the 1897 archives, of course) on other boot media. Remember, your Mondo CD is a 1898 fully functional CD-based mini-distribution as well as a recovery 1899 CD.</para> 1894 1900 <para>You can choose from the following modes:</para> 1895 1901 … … 2334 2340 <para>It is now possible to restore to a live filesystem using 2335 2341 Mondo. In other words, you do not have to boot your PC from your 2336 CDin order to restore files. Mondo was originally designed2342 media in order to restore files. Mondo was originally designed 2337 2343 for disaster recovery - situations in which you cannot boot your 2338 2344 PC. If you can boot your PC, it is not really a disaster, is it? :) … … 2363 2369 Choose your type of backup media. The live restoration process is 2364 2370 very similar to what you'll experience if you type mondorestore 2365 with no parameters after booting from a Mondo CD.2371 with no parameters after booting from a Mondo media. 2366 2372 </entry> 2367 2373 </row> … … 2740 2746 </qandaentry> 2741 2747 <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? 2743 2749 It says my kernel is flawed/outdated/ whatever, and when I wrote to 2744 2750 the ML, they told me the same thing... but I still don't get it. I … … 2759 2765 <para>A: On the tape. :-) The first 32MB of the tape will be set 2760 2766 aside for a large tarball containing the data disks, a list of all 2767 <<<<<<< .courant 2761 2768 files backed up, and other sundries. 2762 2769 </para> … … 2946 2953 </entry> 2947 2954 </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> 2950 2962 <para></para> 2951 2963 <informaltable><tgroup cols="1"><tbody> … … 3178 3190 <qandaentry> 3179 3191 <question><para id="SEGF">Q: When I restore after 3180 booting from the CD, I sometimes get errors like, "Running3192 booting from the media, I sometimes get errors like, "Running 3181 3193 out of memory" or "Segmentation fault". What is going on?</para></question> 3182 3194 <answer><para>A: It sounds as if you are running out of disk -
branches/stable/mondo-doc/mondorestore.8
r1693 r1903 25 25 26 26 .SH SYNOPSIS 27 .B mondorestore [-p prefix] 27 .B mondorestore [-p prefix][-K loglevel] 28 28 : restore your PC 29 29 … … 50 50 .B mondorestore 51 51 will use images named machine-1.iso, machine-2.iso, ... 52 53 .TP 54 .BI "-K " "loglevel" 55 Specify the loglevel. Use 99 for full debug. Standard debug level is 4. 52 56 53 57 .SH DIAGNOSTICS -
branches/stable/mondo/src/common/libmondo-archive.c
r1770 r1903 42 42 #define DVDRWFORMAT 1 43 43 44 #ifndef __FreeBSD__45 44 #ifndef _SEMUN_H 46 45 #define _SEMUN_H … … 56 55 }; 57 56 #endif 58 #endif /* __FreeBSD__ */59 57 60 58 extern struct mr_ar_conf *mr_conf; … … 615 613 } 616 614 #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 617 619 strcpy(bootdev, call_program_and_get_last_line_of_output 618 620 ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'")); 621 #endif 619 622 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 620 627 strcpy(bootdev, call_program_and_get_last_line_of_output 621 628 ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1")); 629 #endif 622 630 } 623 631 if (!bootdev[0]) { … … 3192 3200 /*@ bool ******************************************************** */ 3193 3201 bool that_one_was_ok; 3194 bool using_nfs;3195 3202 bool orig_vfy_flag_val; 3196 3203 … … 3204 3211 } 3205 3212 3206 if (strlen(bkpinfo->nfs_mount) > 1) {3207 using_nfs = TRUE;3208 } else {3209 using_nfs = FALSE;3210 }3211 3213 mr_msg(1, "OK, time to make %s #%d", 3212 3214 bkpinfo->backup_media_string, -
branches/stable/mondo/src/common/libmondo-devices.c
r1842 r1903 1576 1576 } 1577 1577 if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) { 1578 popup_and_OK(_("Please remove CDfrom drive"));1578 popup_and_OK(_("Please remove media from drive")); 1579 1579 } 1580 1580 mr_msg(3, "media type = %s", … … 1804 1804 1805 1805 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 */ 1806 1810 if (!bkpinfo->nfs_mount[0]) { 1807 1811 strcpy(bkpinfo->nfs_mount, … … 1840 1844 mr_free(command); 1841 1845 1842 mr_asprintf(&comment, 1846 if (!bkpinfo->restore_data) { 1847 mr_asprintf(&comment, 1843 1848 _("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; 1847 1855 } 1848 1856 mr_free(comment); … … 1863 1871 } 1864 1872 } 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 { 1866 1879 sprintf(bkpinfo->isodir, "%s/nfsdir", bkpinfo->tmpdir); 1867 1880 mr_asprintf(&command, "mkdir -p %s", bkpinfo->isodir); -
branches/stable/mondo/src/common/libmondo-filelist.c
r1817 r1903 1527 1527 time_t time_of_last_full_backup = 0; 1528 1528 struct stat statbuf; 1529 char *tmp1 = NULL; 1530 char *tmp2 = NULL; 1529 1531 1530 1532 malloc_string(sz_datefile); … … 1586 1588 mr_msg(2, "include_paths = '%s'", include_paths); 1587 1589 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); 1591 1601 1592 1602 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 1593 1608 mr_msg(2, 1594 1609 "Generating skeleton filelist so that we can track our progress"); -
branches/stable/mondo/src/common/libmondo-stream.c
r1663 r1903 885 885 return (1); 886 886 } 887 /* Not used 887 888 mr_asprintf(&tmp, "Reading file from tape; writing to '%s'; %ld KB", 888 889 outfname, (long) size >> 10); 889 log_to_screen(tmp); 890 mr_free(tmp); 890 */ 891 891 892 892 if (foutstream) { -
branches/stable/mondo/src/common/libmondo-tools.c
r1842 r1903 901 901 902 902 // 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)) { 908 904 log_to_screen(_("I think you have a Windows 9x partition.")); 909 905 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 #endif917 906 } 918 907 -
branches/stable/mondo/src/common/newt-specific.c
r1770 r1903 259 259 kill_anything_like_this(char *str) { 260 260 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); 261 char *tmp = NULL; 262 char *tmp1 = NULL; 263 264 mr_asprintf(&tmp,"ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"", ps_options, str, ps_proc_id); 264 265 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 } 265 271 mr_free(tmp); 266 272 } -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r1842 r1903 472 472 if (flag_set['n']) { 473 473 bkpinfo->backup_media_type = nfs; 474 /* Never try to eject a NFS device */ 475 bkpinfo->please_dont_eject = TRUE; 474 476 } 475 477 if (flag_set['r']) { … … 761 763 (_("Your kernel appears not to support vfat filesystems. I am therefore")); 762 764 log_to_screen 763 (_("using LILO instead of SYSLINUX as the CD'sboot loader."));765 (_("using LILO instead of SYSLINUX as the media boot loader.")); 764 766 } 765 767 if (run_program_and_log_output("which mkfs.vfat", 2)) { -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1842 r1903 56 56 char *g_getfacl = NULL; 57 57 58 extern void kill_anything_like_this(char *str); 59 58 60 /** 59 61 * @addtogroup restoreUtilityGroup … … 387 389 388 390 char *command = NULL; 391 char *tmp = NULL; 389 392 char *mountdir = NULL; 390 393 char *mountpoint = NULL; … … 439 442 mr_msg(2, "command='%s'", command); 440 443 } 444 441 445 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 } 442 453 if (res) { 443 454 mr_msg(1, "Unable to mount device %s (type %s) at %s", device, … … 449 460 } else { 450 461 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, 454 463 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); 457 467 if (res == 0) { 458 468 mr_msg(1, … … 473 483 } 474 484 mr_free(mountpoint); 475 476 485 return (res); 477 486 } … … 623 632 mr_msg(1, "isodir is being set to %s", bkpinfo->isodir); 624 633 } 634 625 635 #ifdef __FreeBSD__ 626 636 mr_asprintf(&mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir, … … 687 697 break; 688 698 } else { 689 mr_msg(2, "Failed to mount CD-ROM drive.");699 mr_msg(2, "Failed to mount device."); 690 700 sleep(5); 691 701 run_program_and_log_output("sync", FALSE); … … 806 816 } else if (!strcmp(value, "nfs")) { 807 817 bkpinfo->backup_media_type = nfs; 818 bkpinfo->please_dont_eject = TRUE; 808 819 if (read_cfg_var(cfg_file, "iso-prefix", value) == 0) { 809 820 mr_allocstr(bkpinfo->prefix,value); … … 842 853 fatal_error("backup-media-type not specified!"); 843 854 } 855 844 856 if (bkpinfo->disaster_recovery) { 845 857 if (bkpinfo->backup_media_type == cdstream) { … … 1286 1298 #endif 1287 1299 char *name = NULL; 1300 char *cmd = NULL; 1288 1301 1289 1302 malloc_string(device); 1290 1303 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 1291 1313 backup_crucial_file(MNT_RESTORING, "/etc/fstab"); 1292 1314 backup_crucial_file(MNT_RESTORING, "/etc/grub.conf"); 1293 1315 backup_crucial_file(MNT_RESTORING, "/etc/lilo.conf"); 1294 1316 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"); 1295 1319 read_cfg_var(g_mondo_cfg_file, "bootloader.device", device); 1296 1320 read_cfg_var(g_mondo_cfg_file, "bootloader.name", name); … … 1312 1336 mr_free(tmp); 1313 1337 } 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); 1315 1339 if (!system(tmp)) { 1316 1340 mr_free(tmp); … … 1534 1558 newtSuspend(); 1535 1559 } 1536 mr_asprintf(&tmp, " %s " MNT_RESTORING "/etc/fstab", editor);1560 mr_asprintf(&tmp, "chroot %s %s /etc/fstab", MNT_RESTORING, editor); 1537 1561 paranoid_system(tmp); 1538 1562 mr_free(tmp); 1539 1563 1540 mr_asprintf(&tmp, " %s " MNT_RESTORING "/etc/elilo.conf", editor);1564 mr_asprintf(&tmp, "chroot %s %s /etc/elilo.conf", MNT_RESTORING, editor); 1541 1565 paranoid_system(tmp); 1542 1566 mr_free(tmp); … … 2173 2197 if (!does_file_exist("tmp/mondo-restore.cfg")) { 2174 2198 log_to_screen(_ 2175 ("Cannot find config info on tape/CD"));2199 ("Cannot find config info on media")); 2176 2200 return (1); 2177 2201 } -
branches/stable/mondo/src/mondorestore/mondorestore.c
r1770 r1903 437 437 read_cfg_file_into_bkpinfo(g_mondo_cfg_file); 438 438 iamhere("Done loading config file; resizing ML"); 439 if (bkpinfo->backup_media_type != usb) {439 if (bkpinfo->backup_media_type == nfs) { 440 440 mr_asprintf(&tmp,bkpinfo->prefix); 441 441 if (popup_and_get_string … … 1994 1994 _("Please wait. This may take some time."), 1995 1995 "", total_slices); 1996 for (bigfileno = 0 , finished = FALSE; !finished;) {1996 for (bigfileno = 0 ; bigfileno < noof_biggiefiles ;) { 1997 1997 mr_msg(2, "Thinking about restoring bigfile %ld", bigfileno + 1); 1998 1998 if (!does_file_exist(slice_fname(bigfileno, 0, ARCHIVES_PATH, ""))) { … … 2004 2004 g_current_media_number); 2005 2005 mr_msg(3, "Slicename would have been %s", 2006 slice_fname(bigfileno + 1, 0, ARCHIVES_PATH, ""));2006 slice_fname(bigfileno, 0, ARCHIVES_PATH, "")); 2007 2007 // I'm not positive 'just_changed_cds' is even necessary... 2008 2008 if (just_changed_cds) { … … 2017 2017 just_changed_cds = TRUE; 2018 2018 } else { 2019 /* That big file doesn't exist, but the followings may */ 2020 /* So we need to continue looping */ 2019 2021 mr_msg(2, "There was no bigfile #%ld. That's OK.", 2020 2022 bigfileno + 1); 2021 2023 mr_msg(2, "I'm going to stop restoring bigfiles now."); 2022 finished = TRUE; 2024 retval++; 2025 bigfileno++; 2023 2026 } 2024 2027 } else { … … 3012 3015 } 3013 3016 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 } 3014 3021 3015 3022 if (argc == 2 && strcmp(argv[1], "--live-grub") == 0) { … … 3169 3176 mvaddstr_and_log_it(g_currentY++, 3170 3177 0, 3171 _("Run complete. Please remove CD/media and reboot."));3178 _("Run complete. Please remove media and reboot.")); 3172 3179 } else { 3173 3180 run_program_and_log_output("sync", FALSE); … … 3226 3233 unlink("/tmp/mondo-run-prog.tmp"); 3227 3234 set_signals(FALSE); 3228 mr_asprintf(&tmp, "rm -Rf %s", bkpinfo->tmpdir);3229 run_program_and_log_output(tmp, FALSE);3230 mr_free(tmp);3231 3235 3232 3236 log_to_screen … … 3243 3247 run_program_and_log_output("mount / -o remount,rw", 2); 3244 3248 } // 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 3245 3253 paranoid_MR_finish(retval); // frees global stuff plus bkpinfo 3246 3254 free_libmondo_global_strings(); // it's fine to have this here :) really :) -
branches/stable/pbconf/mindi-busybox/ebuild/mindi-busybox.ebuild
r1586 r1903 28 28 src_install() { 29 29 # bundle up the symlink files for use later 30 emake PREFIX="${D}/usr/lib/mindi/rootfs" install || die30 emake CONFIG_PREFIX="${D}/usr/lib/mindi/rootfs" install || die 31 31 } -
branches/stable/pbconf/mindi/rpm/mindi.spec
r1842 r1903 50 50 %defattr(-,root,root) 51 51 %config(noreplace) %{_sysconfdir}/%{name} 52 %doc ChangeLog INSTALL COPYING README TODO README. ia64 README.pxe README.busybox README.proliant README.bkphwNEWS52 %doc ChangeLog INSTALL COPYING README TODO README.* NEWS 53 53 #svn.log 54 54 %{_mandir}/man8/* -
branches/stable/pbconf/mondo-doc/du/mondo-doc.doc-base
r1674 r1903 6 6 effortlessly backup and interactively restore Linux, Windows and other 7 7 supported filesystem partitions to/from CD-R/RW media, tape, NFS, ... and 8 Mindi Linux provides the bootable emergency restore CD/floppyset which Mondo8 Mindi Linux provides the bootable emergency restore media set which Mondo 9 9 uses at boot-time. 10 10 Section: PBGRP -
branches/stable/pbconf/mondo/ebuild/mondo-rescue.ebuild
r1770 r1903 23 23 sys-devel/binutils 24 24 >=app-arch/bzip2-0.9 25 app-cdr/cdrtools26 >=sys-apps/mindi- 1.2.425 virtual/cdrtools 26 >=sys-apps/mindi-2.0.0 27 27 >=dev-libs/newt-0.50 28 28 >=sys-libs/slang-1.4.1 29 sys-apps/parted 29 30 >=sys-boot/syslinux-1.52" 30 31 -
branches/stable/pbconf/mondorescue.pb
r1886 r1903 17 17 # Packager label 18 18 # 19 p bpackager mondorescue = "Bruno Cornec <bruno@mondorescue.org>"19 packager mondorescue = Bruno Cornec <bruno@mondorescue.org> 20 20 21 21 # … … 79 79 extpkgdir mindi-busybox = mindi-busybox 80 80 extpkgdir 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 83 extpkgdir mondo-rescue = mondo 81 84 82 85 # Hash of valid version names -
branches/stable/tools/updateqemu
r1693 r1903 15 15 fi 16 16 17 export PBPROJ= pb18 export PBROOT=/users/bruno/ pb/svn/0.8.517 export PBPROJ=mondorescue 18 export PBROOT=/users/bruno/mondo/svn/branches/2.2.5 19 19 20 20 for m in $opt; do … … 25 25 echo "Halting $m" 26 26 echo "/sbin/halt -p" > /tmp/pbscript 27 pb -m $m -a root -s /tmp/pbscript script2vm27 #pb -m $m -a root -s /tmp/pbscript script2vm 28 28 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}'` 30 30 if [ _"$job" != _"" ]; then 31 31 echo "Really halting $m" 32 kill $job32 #kill $job 33 33 fi 34 34 done
Note:
See TracChangeset
for help on using the changeset viewer.