Changeset 1922 in MondoRescue
- Timestamp:
- Apr 17, 2008, 12:32:36 PM (17 years ago)
- Location:
- branches/2.2.6
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.6/mindi/deplist.txt
r1902 r1922 25 25 26 26 #-------------------------------- ESSENTIAL ----------------------------------- 27 fstab raidtab modules.conf conf.modules mondorestore modules.conf.local 27 fstab raidtab 28 /usr/sbin/mondorestore 28 29 /etc/mdadm/mdadm.conf /etc/mdadm.conf 29 30 /sbin/ldconfig … … 33 34 bzip2 bunzip2 lzop 34 35 ctrlaltdel 35 # Do not remove as they need to be aligned with the kernel 36 insmod lsmod 36 # Everything needed to handle modules correctly 37 insmod lsmod /sbin/modprobe 38 /etc/modprobe.d /etc/modprobe.conf /etc/modules.conf /etc/conf.modules /etc/modules.conf.local 39 37 40 hosts host.conf resolv.conf hosts.allow hosts.deny nsswitch.conf 38 41 klogd sysklogd … … 59 62 # gdb valgrind /usr/lib/valgrind 60 63 61 #----------------- For all you LVM users out there, much love -----------------62 LVMFILES:63 lvmiopversion lvchange lvcreate lvdisplay lvextend lvmchange lvmcreate_initrd lvmdiskscan lvmsadc lvmsar lvreduce lvremove lvrename lvscan pvchange pvcreate pvdata pvdisplay pvmove pvscan vgcfgbackup vgcfgrestore vgchange vgck vgcreate vgdisplay vgexport vgextend vgimport vgmerge vgmknodes vgreduce vgremove vgrename vgscan vgsplit liblvm lvm lvm-10 /etc/lvm/lvm.conf64 #------------------------------------------------------------------------------65 64 # 66 65 # Proliant extended support if available … … 68 67 conrep cpqacuxe hponcfg 69 68 lshw 69 #----------------- For all you LVM users out there, much love ----------------- 70 LVMFILES: 71 lvmiopversion lvchange lvcreate lvdisplay lvextend lvmchange lvmcreate_initrd lvmdiskscan lvmsadc lvmsar lvreduce lvremove lvrename lvscan pvchange pvcreate pvdata pvdisplay pvmove pvscan vgcfgbackup vgcfgrestore vgchange vgck vgcreate vgdisplay vgexport vgextend vgimport vgmerge vgmknodes vgreduce vgremove vgrename vgscan vgsplit liblvm lvm lvm-10 /etc/lvm/lvm.conf 72 #------------------------------------------------------------------------------ -
branches/2.2.6/mindi/mindi
r1919 r1922 1069 1069 1070 1070 1071 MakeModuleLoadingScript() {1072 local module fname params modpath kver outerloop i modpaths kver searchpath list_to_echo j1073 tmpmodprobe_flag=$11074 outfile=$21075 > $outfile || Die "Cannot create empty $outfile"1076 echo -en "#\041/bin/sh\n\n" >> $outfile1077 echo "echo -en \"Loading your modules...\"" >> $outfile1078 if [ "$YOUR_KERNEL_SUCKS" ] ; then1079 kver=$FAILSAFE_KVER1080 cd $MINDI_TMP1081 searchpath=lib/modules/$kver1082 else1083 ###1084 ### Sq-Modification ... Use kernelname for module search path if specified1085 ###1086 #kver=`uname -r`1087 if [ "${kernelname}" != "" ]1088 then1089 kver=${kernelname}1090 else1091 kver=`uname -r`1092 fi1093 ###1094 ### Sq-Modification end1095 ###1096 searchpath=/lib/modules/$kver1097 fi1098 1099 echo -en "for outerloop in 1 2 3 4 5 ; do\necho -en \".\"\n" >> $outfile1100 list_to_echo="$MODULES"1101 # Remove unwanted modules from list1102 for i in $DENY_MODS; do1103 list_to_echo=`echo ${list_to_echo} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`1104 EXTRA_MODS=`echo ${EXTRA_MODS} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`1105 done1106 1107 # Make temporary modprobe.conf file if we are told so1108 if [ "$tmpmodprobe_flag" = "Y" ] ; then1109 infile="$MINDI_TMP/modprobe.conf.mindi"1110 find /etc/modprobe.d -maxdepth 1 -name "*" -xtype f -print0 | xargs -0 cat > $infile1111 else1112 infile="/etc/modules.conf"1113 fi1114 1115 for module in $list_to_echo $EXTRA_MODS ; do1116 params=`sed -n "s/^options \\+$module \\+//p" $infile`1117 modpaths=`FindSpecificModuleInPath $searchpath $module`1118 for i in $modpaths ; do1119 echo "MyInsmod $i $params > /dev/null 2> /dev/null" \1120 | tr '.' '#' \1121 | sed s/#o#gz/#o/ \1122 | sed s/#o#gz/#o/ \1123 | sed s/#ko#gz/#ko/ \1124 | sed s/#ko#gz/#ko/ \1125 | tr '#' '.' >> $outfile1126 echo -en "$i added to module list.\n" >> $LOGFILE1127 done1128 done1129 echo -en "done\n" >> $outfile1130 echo "echo \"Done.\"" >> $outfile1131 chmod +x $outfile1132 cd /1133 # Remove temporary modprobe.conf file if we have created one1134 if [ "$tmpmodprobe_flag" = "Y" ] ; then1135 rm -f $infile1136 fi1137 }1138 1139 1140 1071 MakeMountlist() { 1141 1072 local scratchdir mountlist all_partitions current_partition \ … … 2555 2486 cd $old_pwd 2556 2487 echo -en "..." 2557 MakeModuleLoadingScript $TMPMODPROBE_FLAG $mountpoint/sbin/insert-all-my-modules2558 echo -en "..."2559 2488 old_pwd=`pwd` 2560 2489 if [ "$YOUR_KERNEL_SUCKS" ] ; then … … 2722 2651 echo "-----------------------------" >> $LOGFILE 2723 2652 2724 if [ -e "/etc/conf.modules" ] && [ ! -e "/etc/modules.conf" ] ; then2725 LogIt "WARNING - Ancient distro detected." 12726 ln -sf /etc/conf.modules /etc/modules.conf2727 fi2728 2653 [ -e "/sbin/mkdosfs" ] && [ ! -e "/sbin/mkfs.vfat" ] && ln -sf /sbin/mkdosfs /sbin/mkfs.vfat 2729 2654 … … 2760 2685 2761 2686 [ "`uname -r | grep "2.4.[0-6]" | grep -v "2.4.[0-9][0-9]"`" != "" ] && echo "WARNING! Your kernel may have buggy loopfs code. Consider upgrading to 2.4.7" 2762 # If we have a 2.6 kernel, the system uses module-init-tools which means that we2763 # may have the modprobe configuration spread out across multiple files in2764 # directory /etc/modprobe.d. If this is the case we concatenate these files into2765 # a temporary file for further processing. Otherwise we continue in the standard2766 # way. Note further that in case /etc/modprobe.d exists, we use it and ignore2767 # /etc/modprobe.conf which is exactly what module-init-tools does. The temporary2768 # modprobe.conf file is created in MakeModuleLoadingScript. AL041128.2769 if [ -d "/etc/modprobe.d" ] && [ "`uname -r | cut -c1-3`" = "2.6" ] ; then2770 TMPMODPROBE_FLAG="Y"2771 else2772 TMPMODPROBE_FLAG="N"2773 [ -e "/etc/modprobe.conf" ] && [ ! -e "/etc/modules.conf" ] && ln -sf /etc/modprobe.conf /etc/modules.conf2774 [ ! -e "/etc/modules.conf" ] && Die "/etc/modules.conf not found; you may have to create a softlink from /etc/conf.modules to /etc/modules.conf; of course, all good distros use modules.conf anyway..."2775 fi2776 2687 2777 2688 # Update the PATH variable if incomplete -
branches/2.2.6/mindi/rootfs/sbin/init
r1910 r1922 79 79 openvt 7 /bin/sh /sbin/wait-for-petris 80 80 openvt 8 /usr/bin/tail -f $LOGFILE 81 # May avoid shell error messages 82 chmod 666 /dev/tty* /dev/console 81 83 } 82 84 … … 162 164 fi 163 165 echo "Activating a potential USB Storage device" 164 if [ -f usb-storage.ko ] || [ -f usb-storage.ko.gz ]; then 165 if [ -e "/tmp/USE-UDEV" ] ; then 166 modprobe -q usb-storage 167 else 168 insmod usb-storage.ko* 169 fi 170 fi 166 modprobe -q usb-storage 171 167 for i in 1 2 3 4 5 6 7 8 9 10 ; do 172 168 sleep 1 … … 199 195 HowMuchFreeSpaceOnRamdisk() { 200 196 df -m -P | grep /dev/ram | head -n1 | tr -s '\t' ' ' | cut -d' ' -f4 201 }202 203 204 205 InsertEssentialModules() {206 # Load the VIA IDE module first thing if it exists (requires ide-core).207 # This is to ensure that DMA is working for VIA chipsets with 2.6 kernels.208 for module in /ide-core.ko* /via82cxxx.ko*; do209 [ -f "$module" ] && MyInsmod $module > /dev/null 2> /dev/null210 done211 # Then load the remaining modules in normal (i.e. arbitrary) order.212 for j in 1 2 3 4 5 ; do213 for i in `ls /*.*o* 2> /dev/null` ; do214 [ -f "$i" ] && MyInsmod $i > /dev/null 2> /dev/null215 done216 done217 197 } 218 198 … … 314 294 fi 315 295 create_dev_makedev 316 # May avoid shell error messages317 chmod 644 /dev/tty*318 296 if [ -x /sbin/udevsettle ]; then 319 297 /sbin/udevsettle … … 389 367 return 390 368 fi 391 if [ -e "/tmp/USE-UDEV" ] ; then 392 if [ -f uhcd_hci.ko ] || [ -f uhcd_hci.ko.gz ]; then 393 modprobe -q uhcd_hci 394 fi 395 if [ -f usbhid.ko ] || [ -f usbhid.ko.gz ]; then 396 modprobe -q usbhid 397 fi 398 else 399 if [ -f uhcd_hci.ko ]; then 400 insmod uhcd_hci.ko 401 fi 402 if [ -f usbhid.ko ]; then 403 insmod usbcore.ko 404 insmod usbhid.ko 405 fi 406 fi 369 modprobe -q uhcd_hci 370 modprobe -q usbhid 407 371 } 408 372 … … 413 377 LogIt "Scanning LVM's..." 1 414 378 if which lvm ; then 415 MyInsmoddm-mod416 MyInsmoddm_mod379 modprobe -q dm-mod 380 modprobe -q dm_mod 417 381 lvm vgscan --mknodes 418 382 else … … 566 530 ModprobeAllModules() { 567 531 568 for m in `find /lib/modules -name '* .ko*'`; do532 for m in `find /lib/modules -name '*\.ko*' -o -name '*\.o*'`; do 569 533 j=`basename $m | sed 's/\.ko.*$//'` 534 j=`basename $m | sed 's/\.o.*$//'` 570 535 echo "$DENY_MODS" | grep -q "$j " 571 536 if [ $? -eq 0 ]; then … … 584 549 PKLVL=`cut -f1 /proc/sys/kernel/printk` 585 550 echo 0 > /proc/sys/kernel/printk 586 if [ ! -e "/tmp/USE-UDEV" ] ; then 587 echo "Inserting modules ..." 588 insert-all-my-modules >> $LOGFILE 2>> $LOGFILE 589 for i in $FORCE_MODS; do 590 MyInsmod $i 591 done 592 else 593 ModprobeAllModules 594 fi 551 ModprobeAllModules 595 552 echo $PKLVL > /proc/sys/kernel/printk 596 553 } … … 654 611 PKLVL=`cut -f1 /proc/sys/kernel/printk` 655 612 echo 0 > /proc/sys/kernel/printk 656 if [ ! -e "/tmp/USE-UDEV" ] ; then 657 InsertEssentialModules 658 else 659 ModprobeAllModules 660 fi 613 ModprobeAllModules 661 614 echo $PKLVL > /proc/sys/kernel/printk 662 615 -
branches/2.2.6/mondo/src/common/libmondo-tools.c
r1919 r1922 1 1 /* libmondo-tools.c misc tools 2 2 $Id$ 3 .4 5 6 06/287 - abort if RAID partitions found but /etc/raidtab not found8 9 06/2510 - don't insist on ms-sys; recommend it11 - don't fatal_error if can't open log file12 13 06/1414 - call mindi -V before calling mindi --makemountlist15 16 04/0917 - lots of malloc'd char*'s instead of char[]'s in post_param_config'n18 19 04/0220 - better sanity-checking, re: /etc/modules.conf21 22 02/1523 - abort if Windows dir but no ms-sys or parted24 25 02/0826 - missing ramdisk/initrd support is nonfatal now (but stupid)27 28 01/1629 - added g_kernel_version and get_kernel_version()30 31 01/08/200432 - fixed /boot mounter thingy33 34 11/14/200335 - if <50MB free in /root, softlink /root/images/mindi to36 /home/root/images/mindi as a workaround37 38 10/2339 - streaming backups now generate 4MB sets; CDs, 8MB sets40 41 10/2142 - better at finding your /boot in order to mount it, if nec.43 - link /etc/modules.conf to /etc/conf.modules if former44 is missing but latter is not45 - changed "/mnt/cdrom" to MNT_CDROM46 - changed "/mnt/floppy" to MNT_FLOPPY47 48 10/1349 - added stop_magicdev_if_necessary()50 - added restart_magicdev_if_necessary()51 52 10/0253 - don't eject if bkpinfo->please_dont_eject is TRUE54 55 09/2856 - fixed segfault in mount_..._necessary57 58 09/2659 - ask for cmp (or create workaround if possible)60 61 09/2562 - add DVD support63 64 09/2465 - don't overwrite existing media-dev value in bkpinfo IF it's66 a tape device AND it's already populated by /dev/{something}67 ...This helps w/ weird tape drives68 69 09/2370 - malloc/free global strings in new subroutines - malloc_libmondo_global_strings()71 and free_libmondo_global_strings() - which are in libmondo-tools.c72 73 09/1874 - added stop_autofs_if_necessary() and restart_autofs_if_necessary()75 76 09/1377 - added log_debug_msg()78 - turned log_it() into a macro79 80 09/1081 - reduced PPCFG_RAMDISK to 150m (was 200m)82 - max set size is now 8MB (was 6)83 - added 'buffer' to requisite tools84 85 08/2986 - typical set size is now 5MB87 88 07/2289 - increased PPCFG* to 200m90 91 05/0792 - changed grep -m1 to grep | head -n1 for Debian users93 - pre_param_...() also mkdir -p /mnt/cdrom, just in case94 95 05/0596 - cleaner logging of call to dd if=<tape> of=/dev/null97 - added Joshua Oreman's FreeBSD patches98 99 05/04100 - added Herman Kuster's multi-level bkp patch101 102 05/02103 - log_it() --- "Message repeated N times" (if it was)104 105 04/24106 - added lots of assert()'s and log_OS_error()'s107 - reset_bkpinfop() --- reset all media_size[] array108 - increased tmpfs ramdisk to size=100m109 110 04/22111 - post_param_configuration() --- store iso-dev and isodir112 113 04/05114 - re-enable tmpfs ramdisk/mountpt _but_ make sure size=80m115 - in post_param_configuration(), use cdrecord in preference116 to dvdrecord now117 118 03/27119 - disabled tmpfs ramdisk/mountpt120 121 01/02/2003122 - bkpinfo->makefilelist = TRUE123 124 12/10/2002125 - added g_loglevel126 - fixed minor bug in clean_up_KDE_desktop_if_necessary()127 - log versions of newt, slang, ncurses128 - isodir defaults to / if disaster recovery129 130 11/28131 - unmount all CD devices at start132 - added clean_up_KDE_desktop_if_necessary()133 134 11/20135 - don't use lilo.conf.anaconda; abort instead136 - mount/unmount /boot partition for Gentoo 1.2 users137 138 11/13139 - call mindi --makemountlist as part of testing sanity of distro140 141 11/08142 - added a couple of chmod 700's (one for scratchdir, one for tmpdir)143 to post_param_configuration()144 145 10/01 - 10/31146 - added checking of / and /root's free space to some_basic_sanity_checks()147 - moved some subroutines here from common/libmondo-archive148 149 09/01 - 09/30150 - don't write log_it()'s string to stdout, even if text mode151 - tell user the kernel is bad if it has no ramdisk support but allow152 it if they want to use the failsafe kernel for booting153 - run_program_and_log_output() now takes boolean operator to specify154 whether it will log its activities in the event of _success_155 - if mkfs.vfat not found but mkfs.msdos found then create a softlink156 from the former to the latter157 158 08/01 - 08/31159 - if /etc/lilo.conf not found not /etc/lilo.conf.anaconda found160 then create a softlink from the former to the latter, to work161 around RH7.3's b0rken LILO support162 - handle unknown media size163 164 07/27165 - created166 3 */ 167 4 … … 1100 937 * - make sure afio, cdrecord, mkisofs, bzip2, awk, md5sum, strings, mindi, and buffer exist 1101 938 * - make sure CD-ROM is unmounted 1102 * - make sure /etc/modules.conf exists1103 939 * - make sure user's mountlist is OK by running <tt>mindi --makemountlist</tt> 1104 940 * … … 1211 1047 } 1212 1048 } 1213 #ifndef __FreeBSD__1214 if (!does_file_exist("/etc/modules.conf")) {1215 if (does_file_exist("/etc/conf.modules")) {1216 log_it("Linking /etc/modules.conf to /etc/conf.modules");1217 run_program_and_log_output1218 ("ln -sf /etc/conf.modules /etc/modules.conf", 5);1219 } else if (does_file_exist("/etc/modprobe.d")) {1220 log_it1221 ("Directory /etc/modprobe.d found. mindi will use its contents.");1222 } else if (does_file_exist("/etc/modprobe.conf")) {1223 log_it("Linking /etc/modules.conf to /etc/modprobe.conf");1224 run_program_and_log_output1225 ("ln -sf /etc/modprobe.conf /etc/modules.conf", 5);1226 } else {1227 retval++;1228 log_to_screen1229 ("Please find out what happened to /etc/modules.conf");1230 }1231 }1232 #endif1233 1049 1234 1050 run_program_and_log_output("cat /etc/fstab", 5);
Note:
See TracChangeset
for help on using the changeset viewer.