Changeset 3885 in MondoRescue for branches/3.3/mondo/src/mondorestore
- Timestamp:
- Mar 10, 2024, 7:23:12 PM (18 months ago)
- Location:
- branches/3.3/mondo/src/mondorestore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/mondorestore/mondo-prep.c
r3879 r3885 741 741 mr_asprintf(program, "newfs_msdos -F 32"); 742 742 #else 743 #ifdef __IA64__744 /* For EFI partitions on ia64 take fat16745 * as we want to make small ones */746 mr_asprintf(program, "mkfs.vfat -F 16");747 #else748 743 /* mkfs.vfat will make the best possible choice itself */ 749 744 /* should avoid problems with mr-label later on when used */ 750 745 mr_asprintf(program, "mkfs.vfat"); 751 #endif752 746 #endif 753 747 #ifndef __FreeBSD__ … … 2028 2022 #endif 2029 2023 2030 #ifndef __IA64__2031 2024 part_table_fmt = which_partition_format(drivename); 2032 2025 … … 2041 2034 } 2042 2035 mr_free(part_table_fmt); 2043 #endif2044 2036 2045 2037 retval += partition_device(pout_to_fdisk, drivename, current_devno, previous_devno, format, partsize); -
branches/3.3/mondo/src/mondorestore/mondo-rstr-tools-EXT.h
r2682 r3885 16 16 extern int run_grub(bool, char *); 17 17 extern int run_lilo(bool); 18 extern int run_elilo(bool);19 18 extern int run_raw_mbr(bool offer_to_hack_scripts, char *bd); 20 19 extern char *find_my_editor(void); -
branches/3.3/mondo/src/mondorestore/mondo-rstr-tools.c
r3882 r3885 1921 1921 1922 1922 /** 1923 * Install ELILO on the user's boot drive (determined by elilo.conf).1924 * @param offer_to_run_stabelilo If TRUE, then offer to hack the user's fstab for them.1925 * @return 0 for success, nonzero for failure.1926 */1927 int run_elilo(bool offer_to_run_stabelilo)1928 {1929 /** malloc **/1930 char *command = NULL;1931 char *tmp = NULL;1932 char *editor = NULL;1933 1934 int res;1935 int done;1936 1937 if (offer_to_run_stabelilo1938 && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?"))1939 1940 /* interactive mode */1941 {1942 mvaddstr_and_log_it(g_currentY,1943 0,1944 "Modifying fstab and elilo.conf... ");1945 mr_asprintf(command, "mr-stabelilo-me");1946 res = run_program_and_log_output(command, 3);1947 mr_free(command);1948 1949 if (res) {1950 popup_and_OK("You will now edit fstab and elilo.conf, to make sure they match your new mountlist.");1951 for (done = FALSE; !done;) {1952 editor = find_my_editor();1953 if (editor == NULL) {1954 popup_and_OK("No editor found. You won't be able to edit conf files");1955 done = TRUE;1956 } else {1957 1958 if (!g_text_mode) {1959 newtSuspend();1960 }1961 mr_asprintf(tmp, "chroot %s %s /etc/fstab", MNT_RESTORING, editor);1962 paranoid_system(tmp);1963 mr_free(tmp);1964 1965 mr_asprintf(tmp, "chroot %s %s /etc/elilo.conf", MNT_RESTORING, editor);1966 paranoid_system(tmp);1967 mr_free(tmp);1968 mr_free(editor);1969 1970 if (!g_text_mode) {1971 newtResume();1972 }1973 // newtCls();1974 if (ask_me_yes_or_no("Edit them again?")) {1975 continue;1976 }1977 done = TRUE;1978 }1979 mr_free(editor);1980 }1981 } else {1982 log_to_screen("elilo.conf and fstab were modified OK");1983 }1984 } else1985 /* nuke mode */1986 {1987 res = TRUE;1988 }1989 return (res);1990 }1991 1992 /**************************************************************************1993 *END_RUN_ELILO *1994 **************************************************************************/1995 1996 1997 1998 /**1999 1923 * Install the user's boot loader in the MBR. 2000 * Currently LILO, ELILO,GRUB, RAW (dd of MBR), and the FreeBSD bootloader are supported.1924 * Currently LILO, GRUB, RAW (dd of MBR), and the FreeBSD bootloader are supported. 2001 1925 * @param offer_to_hack_scripts If TRUE, then offer to hack the user's fstab for them. 2002 1926 * @return 0 for success, nonzero for failure. … … 2031 1955 backup_crucial_file(MNT_RESTORING, "/boot/grub2/grub.cfg"); 2032 1956 backup_crucial_file(MNT_RESTORING, "/etc/lilo.conf"); 2033 backup_crucial_file(MNT_RESTORING, "/etc/elilo.conf");2034 1957 backup_crucial_file(MNT_RESTORING, "/boot/grub/device.map"); 2035 1958 backup_crucial_file(MNT_RESTORING, "/boot/grub2/device.map"); … … 2058 1981 if (!strcmp(name, "LILO")) { 2059 1982 res = run_lilo(offer_to_hack_scripts); 2060 } else if (!strcmp(name, "ELILO")) {2061 res = run_elilo(offer_to_hack_scripts);2062 1983 } else if (!strcmp(name, "GRUB")) { 2063 1984 res = run_grub(offer_to_hack_scripts, device); -
branches/3.3/mondo/src/mondorestore/mondorestore.c
r3882 r3885 2911 2911 2912 2912 if (!bkpinfo->please_dont_eject) { 2913 (void)eject_device(bkpinfo->backup_media_type);2913 eject_device(bkpinfo->media_device); 2914 2914 } 2915 2915 mvaddstr_and_log_it(g_currentY++, 0, "Run complete. Please remove media and reboot.");
Note:
See TracChangeset
for help on using the changeset viewer.