Changeset 1885 in MondoRescue for branches/2.2.5/mondo/src/mondorestore
- Timestamp:
- Mar 2, 2008, 12:38:35 AM (17 years ago)
- Location:
- branches/2.2.5/mondo/src/mondorestore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/mondorestore/mondo-restore.c
r1881 r1885 141 141 * The message to display if we detect that the user is using a Compaq Proliant. 142 142 */ 143 #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."143 #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." 144 144 145 145 … … 928 928 if (!g_restoring_live_from_cd) { 929 929 popup_and_OK 930 ("Please insert tape/CD/USB Key /boot floppy, then hit 'OK' to continue.");930 ("Please insert tape/CD/USB Key, then hit 'OK' to continue."); 931 931 sleep(1); 932 932 } … … 2937 2937 2938 2938 run_program_and_log_output("mkdir -p " MNT_CDROM, FALSE); 2939 run_program_and_log_output("mkdir -p /mnt/floppy", FALSE);2940 2939 2941 2940 malloc_string(tmp); … … 3274 3273 mvaddstr_and_log_it(g_currentY++, 3275 3274 0, 3276 "Run complete. Please remove floppy/CD/media and reboot.");3275 "Run complete. Please remove media and reboot."); 3277 3276 } else { 3278 3277 run_program_and_log_output("sync", FALSE); -
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-tools.c
r1873 r1885 2313 2313 int res = 0; 2314 2314 int fd = 0; 2315 struct floppy_struct fdprms;2316 2315 2317 2316 bool try_plan_B; … … 2348 2347 log_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file); 2349 2348 2350 /* Floppy? */2351 sprintf(tmp, "mkdir -p %s", mountpt);2352 run_program_and_log_output(tmp, FALSE);2353 sprintf(tmp, "mkdir -p %s/tmp", bkpinfo->tmpdir);2354 run_program_and_log_output(tmp, FALSE);2355 2356 /* Is there a floppy drive detected */2357 fd = open("/dev/fd0u1722", O_RDONLY);2358 if (fd > 0) {2359 // open OK2360 res = ioctl(fd, FDGETPRM, &fdprms);2361 if (res >= 0) {2362 // media OK to mount2363 sprintf(command, "mount /dev/fd0u1722 %s", mountpt);2364 res = run_program_and_log_output(command, FALSE);2365 } else {2366 //skip mount2367 res = 1;2368 }2369 } else {2370 fd = open("/dev/fd0H1440", O_RDONLY);2371 if (fd > 0) {2372 // open OK2373 res = ioctl(fd, FDGETPRM, &fdprms);2374 if (res >= 0) {2375 // media OK to mount2376 sprintf(command, "mount /dev/fd0H1440 %s", mountpt);2377 res = run_program_and_log_output(command, FALSE);2378 } else {2379 //skip mount2380 res = 1;2381 }2382 }2383 }2384 if (res) {2385 try_plan_B = TRUE;2386 } else {2387 try_plan_B = TRUE;2388 log_msg(2,2389 "Mounted floppy OK but I don't trust it because the archives might contain more up-to-date config file than the floppy does.");2390 // NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.2391 log_msg(2, "Processing floppy (plan A?)");2392 sprintf(ramdisk_fname, "%s/mindi.rdz", mountpt);2393 if (!does_file_exist(ramdisk_fname)) {2394 sprintf(ramdisk_fname, "%s/initrd.img", mountpt);2395 }2396 if (!does_file_exist(ramdisk_fname)) {2397 log_msg(2,2398 "Cannot find ramdisk file on mountpoint. Are you sure that's a boot disk in the drive?");2399 }2400 if (extract_config_file_from_ramdisk(ramdisk_fname, cfg_file, mountlist_file)) {2401 log_msg(2,2402 "Warning - failed to extract config file from ramdisk. I think this boot disk is mangled.");2403 }2404 sprintf(command, "umount %s", mountpt);2405 run_program_and_log_output(command, 5);2406 unlink(ramdisk_fname);2407 }2408 2349 if (!does_file_exist(cfg_file)) { 2409 2350 log_msg(2, "gcffa --- we don't have cfg file yet."); … … 2453 2394 2454 2395 if (!does_file_exist("tmp/mondo-restore.cfg")) { 2455 log_to_screen("Cannot find config info on tape/CD/floppy");2396 log_to_screen("Cannot find config info on media"); 2456 2397 return (1); 2457 2398 }
Note:
See TracChangeset
for help on using the changeset viewer.