Changeset 1581 in MondoRescue for branches/stable/mondo
- Timestamp:
- Jul 27, 2007, 2:11:55 AM (18 years ago)
- Location:
- branches/stable/mondo
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/distributions/debian/README.Debian
r1051 r1581 7 7 This is not the official Debian package of mondo but the upstream 8 8 version. Please to not report errors to the Debian Bug Tracking 9 System but to <the mailing list>. Th nak you.9 System but to <the mailing list>. Thank you. 10 10 11 11 IMPORTANT +++ IMPORTANT +++ IMPORTANT +++ IMPORTANT +++ IMPORTANT … … 108 108 109 109 110 Using floppy disks as rescue media111 ----------------------------------112 113 mondoarchive will offer to write a set of rescue floppies (unless the '-F'114 switch is used). These floppy disks will only work with the FAILSAFE kernel. The115 reason is that stock Debian kernels don't have the floppy driver built into the116 kernel and that the kernel is too large for one floppy with an initrd and a117 kernel image. Because of the space issue, mondoarchiv (or rather mindi) creates118 a root/boot floppy set. Because the stock kernel does not have floppy support119 compiled in a kernel panic results when trying to acces the second (the root)120 floppy.121 122 Also, building the boot/root floppy images requires that lilo is installed on123 the system. This does not mean that it actually needs to be used to boot the124 system, only that the package is installed. (Because most people won't need the125 boot/root floppies, the mindi package only suggests the lilo package.)126 127 Finally a word of caution: Floppy disks are notoriously unreliable. Dont't use128 them unless you really really have to. (A CD writer costs the same as a few129 boxes of floppy disks these days.)130 131 132 110 -- Andree Leidenfrost <aleidenf@bigpond.net.au> Sun, 8 Jan 2005 15:20:05 +1100 -
branches/stable/mondo/po/fr.po
r1558 r1581 1148 1148 1149 1149 #: ../src/mondorestore/mondo-rstr-tools.c:2223 1150 msgid "Cannot find config info on tape/CD /floppy"1150 msgid "Cannot find config info on tape/CD" 1151 1151 msgstr "Impossible de trouver des infos de configuration sur CD/tape..." 1152 1152 … … 1286 1286 msgid "" 1287 1287 "Partition and format your disk using Compaq's disaster recovery CD. After " 1288 "you've done that, please reboot with your Mondo CD /floppyin Interactive "1288 "you've done that, please reboot with your Mondo CD in Interactive " 1289 1289 "Mode." 1290 1290 msgstr "" … … 1523 1523 1524 1524 #: ../src/mondorestore/mondorestore.c:887 1525 msgid "Please insert tape/CD /boot floppy, then hit 'OK' to continue."1526 msgstr "Insérez le CD/bande /disquettepuis appuyez sur 'OK'"1525 msgid "Please insert tape/CD, then hit 'OK' to continue." 1526 msgstr "Insérez le CD/bande puis appuyez sur 'OK'" 1527 1527 1528 1528 #: ../src/mondorestore/mondorestore.c:900 … … 1707 1707 1708 1708 #: ../src/mondorestore/mondorestore.c:3160 1709 msgid "Run complete. Please remove floppy/CD/media and reboot."1710 msgstr "Terminé. Enlevez le /a disauette/CD/media et rebootez."1709 msgid "Run complete. Please remove CD/media and reboot." 1710 msgstr "Terminé. Enlevez le CD/media et rebootez." 1711 1711 1712 1712 #: ../src/mondorestore/mondorestore.c:3175 … … 1968 1968 1969 1969 #: ../src/common/libmondo-devices.c:1457 1970 msgid "Please remove CD /floppy from drive(s)"1971 msgstr "Veuillez enlevez le CD ou la disquettedu lecteur"1970 msgid "Please remove CD from drive" 1971 msgstr "Veuillez enlevez le CD du lecteur" 1972 1972 1973 1973 #: ../src/common/libmondo-devices.c:1480 … … 2677 2677 2678 2678 #: ../src/mondoarchive/mondo-cli.c:842 2679 msgid "using LILO instead of SYSLINUX as the CD /floppy'sboot loader."2680 msgstr "LILO au lieu de SYSLINUX comme chargeur d'amorçage pour votre CD /Floppy"2679 msgid "using LILO instead of SYSLINUX as the CD boot loader." 2680 msgstr "LILO au lieu de SYSLINUX comme chargeur d'amorçage pour votre CD" 2681 2681 2682 2682 #: ../src/mondoarchive/mondo-cli.c:848 -
branches/stable/mondo/src/common/libmondo-archive.c
r1572 r1581 44 44 extern struct mr_ar_conf *mr_conf; 45 45 46 47 48 /** @def DEFAULT_1722MB_DISK The default 1.722M floppy disk to write images to. */ 49 /** @def BACKUP_1722MB_DISK The 1.722M floppy disk to try if the default fails. */ 50 51 #ifdef __FreeBSD__ 52 #define DEFAULT_1722MB_DISK "/dev/fd0.1722" 53 #define BACKUP_1722MB_DISK "/dev/fd0.1722" 54 #else 55 #define DEFAULT_1722MB_DISK "/dev/fd0u1722" 56 #define BACKUP_1722MB_DISK "/dev/fd0H1722" 46 #ifndef __FreeBSD__ 57 47 #ifndef _SEMUN_H 58 48 #define _SEMUN_H … … 67 57 struct seminfo *__buf; 68 58 }; 69 #endif70 59 #endif /* __FreeBSD__ */ 71 60 … … 793 782 res++; 794 783 log_OS_error("Unable to make images directory"); 795 }796 mr_free(command);797 798 mr_asprintf(&command, "mkdir -p %s%s", bkpinfo->scratchdir, MNT_FLOPPY);799 if (system(command)) {800 res++;801 log_OS_error("Unable to make mnt floppy directory");802 784 } 803 785 mr_free(command); … … 1307 1289 } 1308 1290 return (retval); 1309 }1310 1311 1312 /**1313 * Calls floppy-formatting @c cmd and tracks its progress if possible.1314 *1315 * @param cmd The command to run (e.g. @c fdformat @c /dev/fd0).1316 * @param title The human-friendly description of the floppy you are writing.1317 * This will be used as the title in the progress bar window. Example:1318 * "Formatting disk /dev/fd0".1319 * @see format_disk1320 * @return The exit code of fdformat/superformat.1321 */1322 int format_disk_SUB(char *cmd, char *title)1323 {1324 1325 /*@ int *************************************************************** */1326 int res = 0;1327 int percentage = 0;1328 int maxtracks = 0;1329 int trackno = 0;1330 int last_trkno = 0;1331 1332 /*@ buffers *********************************************************** */1333 char *command = NULL;1334 char *tempfile;1335 1336 /*@ pointers ********************************************************** */1337 FILE *pin;1338 1339 assert_string_is_neither_NULL_nor_zerolength(cmd);1340 assert_string_is_neither_NULL_nor_zerolength(title);1341 1342 malloc_string(tempfile);1343 #ifdef __FreeBSD__1344 /* Ugh. FreeBSD fdformat prints out this pretty progress indicator that's1345 impossible to parse. It looks like1346 VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVF-------------------1347 where V means verified, E means error, F means formatted, and - means1348 not done yet.1349 */1350 return (run_program_and_log_to_screen(cmd, title));1351 #endif1352 1353 /* if Debian then do bog-standard superformat; don't be pretty */1354 if (strstr(cmd, "superformat")) {1355 return (run_program_and_log_to_screen(cmd, title));1356 }1357 /* if not Debian then go ahead & use fdformat */1358 strcpy(tempfile,1359 call_program_and_get_last_line_of_output1360 ("mktemp -q /tmp/mondo.XXXXXXXX"));1361 mr_asprintf(&command, "%s >> %s 2>> %s; rm -f %s", cmd, tempfile, tempfile, tempfile);1362 mr_msg(3, command);1363 open_evalcall_form(title);1364 if (!(pin = popen(command, "r"))) {1365 log_OS_error("fmt err");1366 return (1);1367 }1368 if (strstr(command, "1722")) {1369 maxtracks = 82;1370 } else {1371 maxtracks = 80;1372 }1373 mr_free(command);1374 1375 for (sleep(1); does_file_exist(tempfile); sleep(1)) {1376 trackno = get_trackno_from_logfile(tempfile);1377 if (trackno < 0 || trackno > 80) {1378 mr_msg(1, "Weird track#");1379 continue;1380 }1381 percentage = trackno * 100 / maxtracks;1382 if (trackno <= 5 && last_trkno > 40) {1383 close_evalcall_form();1384 strcpy(title, "Verifying format");1385 open_evalcall_form(title);1386 }1387 last_trkno = trackno;1388 update_evalcall_form(percentage);1389 }1390 close_evalcall_form();1391 if (pclose(pin)) {1392 res++;1393 log_OS_error("Unable to pclose");1394 }1395 unlink(tempfile);1396 mr_free(tempfile);1397 return (res);1398 }1399 1400 1401 /**1402 * Wrapper around @c format_disk_SUB().1403 * This function calls @c format_disk_SUB() with a @c device of its @c device1404 * parameter and a @c title of Formatting disk @c device. If the format1405 * fails, the user will be given the option of retrying.1406 *1407 * @param device The floppy drive to write to.1408 * @see format_disk_SUB1409 * @return The exit code of fdformat/superformat.1410 * @ingroup deviceGroup1411 */1412 int format_disk(char *device)1413 {1414 1415 /*@ int ************************************************************** */1416 int res = 0;1417 1418 /*@ buffer *********************************************************** */1419 char *command;1420 char *title;1421 1422 assert_string_is_neither_NULL_nor_zerolength(device);1423 1424 if (!system("which superformat > /dev/null 2> /dev/null")) {1425 mr_asprintf(&command, "superformat %s", device);1426 } else {1427 #ifdef __FreeBSD__1428 mr_asprintf(&command, "fdformat -y %s", device);1429 #else1430 mr_asprintf(&command, "fdformat %s", device);1431 #endif1432 }1433 mr_asprintf(&title, "Formatting disk %s", device);1434 while ((res = format_disk_SUB(command, title))) {1435 if (!ask_me_yes_or_no("Failed to format disk. Retry?")) {1436 return (res);1437 }1438 }1439 mr_free(title);1440 mr_free(command);1441 return (res);1442 1291 } 1443 1292 … … 2607 2456 2608 2457 /** 2609 * Offer to write boot and data disk images to 3.5" floppy disks.2610 * @param bkpinfo The backup information structure. Only the2611 * @c backup_media_type field is used in this function.2612 * @param imagesdir The directory containing the floppy images (usually2613 * /var/cache/mindi).2614 *2615 * @return The number of errors encountered (0 for success)2616 * @see write_image_to_floppy2617 * @see format_disk2618 * @ingroup MLarchiveGroup2619 */2620 int offer_to_write_floppies(struct s_bkpinfo *bkpinfo, char *imagesdir)2621 {2622 /*@ buffer ************************************************************ */2623 char *tmp = NULL;2624 char *comment = NULL;2625 char *bootdisk_dev =NULL;2626 char *datadisk_dev = NULL;2627 char *bootdisk_file = NULL;2628 char *rootdisk_file = NULL;2629 2630 /*@ int *************************************************************** */2631 int i = 0;2632 int res = 0;2633 2634 /*@ bool ************************************************************** */2635 bool format_first;2636 bool root_disk_exists = FALSE;2637 2638 assert(bkpinfo != NULL);2639 assert_string_is_neither_NULL_nor_zerolength(imagesdir);2640 2641 if (!ask_me_yes_or_no2642 ("Write boot and data disk images to 3.5\" floppy disks?")) {2643 return (0);2644 }2645 if (does_device_exist(DEFAULT_1722MB_DISK)) {2646 #ifdef __FreeBSD__2647 // tell the system that this is a 1.72m floppy2648 system("/usr/sbin/fdcontrol -F 1722 /dev/fd0.1722");2649 #endif2650 mr_asprintf(&bootdisk_dev, DEFAULT_1722MB_DISK);2651 } else if (does_device_exist(BACKUP_1722MB_DISK)) {2652 mr_asprintf(&bootdisk_dev, "/dev/fd0H1722");2653 } else {2654 mr_msg(1, "Warning - can't find a 1.72MB floppy device *sigh*");2655 mr_asprintf(&bootdisk_dev, DEFAULT_1722MB_DISK);2656 }2657 mr_asprintf(&datadisk_dev, "/dev/fd0");2658 if (!does_device_exist(datadisk_dev)) {2659 mr_msg(1, "Warning - can't find a 1.44MB floppy device *sigh*");2660 }2661 format_first = ask_me_yes_or_no2662 ("Do you want me to format the disks before I write to them?");2663 2664 /* boot disk */2665 if (ask_me_OK_or_cancel("About to write boot disk")) {2666 log_to_screen("Writing boot floppy");2667 #ifdef __FreeBSD__2668 mr_asprintf(&tmp, "%s/mindi-kern.1722.img", imagesdir);2669 if (format_first) {2670 format_disk(bootdisk_dev);2671 }2672 res += write_image_to_floppy(bootdisk_dev, tmp);2673 mr_free(tmp);2674 2675 if (ask_me_OK_or_cancel("About to write 1.44MB mfsroot disk")) {2676 log_to_screen("Writing mfsroot floppy");2677 if (format_first) {2678 format_disk(datadisk_dev);2679 }2680 mr_asprintf(&tmp, "%s/mindi-mfsroot.1440.img", imagesdir);2681 write_image_to_floppy(datadisk_dev, tmp);2682 mr_free(tmp);2683 }2684 #else2685 mr_asprintf(&bootdisk_file, "%s/mindi-bootroot.1722.img", imagesdir);2686 if (does_file_exist(bootdisk_file)) {2687 if (format_first) {2688 format_disk(bootdisk_dev);2689 }2690 res += write_image_to_floppy(bootdisk_dev, bootdisk_file);2691 } else {2692 mr_free(bootdisk_file);2693 mr_asprintf(&bootdisk_file, "%s/mindi-boot.1440.img", imagesdir);2694 mr_asprintf(&rootdisk_file, "%s/mindi-root.1440.img", imagesdir);2695 root_disk_exists = TRUE;2696 if (!does_file_exist(rootdisk_file)2697 || !does_file_exist(bootdisk_file)) {2698 popup_and_OK2699 ("Cannot write boot/root floppies. Files not found.");2700 log_to_screen2701 ("Failed to find boot/root floppy images. Oh dear.");2702 mr_free(bootdisk_file);2703 mr_free(rootdisk_file);2704 mr_free(bootdisk_dev);2705 return (1);2706 }2707 if (format_first) {2708 format_disk(datadisk_dev);2709 }2710 res += write_image_to_floppy(datadisk_dev, bootdisk_file);2711 if (ask_me_OK_or_cancel("About to write root disk")) {2712 log_to_screen("Writing root floppy");2713 if (format_first) {2714 format_disk(datadisk_dev);2715 }2716 mr_asprintf(&tmp, "cat %s > %s", rootdisk_file, datadisk_dev);2717 mr_msg(1, "tmp = '%s'", tmp);2718 res +=2719 run_external_binary_with_percentage_indicator_NEW2720 ("Writing root floppy", tmp);2721 // res += write_image_to_floppy (datadisk_dev, rootdisk_file);2722 mr_free(tmp);2723 }2724 mr_free(rootdisk_file);2725 2726 }2727 mr_free(bootdisk_file);2728 #endif2729 }2730 mr_free(bootdisk_dev);2731 2732 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {2733 log_to_screen2734 ("FYI, the data disks are stored on tape/CD for your convenience.");2735 return (0);2736 }2737 for (i = 1; i < 99; i++) {2738 mr_asprintf(&tmp, "%s/mindi-data-%d.img", imagesdir, i);2739 mr_msg(3, tmp);2740 if (!does_file_exist(tmp)) {2741 mr_msg(3, "...not found");2742 break;2743 }2744 mr_asprintf(&comment, "About to write data disk #%d", i);2745 if (ask_me_OK_or_cancel(comment)) {2746 mr_free(comment);2747 mr_asprintf(&comment, "Writing data disk #%3d", i);2748 log_to_screen(comment);2749 mr_free(comment);2750 if (format_first) {2751 res += format_disk(datadisk_dev);2752 }2753 res += write_image_to_floppy(datadisk_dev, tmp);2754 }2755 mr_free(tmp);2756 }2757 /* In case of break free mem as well */2758 mr_free(tmp);2759 mr_free(datadisk_dev);2760 return (res);2761 }2762 2763 2764 /**2765 * Wrapper around @c offer_to_write_floppies().2766 * @param bkpinfo The backup information structure. Used only2767 * in the call to @c offer_to_write_floppies().2768 * @return 0 if the boot floppies were found (not necessarily written OK),2769 * 1 otherwise.2770 * @see offer_to_write_floppies2771 * @ingroup MLarchiveGroup2772 */2773 2774 int offer_to_write_boot_floppies_to_physical_disks(struct s_bkpinfo *bkpinfo) {2775 2776 int res = 0;2777 2778 assert(bkpinfo != NULL);2779 2780 mvaddstr_and_log_it(g_currentY, 0,2781 "Writing boot+data floppy images to disk");2782 2783 if (!bkpinfo->nonbootable_backup) {2784 #ifdef __FreeBSD__2785 if (!does_file_exist(MINDI_CACHE"/mindi-kern.1722.img"))2786 #else2787 /* BERLIOS: To be improved */2788 if (!does_file_exist(MINDI_CACHE"/mindi-bootroot.1722.img")2789 && !does_file_exist(MINDI_CACHE"/mindi-boot.1440.img")2790 && !does_file_exist(MINDI_CACHE"/mindi-boot.2880.img")2791 && !does_file_exist(MINDI_CACHE"/mindi-boot.5760.img")2792 && !does_file_exist(MINDI_CACHE"/mindi-boot.8192.img"))2793 #endif2794 {2795 mvaddstr_and_log_it(g_currentY++, 74, "No Imgs");2796 if (does_file_exist(MINDI_CACHE"/mondorescue.iso")) {2797 popup_and_OK2798 ("Boot+data floppy creation failed. However, FYI, you may burn "MINDI_CACHE"/mondorescue.iso to a CD and boot from that instead if you wish.");2799 res++;2800 }2801 } else {2802 offer_to_write_floppies(bkpinfo, MINDI_CACHE);2803 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2804 }2805 } else {2806 popup_and_OK2807 ("Since you opted for a nonbootable backup, no boot floppies were created.");2808 }2809 2810 return (res);2811 }2812 2813 2814 /**2815 2458 * @addtogroup LLarchiveGroup 2816 2459 * @{ … … 3812 3455 3813 3456 3814 /**3815 * @addtogroup utilityGroup3816 * @{3817 */3818 /**3819 * Write an image to a real 3.5" floppy disk.3820 * @param device The device to write to (e.g. @c /dev/fd0)3821 * @param datafile The image to write to @p device.3822 * @return The number of errors encountered (0 for success)3823 * @see write_image_to_floppy3824 */3825 int write_image_to_floppy_SUB(char *device, char *datafile)3826 {3827 /*@ int *************************************************************** */3828 int res = 0;3829 int percentage = 0;3830 int blockno = 0;3831 int maxblocks = 0;3832 3833 /*@ buffers************************************************************ */3834 char *tmp;3835 char blk[1024];3836 char *title;3837 3838 /*@ pointers ********************************************************** */3839 char *p;3840 FILE *fout, *fin;3841 3842 3843 /* pretty stuff */3844 if (!(p = strrchr(datafile, '/'))) {3845 p = datafile;3846 } else {3847 p++;3848 }3849 mr_asprintf(&title, "Writing %s to floppy", p);3850 open_evalcall_form(title);3851 mr_free(title);3852 3853 /* functional stuff */3854 for (p = device + strlen(device); p != device && isdigit(*(p - 1));3855 p--);3856 maxblocks = atoi(p);3857 if (!maxblocks) {3858 maxblocks = 1440;3859 }3860 mr_asprintf(&tmp, "maxblocks = %d; p=%s", maxblocks, p);3861 mr_msg(2, tmp);3862 mr_free(tmp);3863 3864 /* copy data from image to floppy */3865 if (!(fin = fopen(datafile, "r"))) {3866 log_OS_error("Cannot open img");3867 return (1);3868 }3869 if (!(fout = fopen(device, "w"))) {3870 log_OS_error("Cannot open fdd");3871 return (1);3872 }3873 for (blockno = 0; blockno < maxblocks; blockno++) {3874 percentage = blockno * 100 / maxblocks;3875 if (fread(blk, 1, 1024, fin) != 1024) {3876 if (feof(fin)) {3877 mr_msg(1,3878 "img read err - img ended prematurely - non-fatal error");3879 sleep(3);3880 return (res);3881 }3882 res++;3883 log_to_screen("img read err");3884 }3885 if (fwrite(blk, 1, 1024, fout) != 1024) {3886 res++;3887 log_to_screen("fdd write err");3888 }3889 if (((blockno + 1) % 128) == 0) {3890 sync(); /* fflush doesn't work; dunno why */3891 update_evalcall_form(percentage);3892 }3893 }3894 paranoid_fclose(fin);3895 paranoid_fclose(fout);3896 close_evalcall_form();3897 return (res);3898 }3899 3900 3901 /**3902 * Wrapper around @c write_image_to_floppy_SUB().3903 * This function, unlike @c write_image_to_floppy_SUB(),3904 * gives the user the opportunity to retry if the write fails.3905 * @see write_image_to_floppy_SUB3906 */3907 int write_image_to_floppy(char *device, char *datafile)3908 {3909 /*@ int ************************************************************** */3910 int res = 0;3911 3912 assert_string_is_neither_NULL_nor_zerolength(device);3913 assert_string_is_neither_NULL_nor_zerolength(datafile);3914 3915 while ((res = write_image_to_floppy_SUB(device, datafile))) {3916 if (!ask_me_yes_or_no("Failed to write image to floppy. Retry?")) {3917 return (res);3918 }3919 }3920 return (res);3921 }3922 3923 /* @} - end of utilityGroup */3924 3925 3457 void setenv_mondo_var(void) { 3926 3458 -
branches/stable/mondo/src/common/libmondo-devices.c
r1578 r1581 1459 1459 } 1460 1460 if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) { 1461 popup_and_OK(_("Please remove CD /floppy from drive(s)"));1461 popup_and_OK(_("Please remove CD from drive")); 1462 1462 } 1463 1463 mr_msg(3, "media type = %s", -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r1569 r1581 827 827 (_("Your kernel appears not to support vfat filesystems. I am therefore")); 828 828 log_to_screen 829 (_("using LILO instead of SYSLINUX as the CD /floppy's boot loader."));829 (_("using LILO instead of SYSLINUX as the CD's boot loader.")); 830 830 } 831 831 if (run_program_and_log_output("which mkfs.vfat", FALSE)) { -
branches/stable/mondo/src/mondoarchive/mondoarchive.c
r1571 r1581 184 184 p = NULL; 185 185 186 mr_cnf->write_boot_floppy = mr_conf_bread("mondo_write_boot_floppy");187 186 mr_cnf->create_mindi_cd = mr_conf_bread("mondo_create_mindi_cd"); 188 187 … … 543 542 } 544 543 545 /* Offer to write floppy disk images to physical disks */546 if (bkpinfo->backup_data && !g_skip_floppies) {547 res = offer_to_write_boot_floppies_to_physical_disks(bkpinfo);548 retval += res;549 }550 551 544 /* Report result of entire operation (success? errors?) */ 552 545 if (!retval) { -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1556 r1581 2081 2081 2082 2082 /** 2083 * Get the configuration file from the floppy,tape, or CD.2083 * Get the configuration file from the tape, or CD. 2084 2084 * @param bkpinfo The backup information structure. Fields used: 2085 2085 * - @c bkpinfo->backup_media_type … … 2122 2122 mr_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file); 2123 2123 2124 /* Floppy? */2125 mr_asprintf(&tmp, "mkdir -p %s", mountpt);2126 run_program_and_log_output(tmp, FALSE);2127 mr_free(tmp);2128 2129 2124 mr_asprintf(&tmp, "mkdir -p %s/tmp", bkpinfo->tmpdir); 2130 2125 run_program_and_log_output(tmp, FALSE); 2131 2126 mr_free(tmp); 2132 2127 2133 mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("dmesg | grep -i floppy"));2134 if (strcmp(tmp, "")) {2135 mr_asprintf(&command, "mount /dev/fd0u1722 %s", mountpt);2136 mr_asprintf(&tmp,2137 "(sleep 15; kill `ps | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",2138 command);2139 mr_msg(1, "tmp = '%s'", tmp);2140 system(tmp);2141 mr_free(tmp);2142 2143 res = run_program_and_log_output(command, FALSE);2144 mr_free(command);2145 2146 if (res) {2147 mr_asprintf(&command, "mount /dev/fd0H1440 %s", mountpt);2148 res = run_program_and_log_output(command, FALSE);2149 mr_free(command);2150 }2151 } else {2152 res = 1;2153 }2154 if (res) {2155 try_plan_B = TRUE;2156 } else {2157 try_plan_B = TRUE;2158 mr_msg(2,2159 "Mounted floppy OK but I don't trust it because the archives might contain more up-to-date config file than the floppy does.");2160 // NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.2161 mr_msg(2, "Processing floppy (plan A?)");2162 mr_asprintf(&ramdisk_fname, "%s/mindi.rdz", mountpt);2163 if (!does_file_exist(ramdisk_fname)) {2164 mr_free(ramdisk_fname);2165 mr_asprintf(&ramdisk_fname, "%s/initrd.img", mountpt);2166 }2167 if (!does_file_exist(ramdisk_fname)) {2168 mr_msg(2,2169 "Cannot find ramdisk file on mountpoint. Are you sure that's a boot disk in the drive?");2170 }2171 if (extract_config_file_from_ramdisk2172 (bkpinfo, ramdisk_fname, cfg_file, mountlist_file)) {2173 mr_msg(2,2174 "Warning - failed to extract config file from ramdisk. I think this boot disk is mangled.");2175 }2176 mr_asprintf(&command, "umount %s", mountpt);2177 run_program_and_log_output(command, 5);2178 mr_free(command);2179 2180 unlink(ramdisk_fname);2181 mr_free(ramdisk_fname);2182 }2183 2128 if (!does_file_exist(cfg_file)) { 2184 2129 mr_msg(2, "gcffa --- we don't have cfg file yet."); … … 2232 2177 if (!does_file_exist("tmp/mondo-restore.cfg")) { 2233 2178 log_to_screen(_ 2234 ("Cannot find config info on tape/CD /floppy"));2179 ("Cannot find config info on tape/CD")); 2235 2180 return (1); 2236 2181 } 2237 2182 } else { 2238 /* BERLIOS : Useless ? */2239 /* That boot image doesn't always exist where the following method always works2240 log_msg(2,2241 "gcffa --- looking at mounted CD for mindi-boot.2880.img");2242 mr_asprintf(&command,2243 "mount " MNT_CDROM2244 "/images/mindi-boot.2880.img -o loop %s", mountpt);2245 */2246 2183 mr_asprintf(&mounted_cfgf_path, "%s/%s", mountpt, cfg_file); 2247 2184 if (!does_file_exist(mounted_cfgf_path)) { -
branches/stable/mondo/src/mondorestore/mondorestore.c
r1556 r1581 173 173 * The message to display if we detect that the user is using a Compaq Proliant. 174 174 */ 175 #define COMPAQ_PROLIANTS_SUCK _("Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo CD/floppyin Interactive Mode.")175 #define COMPAQ_PROLIANTS_SUCK _("Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo media in Interactive Mode.") 176 176 177 177 … … 908 908 if (!g_restoring_live_from_cd) { 909 909 popup_and_OK 910 (_("Please insert tape/CD /boot floppy, then hit 'OK' to continue."));910 (_("Please insert tape/CD, then hit 'OK' to continue.")); 911 911 sleep(1); 912 912 } … … 2847 2847 2848 2848 run_program_and_log_output("mkdir -p " MNT_CDROM, FALSE); 2849 run_program_and_log_output("mkdir -p /mnt/floppy", FALSE);2850 2849 2851 2850 malloc_string(a); … … 3186 3185 mvaddstr_and_log_it(g_currentY++, 3187 3186 0, 3188 _("Run complete. Please remove floppy/CD/media and reboot."));3187 _("Run complete. Please remove CD/media and reboot.")); 3189 3188 } else { 3190 3189 run_program_and_log_output("sync", FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.