Changeset 979 in MondoRescue
- Timestamp:
- Nov 26, 2006, 12:35:32 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/analyze-my-lvm
r914 r979 37 37 Die() { 38 38 echo "$1" >> /dev/stderr 39 exit 139 exit -1 40 40 } 41 41 … … 217 217 218 218 # -------------------------------- main ----------------------------------- 219 which lvmdiskscan 2>/dev/null 2>&1 || Die " Cannot find lvmdiskscan. Are you sure you're using LVM?"219 which lvmdiskscan 2>/dev/null 2>&1 || Die "lvmdiskscan not found. Won't handle LVM." 220 220 if [ -e "/proc/lvm/global" ] && [ "`tr -s '\t' ' ' < /proc/lvm/global | grep "0 VGs 0 PVs 0 LVs"`" != "" ] ; then 221 221 exit 0 -
trunk/mindi/mindi
r956 r979 113 113 mkdir -p $MINDI_TMP 114 114 115 FDISKLOG=$MINDI_TMP/parted2fdisk.log116 117 115 # Purge from potential old run 118 116 rm -rf $CACHE_LOC/* 2> /dev/null … … 192 190 if [ ! -e "$filename" ] ; then 193 191 if [ -h "$filename" ] ; then 194 cp --parents -pRdf $filename $minidir_root/$diskno 192 cp --parents -pRdf $filename $minidir_root/$diskno 2>> $LOGFILE 195 193 return $noof_disks 196 194 else … … 203 201 mkdir -p $minidir_root/$diskno 204 202 filesize=`du -sk $filename | cut -f1` 205 cp --parents -Rdf $filename $minidir_root/$diskno 203 cp --parents -Rdf $filename $minidir_root/$diskno 2>> $LOGFILE 206 204 if [ "$filesize" -le "4" ] ; then 207 205 siz=$filesize … … 242 240 mappath=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"` 243 241 if [ ! -e "$mappath" ] ; then 244 LogIt "Cannot add $mappath: kbd map file not found \n"242 LogIt "Cannot add $mappath: kbd map file not found" 245 243 return 246 244 fi … … 250 248 251 249 mkdir -p $bigdir/etc 252 cp --parents -pRdf $mappath $bigdir || LogIt "AKMF -- Could not copy $mappath to $bigdir\n"250 cp --parents -pRdf $mappath $bigdir 2>> $LOGFILE || LogIt "AKMF -- Could not copy $mappath to $bigdir" 253 251 if [ "`echo $mappath | grep -F ".gz"`" ] ; then 254 252 included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2` … … 282 280 sliceno=0 283 281 scratchfile=$MINDI_TMP/blah.$$.dat 284 cp -f $filename $scratchfile || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?"282 cp -f $filename $scratchfile 2>> $LOGFILE || Die "CUACF -- cannot copy $filename to $scratchfile - did you run out of disk space?" 285 283 [ "`head $scratchfile -n1 | grep -F "bin/sh"`" != "" ] && StripComments $scratchfile "-$filename-" 286 284 [ "`echo "$filename" | grep -F "etc/termcap"`" != "" ] && StripComments $scratchfile "-$filename-" 287 285 if [ "`echo "$filename" | grep -F "lib/modules/" | grep "\.*o\.gz"`" != "" ] ; then 288 286 mv $scratchfile $scratchfile.gz 289 gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz \n"287 gunzip -f $scratchfile || LogIt "Cannot gunzip $scratchfile.gz" 290 288 filename=`echo "$filename" | tr '.' '#' | sed s/#o#gz/#o/ | sed s/#ko#gz/#ko/ | tr '#' '.'` 291 289 fi … … 296 294 [ -x "$scratchfile" ] && StripExecutable $scratchfile "-$filename-" 297 295 while [ "$sliceno" -le "$noof_slices" ] ; do 298 dd if=$scratchfile skip=$(($sliceno*$slicesize)) of=$outdir/slice-$biggienumber.`printf "%03d" $sliceno` bs=1k count=$slicesize 2> /dev/null296 dd if=$scratchfile skip=$(($sliceno*$slicesize)) of=$outdir/slice-$biggienumber.`printf "%03d" $sliceno` bs=1k count=$slicesize &> /dev/null 299 297 sliceno=$(($sliceno+1)) 300 298 done … … 311 309 if [ $liloc ]; then 312 310 if ! [ `strings $liloc | grep "boot\.b"` ]; then 313 LogIt "boot.b files built into lilo; I'll create a dummy. \n"311 LogIt "boot.b files built into lilo; I'll create a dummy." 314 312 > $copy_to 315 313 return 0 … … 320 318 copy_from=`grep install= /etc/lilo.conf | grep "\.b" | cut -d'=' -f2` 321 319 if [ ! -f "$copy_from" ] ; then 322 LogIt "Nor can I find it from your /etc/lilo.conf file. This is very odd. \n"320 LogIt "Nor can I find it from your /etc/lilo.conf file. This is very odd." 323 321 copy_from=`FindSensibleBootBFile` 324 LogIt "I'm going to use '$copy_from' \n"325 fi 326 fi 327 cp -f $copy_from $copy_to || LogIt "CBBF -- warning -- cannot find your boot.b file. That's it, I quit... (j/k)\n"322 LogIt "I'm going to use '$copy_from'" 323 fi 324 fi 325 cp -f $copy_from $copy_to 2>> $LOGFILE || LogIt "CBBF -- warning -- cannot find your boot.b file. That's it, I quit... (j/k)" 328 326 } 329 327 … … 346 344 cp --parents -Rdf $incoming $outdir 2> /dev/null || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" 347 345 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] ; then 348 gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming \n"346 gunzip -f $outdir/$incoming || LogIt "Cannot gunzip $outdir/$incoming" 349 347 fi 350 348 [ -x "$outdir" ] && StripExecutable $outdir "-$filename-" … … 390 388 done 391 389 echo -e "$DONE" 392 LogIt "$comment has been written. \n"390 LogIt "$comment has been written." 393 391 } 394 392 … … 415 413 while [ "$diskno" -le "$noof_disks" ] ; do 416 414 echo -en "#$diskno..." 417 cp -f $tardir/$diskno.tar.gz $outdir || LogIt "[line 424] Cannot copy $tardir/$diskno.tar.gz to $outdir\n"415 cp -f $tardir/$diskno.tar.gz $outdir 2>> $LOGFILE || LogIt "[line 424] Cannot copy $tardir/$diskno.tar.gz to $outdir" 418 416 CreateOneDataDiskImage $tardir/$diskno.tar.gz $outdir/mindi-data-$diskno.img $diskno $noof_disks 419 417 diskno=$(($diskno+1)) … … 435 433 mountpoint=$MINDI_TMP/mountpoint.$$ 436 434 mkdir -p $mountpoint 437 dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)\n" 438 mke2fs -N 12 -F $imagefile > $MINDI_TMP/mke2fs.$$ 2>> $MINDI_TMP/mke2fs.$$ 439 [ "$?" -ne "0" ] && cat $MINDI_TMP/mke2fs.$$ 440 rm -f $MINDI_TMP/mke2fs.$$ 435 dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)" 436 mke2fs -N 12 -F $imagefile >> $LOGFILE 2>> $LOGFILE 441 437 mount -t ext2 -o loop $imagefile $mountpoint || Die "Can't loopmount $imagefile to $mountpoint! The reason may be missing support for loopfs or ext2 (or both) in the running kernel." 442 438 mv $tarball $mountpoint/ … … 446 442 fi 447 443 [ "$diskno" -eq "$noof_disks" ] && echo "This is the last disk ($diskno=$noof_disks)" >> $mountpoint/LAST-DISK 448 umount $mountpoint || LogIt "Cannot umount (CODI) \n"449 rmdir $mountpoint || LogIt "Cannot rmdir (CODI) \n"444 umount $mountpoint || LogIt "Cannot umount (CODI)" 445 rmdir $mountpoint || LogIt "Cannot rmdir (CODI)" 450 446 } 451 447 … … 484 480 local i 485 481 if [ "$1" = "" ] ; then 486 LogIt "F atal error\n"487 else 488 LogIt "F atal error. $1\n"482 LogIt "FATAL ERROR" 483 else 484 LogIt "FATAL ERROR. $1" 489 485 fi 490 486 491 487 # Creates a tar file containing all required files 492 488 for i in /etc/fstab /etc/lilo.conf /etc/raidtab $LOGFILE /var/log/mondo-archive.log ; do 493 [ -e "$i" ] && cp -f $i $MINDI_TMP 489 [ -e "$i" ] && cp -f $i $MINDI_TMP 2>> $LOGFILE 494 490 done 495 491 rm -f $TMPDIR/mindi.err.*.tgz 496 492 tar -cf - $MINDI_TMP | gzip -9 > $TMPDIR/mindi.err.$$.tgz 497 LogIt "Please e-mail a copy of $TMPDIR/mindi.err.$$.tgz to the mailing list. \n"498 LogIt "See http://www.mondorescue.org for more information. \n"493 LogIt "Please e-mail a copy of $TMPDIR/mindi.err.$$.tgz to the mailing list." 494 LogIt "See http://www.mondorescue.org for more information." 499 495 LogIt "WE CANNOT HELP unless you enclose that file.\n" 500 496 MindiExit -1 … … 538 534 FindAndAddUserKeyboardMappingFile() { 539 535 local r res mapfile mappath included_item included_list keyfile mp locale 540 LogIt "Analyzing your keyboard's configuration. \n"536 LogIt "Analyzing your keyboard's configuration." 541 537 KEYDIR=/lib/kbd 542 538 [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share/kbd # Slackware … … 544 540 [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share 545 541 if [ ! -e "$KEYDIR" ] ; then 546 LogIt "Keyboard mapping directory not found. I shall use default map at boot-time. \n"542 LogIt "Keyboard mapping directory not found. I shall use default map at boot-time." 547 543 return 0 548 544 fi … … 563 559 KBDEPTH=0 564 560 mkdir -p $bigdir/etc/console 565 cp /etc/console/boottime.kmap.gz $bigdir/etc/console 561 cp /etc/console/boottime.kmap.gz $bigdir/etc/console 2>> $LOGFILE 566 562 echo -e "$DONE" 567 563 return 0 … … 570 566 keyfile=`find /etc -name rc.config | head -n1` 571 567 if [ "$keyfile" = "" ] || [ ! -e "$keyfile" ] ; then 572 LogIt "Unknown config detected. Default keyboard map will be used. \n"568 LogIt "Unknown config detected. Default keyboard map will be used." 573 569 return 574 570 else … … 577 573 fi 578 574 if [ ! -e "$KEYDIR/keymaps" ] ; then 579 LogIt "Keyboard mapping directory not found. Default keyboard map will be used. \n"575 LogIt "Keyboard mapping directory not found. Default keyboard map will be used." 580 576 return 581 577 fi … … 601 597 echo "mappath = $mappath" >> $LOGFILE 602 598 if [ ! -e "$mappath" ] || [ -d "$mappath" ] ; then 603 LogIt "Keyboard mapping file not found. Default keyboard map will be used. \n"599 LogIt "Keyboard mapping file not found. Default keyboard map will be used." 604 600 return 605 601 fi … … 639 635 if which lilo.real > /dev/null 2> /dev/null ; then 640 636 LILO_EXE=lilo.real 641 LogIt "lilo.real found; will be used instead of lilo (*grumble* *mutter*) \n"637 LogIt "lilo.real found; will be used instead of lilo (*grumble* *mutter*)" 642 638 else 643 639 LILO_EXE=lilo … … 693 689 fi 694 690 if [ ! -e "$1" ] ; then 695 LogIt "W arning - cannot search specific path '$1'\n"691 LogIt "WARNING - cannot search specific path '$1'" 696 692 return 1 697 693 fi … … 728 724 filelist=`GenerateListForFile "$incoming"` 729 725 r=$? 730 [ "$r" -ne "0" ] && LogIt "$incoming not found \n"726 [ "$r" -ne "0" ] && LogIt "$incoming not found" 731 727 res=$(($res+$r)) 732 728 # echo "'$incoming' generates filelist '$filelist'" >> $LOGFILE … … 835 831 mkdir -p $bigdir/bin 836 832 if [ -e "$MINDI_TMP/post-nuke.tgz" ] ; then 837 LogIt "\nIncorporating post-nuke tarball \n"833 LogIt "\nIncorporating post-nuke tarball" 838 834 old_pwd=`pwd` 839 835 cd $bigdir 840 tar -zxf $MINDI_TMP/post-nuke.tgz || LogIt "Error occurred when untarring post-nuke tarball \n"836 tar -zxf $MINDI_TMP/post-nuke.tgz || LogIt "Error occurred when untarring post-nuke tarball" 841 837 cd $old_pwd 842 838 fi 843 if cp -f $MINDI_TMP/mondo*restore $bigdir/usr/bin ; then839 if cp -f $MINDI_TMP/mondo*restore $bigdir/usr/bin 2>> $LOGFILE ; then 844 840 LocateDeps $bigdir/usr/bin/mondo*restore >> $outfile.pre 845 841 else 846 LogIt "Cannot find mondo*restore in mondo's tempdir, $MINDI_TMP \n"847 LogIt "I bet you've got a spare copy of Mondo or Mindi floating around on your system. \n"842 LogIt "Cannot find mondo*restore in mondo's tempdir, $MINDI_TMP" 843 LogIt "I bet you've got a spare copy of Mondo or Mindi floating around on your system." 848 844 LogIt "If Mindi was called by Mondo then send me a bug report.\n It not, type 'ps ax' to see which Mondo-related process is still running;\n then kill it. :-)\n Finally, run Mindi again." 849 845 Die "Odd." 850 846 fi 851 cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2> /dev/null || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW. \n"847 cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2> /dev/null || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW." 852 848 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then 853 LogIt "Incorporating NFS-related settings \n"849 LogIt "Incorporating NFS-related settings" 854 850 for r in NFS-* ISO-PREFIX ; do 855 cp -f $MINDI_TMP/$r $bigdir/tmp || Die "Cannot copy $r - did you run out of disk space?"851 cp -f $MINDI_TMP/$r $bigdir/tmp 2>> $LOGFILE || Die "Cannot copy $r - did you run out of disk space?" 856 852 echo "Copying $r to ramdisk" >> $LOGFILE 857 853 done … … 936 932 local res currline partition all_partitions ap_orig remaining i j 937 933 938 grep -vx " *#.*" $MY_FSTAB | grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d|| LABEL\=\// && !/fdd|cdr|zip|floppy/ {print $1}'934 grep -vx " *#.*" $MY_FSTAB | grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d||^LABEL\=\/|^UUID=/ && !/fdd|cdr|zip|floppy/ {print $1}' 939 935 [ -e "/etc/raidtab" ] && $AWK '/^ *device/ {print $2}' /etc/raidtab 940 936 return … … 986 982 for fname in $incoming ; do 987 983 if [ ! -e "$fname" ] ; then 988 echo "W arning- $fname does not exist; cannot be LDD'd." >> $LOGFILE984 echo "WARNING - $fname does not exist; cannot be LDD'd." >> $LOGFILE 989 985 if echo $fname | grep lvm &> /dev/null ; then 990 986 echo "This warning only affects you if you are using LVM." >> $LOGFILE … … 1065 1061 /usr/bin/logger -s $1 1066 1062 fi 1067 echo -e n"$1" >> $LOGFILE1063 echo -e "$1" >> $LOGFILE 1068 1064 } 1069 1065 … … 1179 1175 absolute_partition old_partition_fmt current_lvolume 1180 1176 1181 echo "Your raw fstab file looks like this:-" >> $LOGFILE 1177 echo "Your raw fstab file looks like this:" >> $LOGFILE 1178 echo "------------------------------------" >> $LOGFILE 1182 1179 cat $MY_FSTAB >> $LOGFILE 1183 echo "Your mountlist will look like this:-" 1180 echo "Your mountlist will look like this:" | tee -a $LOGFILE 1181 echo "-----------------------------------" >> $LOGFILE 1184 1182 1185 1183 # scratchdir, mountlist(OUT) … … 1201 1199 if [ $LVM != "false" ]; then 1202 1200 echo -en "\rAnalyzing LVM...\r" 1203 all_partitions=`$MINDI_LIB/analyze-my-lvm | grep -F ">>>" | cut -d' ' -f2-32` 1201 $MINDI_LIB/analyze-my-lvm > $MINDI_TMP/lvm.res 1202 if [ $? -ne 0 ]; then 1203 LVM="false" 1204 fi 1205 all_partitions=`cat $MINDI_TMP/lvm.res | grep -F ">>>" | cut -d' ' -f2-32` 1204 1206 fi 1205 1207 all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`" … … 1209 1211 done 1210 1212 [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`" 1211 printf " %-15s %-15s %-15s %-15s %-15s \n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)" LABEL1213 printf " %-15s %-15s %-15s %-15s %-15s %-15s\n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)" LABEL UUID | tee -a $LOGFILE 1212 1214 useless_dev="/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1" 1213 1215 for c_p in $all_partitions ; do … … 1223 1225 [ "$c_p" = "none" ] && continue 1224 1226 redhat_label="" 1227 uuid="" 1225 1228 absolute_partition=`readlink -f $c_p` 1226 1229 partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | /bin/grep -w "$current_partition" | /bin/grep -vx " *#.*" | $AWK '{print $2}' | head -n1` … … 1249 1252 # For LVM FS it will give a /dev/dm-# which should then be converted 1250 1253 if [ $LVM = "v2" ] && [ "`echo $actual_dev | grep '/dev/dm'`" ]; then 1251 major=`/bin/ls -l $actual_dev | awk'{print $5}'`1252 minor=`/bin/ls -l $actual_dev | awk'{print $6}'`1254 major=`/bin/ls -l $actual_dev | $AWK '{print $5}'` 1255 minor=`/bin/ls -l $actual_dev | $AWK '{print $6}'` 1253 1256 for dev in `ls /dev/mapper/*`; do 1254 major1=`/bin/ls -l $dev | awk'{print $5}'`1255 minor1=`/bin/ls -l $dev | awk'{print $6}'`1257 major1=`/bin/ls -l $dev | $AWK '{print $5}'` 1258 minor1=`/bin/ls -l $dev | $AWK '{print $6}'` 1256 1259 if [ $major1 = $major ] && [ $minor1 = $minor ]; then 1257 actual_dev=`/bin/ls -l $dev | awk'{print $10}'`1260 actual_dev=`/bin/ls -l $dev | $AWK '{print $10}'` 1258 1261 break 1259 1262 fi … … 1271 1274 # SWAP only 1272 1275 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then 1273 list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk'{ print $1 }' `1276 list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | $AWK '{ print $1 }' ` 1274 1277 for dev_swap in $list_swaps ; do 1275 1278 dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"` … … 1289 1292 do 1290 1293 # Location of the swap label for kernel 2.6 1291 try_dev_label=`dd bs=1 count=16 skip=1052 if=$try_dev 2> /dev/null`1294 try_dev_label=`dd bs=1 count=16 skip=1052 if=$try_dev &> /dev/null` 1292 1295 if [ "x$try_dev_label" = "x$redhat_label" ]; then 1293 1296 actual_dev=$try_dev … … 1295 1298 done 1296 1299 fi 1300 fi 1301 1302 # This part tries to retrieve the correct device from a UUID line in /etc/fstab 1303 # current_partition contains only first column of /etc/fstab 1304 if [ "`echo "$current_partition" | /bin/grep -i "UUID="`" != "" ]; then 1305 str_to_find_fmt_with=$current_partition 1306 uuid=`echo "$current_partition" | /bin/cut -d'=' -f2` 1307 actual_dev="" 1308 1309 # 1st try, findfs - the RHEL way of finding labels and their partitions 1310 if [ -x "/sbin/findfs" ]; then 1311 actual_dev=`/sbin/findfs UUID=${uuid} 2> /dev/null` 1312 fi 1313 1314 # 2nd try : blkid, the good way for all LABEL except swap 1315 if [ "x$actual_dev" = "x" -a -x "/sbin/blkid" ]; then 1316 actual_dev=`/sbin/blkid | /bin/grep "$uuid" | grep UUID= | /bin/cut -d':' -f1` 1317 # For LVM FS it will give a /dev/dm-# which should then be converted 1318 if [ $LVM = "v2" ] && [ "`echo $actual_dev | grep '/dev/dm'`" ]; then 1319 major=`/bin/ls -l $actual_dev | $AWK '{print $5}'` 1320 minor=`/bin/ls -l $actual_dev | $AWK '{print $6}'` 1321 for dev in `ls /dev/mapper/*`; do 1322 major1=`/bin/ls -l $dev | $AWK '{print $5}'` 1323 minor1=`/bin/ls -l $dev | $AWK '{print $6}'` 1324 if [ $major1 = $major ] && [ $minor1 = $minor ]; then 1325 actual_dev=`/bin/ls -l $dev | $AWK '{print $10}'` 1326 break 1327 fi 1328 done 1329 fi 1330 fi 1331 1332 # 3th try, with vol_id 1333 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then 1334 list_dev=`mount | /bin/grep -E '^/' | $AWK '{ print $1 }' ` 1335 for dev in $list_dev ; do 1336 dev_exists=`/sbin/vol_id $dev | /bin/grep "$uuid"` 1337 if [ "x$dev_exists" != "x" ]; then 1338 actual_dev=$dev 1339 break; 1340 fi 1341 done 1342 fi 1297 1343 1298 1344 # Check if one of all those tries has known success … … 1300 1346 current_partition=$actual_dev 1301 1347 else 1302 Die "Your system uses a labelled partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install findfs|blkid|vol_id\n"1348 Die "Your system uses a UUID partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install findfs|blkid|vol_id" 1303 1349 fi 1304 1350 else … … 1374 1420 partition_mountpt="image" 1375 1421 old_partition_fmt=$partition_format 1376 # partition_format="`$FDISK -l 2>> $LOGFILE | tr -s '\t' ' ' | grep -w "$absolute_partition" | $AWK 'x=$(NF-1}'`"1377 1422 partition_format="`$FDISK -l 2>> $LOGFILE | tr '*' ' ' | tr '+' ' ' | tr -s ' ' '\t' | grep -w "$absolute_partition" | cut -f5`" 1378 echo "------- $FDISK -l log ------------" >> $LOGFILE1379 cat $FDISKLOG >> $LOGFILE1380 echo "------- $FDISK log end ------------" >> $LOGFILE1381 1423 partition_size=$(($partition_size+1)); # just in case 1382 1424 if [ "$partition_format" = "Linux" ] ; then … … 1391 1433 fi 1392 1434 if [ ! "$partition_mountpt" ] ; then 1435 echo "------- $FDISK -l $qq log ------------" >> $LOGFILE 1393 1436 for qq in "" `find /dev/ida/c*d* ! -name '*p*'` ; do 1394 1437 partition_format=`$FDISK -l $qq 2>> $LOGFILE | grep -w "$c_p" | sed 's/12/|/' | tr -s '\t' ' ' | cut -d'|' -f2 | cut -d' ' -f2-9` 1395 echo "------- $FDISK -l $qq log ------------" >> $LOGFILE1396 cat $FDISKLOG >> $LOGFILE1397 echo "------- $FDISK log end ------------" >> $LOGFILE1398 1438 [ "$partition_format" ] && break 1399 1439 done 1440 echo "------- $FDISK log end ------------" >> $LOGFILE 1400 1441 if [ "$partition_format" = "Compaq diagnostics" ] ; then 1401 1442 partition_format="compaq" 1402 1443 elif [ ! "`grep -F device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1403 LogIt "Unable to find mountpoint of $current_partition - ignoring \n"1444 LogIt "Unable to find mountpoint of $current_partition - ignoring" 1404 1445 continue 1405 1446 fi 1406 1447 fi 1407 1448 partition_format="`echo "$partition_format" | cut -d',' -f1`"; # in case user has ext3,ext2 or something dumb like that 1408 [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | awk'{print$5;}'`"; # in case user uses 'auto' (dumb!)1409 unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s \n" $current_partition $partition_mountpt $partition_format $psz`1449 [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | $AWK '{print$5;}'`"; # in case user uses 'auto' (dumb!) 1450 unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s %-15s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" $uuid` 1410 1451 if [ "$current_partition" = "" ] ; then 1411 1452 echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE … … 1414 1455 partition_mountpt=raid 1415 1456 partition_format=raid 1416 printf "\t%-15s %-15s %-15s %7s %-15s \n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label"1417 printf "%s %s %s %s %s \n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label">> $mountlist1457 printf "\t%-15s %-15s %-15s %7s %-15s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" $uuid | tee -a $LOGFILE 1458 printf "%s %s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" $uuid >> $mountlist 1418 1459 else 1419 1460 echo "Unknown mountpoint (outstring = $unofficial_outstring)" >> $LOGFILE … … 1430 1471 partition_format="vfat" 1431 1472 fi 1432 printf "\t%-15s %-15s %-15s %7s %-15s \n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label"1433 printf "%s %s %s %s %s \n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label">> $mountlist1473 printf "\t%-15s %-15s %-15s %7s %-15s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" $uuid | tee -a $LOGFILE 1474 printf "%s %s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" $uuid >> $mountlist 1434 1475 fi 1435 1476 done … … 1491 1532 old_pwd=`pwd` 1492 1533 cd $minidir_root/$old_diskno 1493 cp --parents -Rdf $filename $minidir_root/$d/ || Die "Can't move $filename (sensibly) from $old_diskno to $d"1534 cp --parents -Rdf $filename $minidir_root/$d/ 2>> $LOGFILE || Die "Can't move $filename (sensibly) from $old_diskno to $d" 1494 1535 rm -f $filename 1495 1536 cd $old_pwd … … 1510 1551 data_dev=$3 1511 1552 1512 echo -en "Would you like to create boot+data floppy disks now (y/ n) ?"1553 echo -en "Would you like to create boot+data floppy disks now (y/[n]) ?" 1513 1554 read i 1514 1555 [ "$i" != "y" ] && [ "$i" != "Y" ] && return … … 1536 1577 local i old_pwd 1537 1578 if [ "$PROMPT_MAKE_CD_IMAGE" = "yes" ] && [ ! "`DidMondoCallMe`" ] ; then 1538 echo -en "Shall I make a bootable CD image? (y/ n) "1579 echo -en "Shall I make a bootable CD image? (y/[n]) " 1539 1580 read i 1540 1581 [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0 1541 1582 fi 1542 1583 if [ ! "$MINDI_TMP" ] ; then 1543 LogIt "NB: Mindi's bootable CD always uses isolinux. \n"1544 LogIt "For a bootable CD w/LILO, please use Mondo. \n"1584 LogIt "NB: Mindi's bootable CD always uses isolinux." 1585 LogIt "For a bootable CD w/LILO, please use Mondo." 1545 1586 fi 1546 1587 rm -Rf $MINDI_TMP/iso 1547 1588 mkdir -p $MINDI_TMP/iso/{images,archives,isolinux} 1548 cp -f $1/*.img $1/*.gz $MINDI_TMP/iso/images || LogIt "OfferToMakeBootableISO: Cannot copy $i to $MINDI_TMP/iso/images\n"1589 cp -f $1/*.img $1/*.gz $MINDI_TMP/iso/images 2>> $LOGFILE || LogIt "OfferToMakeBootableISO: Cannot copy $i to $MINDI_TMP/iso/images" 1549 1590 old_pwd=`pwd` 1550 1591 cd $MINDI_TMP/iso … … 1555 1596 k=$MINDI_TMP/iso/isolinux 1556 1597 if [ -e "$j" ] ; then 1557 LogIt "Copying $j to $k \n"1598 LogIt "Copying $j to $k" 1558 1599 cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k" 1559 1600 cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP" … … 1563 1604 MakeSyslinuxMessageFile $MINDI_TMP/iso/isolinux/message.txt 1564 1605 cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/isolinux/vmlinuz). Did you run out of disk space?" 1565 cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 1566 cp $MINDI_TMP/mindi.rdz $CACHE_LOC/initrd.img 1606 cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 2>> $LOGFILE 1607 cp $MINDI_TMP/mindi.rdz $CACHE_LOC/initrd.img 2>> $LOGFILE 1567 1608 [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur" 1568 1609 cd $MINDI_TMP/iso/isolinux … … 1574 1615 if [ "$ARCH" != "ia64" ] ; then 1575 1616 cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to tmp_root - did you run out of disk space?" 1576 cp $ISOLINUX ../ 1617 cp $ISOLINUX ../ 2>> $LOGFILE 1577 1618 fi 1578 1619 cd $MINDI_TMP/iso … … 1580 1621 cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?" 1581 1622 fi 1582 [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun . 1623 [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE 1583 1624 if [ "$ARCH" != "ia64" ] ; then 1584 1625 mkisofs -U -J -r -o $CACHE_LOC/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log … … 1591 1632 echo "mkisofs returned the following errors:-" 1592 1633 cat $MINDI_TMP/mkisofs.log 1593 LogIt "Failed to create ISO image. \n"1634 LogIt "Failed to create ISO image." 1594 1635 else 1595 1636 echo "Created bootable ISO image at $CACHE_LOC/mindi.iso" >> $LOGFILE … … 1646 1687 image=$MINDI_TMP/$rand1.$rand2.img 1647 1688 mtpt=$MINDI_TMP/$rand1.$rand2.mtpt 1648 dd if=/dev/zero of=$image bs=1k count=$disksize 1649 mke2fs -N 26 -F $image > /dev/null1689 dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null 1690 mke2fs -N 26 -F $image &> /dev/null 1650 1691 mkdir -p $mtpt 1651 1692 mount -o loop $image $mtpt 1652 1693 cd $mtpt 1653 1694 mkdir -p {dev,tmp,boot} 1654 cp -f $1 vmlinuz 1695 cp -f $1 vmlinuz 2>> $LOGFILE 1655 1696 if [ "$?" -ne "0" ] ; then 1656 LogIt "Failed to copy $1 to ramdisk \n"1697 LogIt "Failed to copy $1 to ramdisk" 1657 1698 cd $old_pwd 1658 1699 umount $mtpt … … 1666 1707 rdev -r vmlinuz 49152 1667 1708 1668 tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz \n"1709 tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz" 1669 1710 losetup /dev/loop0 > /dev/null 2> /dev/null 1670 [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary. \n"1711 [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary." 1671 1712 CopyBootBFile $mtpt/boot.b 1672 1713 … … 1784 1825 dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file" 1785 1826 if [ "$ARCH" = "ia64" ] ; then 1786 mkdosfs $imagefile > $MINDI_TMP/mke2fs.log 2>> $MINDI_TMP/mke2fs.log 1787 t=vfat 1788 else 1789 mke2fs -N 26 -m 0 -F $imagefile > $MINDI_TMP/mke2fs.log 2>> $MINDI_TMP/mke2fs.log 1790 t=ext2 1791 fi 1792 [ "$?" -ne "0" ] && cat $MINDI_TMP/mke2fs.log 1793 rm -f $MINDI_TMP/mke2fs.log 1794 mount -t $t -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)\n\n" 1795 # copy Mindi's skeleton fs & lilo/syslinux/whatever stuff into it 1827 mkdosfs $imagefile >> $LOGFILE 2>> $LOGFILE 1828 t=vfat 1829 else 1830 mke2fs -N 26 -m 0 -F $imagefile >> $LOGFILE 2>> $LOGFILE 1831 t=ext2 1832 fi 1833 mount -t $t -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)" 1834 # copy Mindi's skeleton fs & lilo/syslinux/whatever stuff into it 1796 1835 mkdir -p $mountpoint/etc 1797 1836 if [ "$ARCH" != "ia64" ] ; then … … 1803 1842 cd $mountpoint 1804 1843 if [ "$ARCH" != "ia64" ] ; then 1805 tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz \n"1844 tar -zxf $MINDI_LIB/dev.tgz || LogIt "Cannot untar dev.tgz" 1806 1845 fi 1807 1846 cd $old_pwd 1808 1847 losetup /dev/loop0 > /dev/null 2> /dev/null 1809 [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary. \n"1848 [ "$?" -eq "0" ] || losetup /dev/loop0 -d || Die "Please free up /dev/loop0 by typing 'losetup /dev/loop0 -d'.\nReboot if necessary." 1810 1849 CopyBootBFile $mountpoint/boot.b 1811 1850 … … 1815 1854 cp -f $MINDI_TMP/mindi.rdz $mountpoint 2>> $LOGFILE 1816 1855 if [ "$?" -ne "0" ] ; then 1817 LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint \n"1856 LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint" 1818 1857 cat $MINDI_TMP/mtpt.$$ >> $LOGFILE 1819 LogIt "Please unload some of your modules and try again. \n"1858 LogIt "Please unload some of your modules and try again." 1820 1859 rm -f $MINDI_TMP/mtpt.$$ 1821 LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?) \n"1860 LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)" 1822 1861 retval=$(($retval+1)) 1823 1862 fi … … 1846 1885 cd $old_pwd 1847 1886 umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)" 1848 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI) \n"1887 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)" 1849 1888 # losetup /dev/loop0 -d 1850 1889 res=0 1851 1890 write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440 1852 1891 res=$(($res+$?)) 1853 cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 1892 cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE 1854 1893 res=$(($res+$?)) 1855 1894 rm -f $imagefile 1856 1895 if [ "$res" -ne "0" ]; then 1857 LogIt "W arning - failed to create 1.44MB boot/root floppies\n"1896 LogIt "WARNING - failed to create 1.44MB boot/root floppies" 1858 1897 rm -f $imagesdir/mindi-*.1440.img 1859 1898 fi … … 1866 1905 # make it bootable 1867 1906 rm -f $mountpoint/zero 1868 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 1907 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE 1869 1908 if [ "$disksize" -gt "2880" ] && [ ! "$KERN_DISK_MADE" ] ; then 1870 1909 if [ "$ARCH" != "ia64" ] ; then … … 1883 1922 if [ $? -ne "0" ] ; then 1884 1923 if [ "`grep -F "/tmp/dev.0" $LOGFILE`" ] ; then 1885 LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's. \n"1886 LogIt "Please reboot your PC as a workaround. \n"1887 Die "LILO sneezed and Mindi caught a cold. Please read the README / FAQ. \n"1924 LogIt "The '/tmp/dev.0' error is NOT Mindi's fault. It is LILO's." 1925 LogIt "Please reboot your PC as a workaround." 1926 Die "LILO sneezed and Mindi caught a cold. Please read the README / FAQ." 1888 1927 fi 1889 1928 echo "$LILO_EXE -r $mountpoint ...failed." 1890 1929 echo -en "Press ENTER to continue."; read line 1891 LogIt "Cannot run lilo on $mountpoint\nPlease upgrade/downgrade your version of LILO. It has a bug. \n"1930 LogIt "Cannot run lilo on $mountpoint\nPlease upgrade/downgrade your version of LILO. It has a bug." 1892 1931 retval=$(($retval+1)) 1893 1932 fi 1894 cp -f $liloconf $MINDI_TMP/lilo.conf 1933 cp -f $liloconf $MINDI_TMP/lilo.conf 2>> $LOGFILE 1895 1934 if [ "$ARCH" = "ia64" ] ; then 1896 cp `dirname $kernelpath`/*.efi $mountpoint 1935 cp `dirname $kernelpath`/*.efi $mountpoint 2>> $LOGFILE 1897 1936 fi 1898 1937 umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)" 1899 1938 echo -en "..." 1900 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI) \n"1939 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)" 1901 1940 if [ "$retval" -eq "0" ] ; then 1902 1941 echo -en "...$DONE\r" … … 1909 1948 rm -f $imagefile 1910 1949 fi 1911 [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero \n"1950 [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero" 1912 1951 return $retval 1913 1952 } … … 1942 1981 else 1943 1982 dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file" 1944 mkfs.vfat $imagefile 1945 syslinux $imagefile 1946 fi 1947 mount -t vfat -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI) \n\n"1983 mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE 1984 syslinux $imagefile >> $LOGFILE 2>> $LOGFILE 1985 fi 1986 mount -t vfat -o loop $imagefile $mountpoint || LogIt "Cannot mount (PBDI)" 1948 1987 1949 1988 # copy Mindi's skeleton fs & lilo/syslinux/whatever stuff into it … … 1961 2000 cp -f $MINDI_TMP/mindi.rdz $mountpoint/initrd.img 2>> $LOGFILE 1962 2001 if [ "$?" -ne "0" ] ; then 1963 LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint \n"2002 LogIt "Failed to copy $MINDI_TMP/mindi.rdz to $mountpoint" 1964 2003 cat $MINDI_TMP/mtpt.$$ >> $LOGFILE 1965 LogIt "Please unload some of your modules and try again. \n"2004 LogIt "Please unload some of your modules and try again." 1966 2005 rm -f $MINDI_TMP/mtpt.$$ 1967 LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?) \n"2006 LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)" 1968 2007 retval=$(($retval+1)) 1969 2008 fi … … 1986 2025 cd $old_pwd 1987 2026 umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)" 1988 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI) \n"2027 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)" 1989 2028 1990 2029 res=0 1991 2030 write_full_floppy_of_kernel $kernelpath $imagesdir/mindi-boot.1440.img 1440 1992 2031 res=$(($res+$?)) 1993 cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2032 cp -f $MINDI_TMP/mindi.rdz $imagesdir/mindi-root.1440.img 2>> $LOGFILE 1994 2033 res=$(($res+$?)) 1995 2034 rm -f $imagefile 1996 2035 if [ "$res" -ne "0" ]; then 1997 LogIt "W arning - failed to create 1.44MB boot/root floppies\n"2036 LogIt "WARNING - failed to create 1.44MB boot/root floppies" 1998 2037 rm -f $imagesdir/mindi-*.1440.img 1999 2038 fi … … 2008 2047 rm -f $mountpoint/zero 2009 2048 mkdir -p $mountpoint/etc 2010 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2049 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE 2011 2050 umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)" 2012 2051 echo -en "..." 2013 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI) \n"2052 rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)" 2014 2053 2015 2054 if [ "$retval" -eq "0" ] ; then … … 2024 2063 rm -f $imagefile 2025 2064 fi 2026 [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero \n"2065 [ "$retval" -ne "0" ] && LogIt "PrepareBootDiskImage() is returning nonzero" 2027 2066 return $retval 2028 2067 } … … 2048 2087 cd $MINDI_TMP 2049 2088 for i in `ListKernelModulePaths | HackPathsToFailsafe` ; do 2050 cp --parents -pRdf ./$i $bigdir || Die "PDDI can't cp $i->$bigdir"2089 cp --parents -pRdf ./$i $bigdir 2>> $LOGFILE || Die "PDDI can't cp $i->$bigdir" 2051 2090 if [ "`du -sk $i | cut -f1`" -lt "$(($CHOPSIZE*2))" ] ; then 2052 cp --parents -pRdf $i $bigdir 2091 cp --parents -pRdf $i $bigdir 2>> $LOGFILE 2053 2092 else 2054 2093 ChopUpAndCopyFile $i $bigdir $CHOPSIZE $BIGNO … … 2058 2097 for i in $EXTRA_MODS ; do 2059 2098 j=`find lib/modules/$FAILSAFE_KVER -name $i.*o 2> /dev/null` 2060 [ ! "$j" ] && echo "W arning- cannot find failsafe module $i.o" >> $LOGFILE2099 [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o" >> $LOGFILE 2061 2100 for k in $j ; do 2062 2101 if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then 2063 cp --parents -pRdf $k $bigdir 2102 cp --parents -pRdf $k $bigdir 2>> $LOGFILE 2064 2103 else 2065 2104 ChopUpAndCopyFile $k $bigdir $CHOPSIZE $BIGNO … … 2090 2129 for i in `mount | cut -d' ' -f3` ; do 2091 2130 for j in io.sys msdos.sys ; do 2092 [ -e "$i/$j" ] && cp -f $i/$j $bigdir 2131 [ -e "$i/$j" ] && cp -f $i/$j $bigdir 2>> $LOGFILE 2093 2132 done 2094 2133 done … … 2097 2136 i=`cat $MINDI_TMP/BOOTLOADER.DEVICE 2> /dev/null` 2098 2137 if [ "$i" ] ; then 2099 LogIt "Backing up $i's MBR \n"2138 LogIt "Backing up $i's MBR" 2100 2139 dd if=$i of=$bigdir/BOOTLOADER.MBR bs=446 count=1 >> $LOGFILE 2>> $LOGFILE 2101 2140 sleep 1 … … 2103 2142 j=$i 2104 2143 [ -h "$j" ] && j=`readlink -f $j` 2105 LogIt "Creating /dev/boot_device ($j) \n"2144 LogIt "Creating /dev/boot_device ($j)" 2106 2145 mkdir -p $bigdir/dev 2107 2146 cp -pRdf $j $bigdir/dev/boot_device 2> /dev/null || Die "Unable to create /dev/boot_device on ramdisk" … … 2112 2151 2113 2152 [ -e "$MINDI_LIB/aux-tools" ] || Die "aux-tools not found in Mindi's home dir. Do you have multiple copies of Mindi lying around? Please delete them. No, don't e-mail me and ask how. ;) Use 'rm'." 2114 cp -Rdf $MINDI_LIB/aux-tools/* . 2>> $LOGFILE || LogIt "W arning - error occurred while unzipping aux-tools\n"2153 cp -Rdf $MINDI_LIB/aux-tools/* . 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping aux-tools" 2115 2154 if [ -e "$MINDI_LIB/x11-tools.tgz" ] ; then 2116 tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "W arning - error occurred while unzipping x11-tools.tgz\n"2155 tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping x11-tools.tgz" 2117 2156 fi 2118 2157 if [ -e "$MONDO_SHARE/restore-scripts" ] ; then … … 2120 2159 [ "$?" -ne "0" ] && [ "`DidMondoCallMe`" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts" 2121 2160 fi 2122 [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2161 [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE 2123 2162 cd $old_pwd 2124 2163 echo -e "$DONE" … … 2135 2174 mkdir -p $minidir_root/$noof_disks/tmp 2136 2175 cp -f $MINDI_TMP/mountlist.txt $minidir_root/$noof_disks/tmp/mountlist.txt 2> /dev/null || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk" 2137 [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2138 [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm 2176 [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE 2177 [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm || LVM="false" 2139 2178 cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE 2140 2179 ZipMinidirsIntoTarballs $minidir_root $tardir $noof_disks … … 2214 2253 return 1 2215 2254 fi 2216 lines_total=`wc -l $orig_file | gawk'{print $1;}'`2255 lines_total=`wc -l $orig_file | $AWK '{print $1;}'` 2217 2256 lines_remaining=$(($lines_total-$lino)) 2218 2257 head -n$(($lino-1)) $orig_file > $new_file … … 2246 2285 fi 2247 2286 # patch from Bill <bill@iwizard.biz> - 2003/08/25 2248 res=`$FDISK -s $device` 2249 echo "------- $FDISK -l $device log ------------" >> $LOGFILE 2250 cat $FDISKLOG >> $LOGFILE 2251 echo "------- $FDISK log end ------------" >> $LOGFILE 2287 res=`$FDISK -s $device 2>> $LOGFILE` 2252 2288 # end patch 2253 2289 [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2` … … 2284 2320 2285 2321 tempfile=$MINDI_TMP/$$.strip.txt 2286 cp -f $1 $tempfile 2322 cp -f $1 $tempfile 2>> $LOGFILE 2287 2323 $AWK '{if (substr($0,0,1)!="#" || substr($0,0,3)=="#!/") {print $0;};}' $tempfile > $1 2288 2324 rm -f $tempfile … … 2316 2352 tmpfile=$MINDI_TMP/stripped.$$.dat 2317 2353 [ -d "$1" ] || [ -h "$1" ] && return 2318 cp -f $1 $tmpfile 2354 cp -f $1 $tmpfile 2>> $LOGFILE 2319 2355 strip $tmpfile 2> /dev/null 2320 2356 if [ "$?" -eq "0" ] ; then 2321 cp -f $tmpfile $1 2357 cp -f $tmpfile $1 2>> $LOGFILE 2322 2358 echo "Stripped binary $2" >> $LOGFILE 2323 2359 fi … … 2376 2412 # Used by ia64 2377 2413 if [ "`gzip -cd $fname | strings 2> /dev/null | grep -F "$kdate"`" = "" ] ; then 2378 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it... \n"2414 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting? Naughty but I'll allow it..." 2379 2415 duff_kernels="$fname $duff_kernels" 2380 2416 else … … 2384 2420 else 2385 2421 if [ "`strings $fname 2> /dev/null | grep -F "$kdate"`" = "" ] ; then 2386 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it... \n"2422 LogIt "Have you recompiled your kernel \"$fname\" w/o rebooting?\n Naughty but I'll allow it..." 2387 2423 duff_kernels="$fname $duff_kernels" 2388 2424 else … … 2396 2432 fi 2397 2433 if [ ! "$possible_kernels" ] ; then 2398 LogIt "No kernel matches exactly. Are there any duff kernels? \n"2434 LogIt "No kernel matches exactly. Are there any duff kernels?" 2399 2435 possible_kernels="$duff_kernels" 2400 2436 if [ ! "$possible_kernels" ] ; then 2401 LogIt "Sorry, no duff kernels either \n"2437 LogIt "Sorry, no duff kernels either" 2402 2438 else 2403 LogIt "I bet you're running Debian or Gentoo, aren't you? \n"2404 LogIt "Your kernel doesn't have a sane builddate. Oh well... \n"2439 LogIt "I bet you're running Debian or Gentoo, aren't you?" 2440 LogIt "Your kernel doesn't have a sane builddate. Oh well..." 2405 2441 fi 2406 2442 fi … … 2408 2444 noof_kernels=`CountItemsIn "$possible_kernels"` 2409 2445 if [ "$noof_kernels" -eq "0" ] ; then 2410 LogIt "Could not find your kernel. \n"2446 LogIt "Could not find your kernel." 2411 2447 if [ -e "/boot/vmlinuz" ] ; then 2412 LogIt "Using /boot/vmlinuz as a last resort. \n"2448 LogIt "Using /boot/vmlinuz as a last resort." 2413 2449 output=/boot/vmlinuz 2414 2450 else … … 2423 2459 if echo $i | grep "`uname -r`" ; then 2424 2460 LogIt "OK, I used my initiative and found that " 2425 LogIt "$i is probably your kernel. \n"2461 LogIt "$i is probably your kernel. " 2426 2462 output="$i" 2427 2463 return … … 2432 2468 echo "Schlomo, this one's for you." >> $LOGFILE 2433 2469 else 2434 LogIt "Two or more possible kernels found. You may specify any one of them and the \n"2435 LogIt "boot disks will still work, probably. If one does not work, try another. \n"2436 LogIt "$possible_kernels \n"2470 LogIt "Two or more possible kernels found. You may specify any one of them and the " 2471 LogIt "boot disks will still work, probably. If one does not work, try another." 2472 LogIt "$possible_kernels" 2437 2473 echo "" 2438 2474 fi … … 2464 2500 if [ -e "dev" ] ; then 2465 2501 echo "Copying dev/* to $minidir_root/$noof_disks" >> $LOGFILE 2466 cp --parents -pRdf dev $minidir_root/$noof_disks 2502 cp --parents -pRdf dev $minidir_root/$noof_disks 2>> $LOGFILE 2467 2503 fi 2468 2504 TemporarilyCompressAllFiles "$list_of_files" $minidir_root … … 2475 2511 fi 2476 2512 if [ "$i" -eq "0" ] ; then 2477 LogIt "Cannot add file $filename to minidir $minidir_root \n"2513 LogIt "Cannot add file $filename to minidir $minidir_root" 2478 2514 retval=$(($retval+1)) 2479 2515 fi … … 2509 2545 echo -en "..." 2510 2546 mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE 2511 2512 [ "$?" -ne "0" ] && cat $MINDI_TMP/mke2fs.log2513 rm -f $MINDI_TMP/mke2fs.log2514 2547 echo -en "..." 2515 2548 mkdir -p $mountpoint … … 2518 2551 old_pwd=`pwd` 2519 2552 cd $mountpoint 2520 cp -Rdf $tgz_dir_fname/* . &>> $LOGFILE2553 cp -Rdf $tgz_dir_fname/* . 2>&1 >> $LOGFILE 2521 2554 tar -zxf symlinks.tgz || Die "Cannot untar symlinks.tgz" 2522 2555 cd dev || Die "Can't cd to dev" … … 2528 2561 s=`which $w 2> /dev/null` 2529 2562 if [ -e "$s" ] ; then 2530 cp --parents -af $s . 2563 cp --parents -af $s . 2>> $LOGFILE 2531 2564 fi 2532 2565 done … … 2581 2614 list_of_groovy_mods="$list_of_groovy_mods $NET_MODS" 2582 2615 fi 2583 [ -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. \n"2616 [ -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." 2584 2617 for i in $list_of_groovy_mods ; do 2585 2618 floppy_modules="$floppy_modules `FindSpecificModuleInPath $floppy_modules_path $i`" … … 2589 2622 [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i 2590 2623 echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE 2591 cp -df $i $mountpoint/ 2>/dev/null || LogIt "Unable to copy $i to $mountpoint \n"2624 cp -df $i $mountpoint/ 2>/dev/null || LogIt "Unable to copy $i to $mountpoint" 2592 2625 [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i` 2593 2626 done … … 2651 2684 diskno=1 2652 2685 while [ "$diskno" -le "$noof_disks" ] ; do 2653 cd $minidir_root/$diskno || LogIt "W arning - cannot cd to $minidir_root/$diskno\n"2686 cd $minidir_root/$diskno || LogIt "WARNING - cannot cd to $minidir_root/$diskno" 2654 2687 tar -cf - . 2>> $LOGFILE | gzip -9 > $tardir/$diskno.tar.gz || Die "Can't tar/gzip disk#$diskno; please tell Dev Team -exactly- what the errors where." 2655 2688 diskno=$(($diskno+1)) 2656 2689 echo -n "..." 2657 cp -pRdf * $minidir_root/all 2690 cp -pRdf * $minidir_root/all 2>> $LOGFILE 2658 2691 done 2659 2692 mkdir -p $minidir_root/all/tmp … … 2663 2696 for q in filelist.full.gz biggielist.txt ; do 2664 2697 [ ! -e "$MINDI_TMP/$q" ] && Die "Cannot find $MINDI_TMP/$q" 2665 cp -pRdf $MINDI_TMP/$q tmp/ 2698 cp -pRdf $MINDI_TMP/$q tmp/ 2>> $LOGFILE 2666 2699 done 2667 2700 mkdir -p $minidir_root/all/tmp … … 2699 2732 2700 2733 if [ -e "/etc/conf.modules" ] && [ ! -e "/etc/modules.conf" ] ; then 2701 LogIt "W arning - Ancient distro detected.\n" 12734 LogIt "WARNING - Ancient distro detected." 1 2702 2735 ln -sf /etc/conf.modules /etc/modules.conf 2703 2736 fi … … 2794 2827 MINDI_TMP=$MONDO_TMP 2795 2828 mkdir -p $MINDI_TMP 2796 FDISKLOG=$MINDI_TMP/parted2fdisk.log2797 2829 CACHE_LOC=$3 2798 2830 if [ _"$CACHE_LOC" != _"" ]; then … … 2806 2838 ### 2807 2839 kernelname=`echo $kernelpath | cut -d'-' -f2-` 2808 LogIt "kernelname = $kernelname \n"2809 LogIt "kernelpath = $kernelpath \n"2840 LogIt "kernelname = $kernelname" 2841 LogIt "kernelpath = $kernelpath" 2810 2842 if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ] 2811 2843 then 2812 LogIt "Module path for ${kernelpath} not found... \n"2813 LogIt "using running kernel\'s modules. \n"2844 LogIt "Module path for ${kernelpath} not found..." 2845 LogIt "using running kernel\'s modules." 2814 2846 kernelname=`uname -r` 2815 2847 else 2816 LogIt "Using modules for kernel: ${kernelname} \n"2848 LogIt "Using modules for kernel: ${kernelname}" 2817 2849 fi 2818 2850 ### … … 2844 2876 [ "$USE_COMP" = "" ] && USE_COMP=yes 2845 2877 [ "$NOT_BOOT" = "" ] && NOT_BOOT=no 2846 [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine. \n"2878 [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine." 2847 2879 [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath` 2848 2880 kernelname=`echo $kernelpath | cut -d'-' -f2-` 2849 2881 if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ] 2850 2882 then 2851 LogIt "Module path for ${kernelpath} not found... \n"2852 LogIt "using running kernel\'s modules. \n"2883 LogIt "Module path for ${kernelpath} not found..." 2884 LogIt "using running kernel\'s modules." 2853 2885 kernelname=`uname -r` 2854 2886 else 2855 LogIt "Using modules for kernel: ${kernelname} \n"2887 LogIt "Using modules for kernel: ${kernelname}" 2856 2888 fi 2857 2889 [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time" … … 2877 2909 fi 2878 2910 2879 2880 2911 [ -e "$iso_cfg_file" ] || Die "Cannot find $iso_cfg_file" 2881 2912 if [ ! "`DidMondoCallMe`" ] ; then 2882 LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION \n"2883 LogIt "Latest Mindi is available from http://www.mondorescue.org \n"2884 LogIt "BusyBox sources are available from http://www.busybox.net \n"2913 LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION" 2914 LogIt "Latest Mindi is available from http://www.mondorescue.org" 2915 LogIt "BusyBox sources are available from http://www.busybox.net" 2885 2916 LogIt "------------------------------------------------------------------------------" 2886 2917 else … … 2900 2931 echo "NOT_BOOT = '$NOT_BOOT'" >> $LOGFILE 2901 2932 if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then 2902 LogIt "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else. \n"2933 LogIt "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else." 2903 2934 MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg 2904 2935 MakeMountlist $MINDI_TMP/mountlist.txt … … 2908 2939 tar -cv tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz" 2909 2940 sleep 2 2910 LogIt "Done. Exiting. \n"2941 LogIt "Done. Exiting." 2911 2942 MindiExit 0 2912 2943 fi … … 2914 2945 if [ "$kernelpath" = "" ] ; then 2915 2946 [ "`DidMondoCallMe`" ] && Die "Please use -k <path> to specify kernel." 2916 if [ $USE_OWN_KERNEL != "yes" ]; then 2917 echo -en "Do you want to use your own kernel to build the boot disk (y/n) ?" 2918 read ch 2919 if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then 2920 USE_OWN_KERNEL="yes" 2921 fi 2947 echo -en "Do you want to use your own kernel to build the boot disk ([y]/n) ?" 2948 read ch 2949 if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then 2950 USE_OWN_KERNEL="yes" 2922 2951 fi 2923 2952 if [ "$USE_OWN_KERNEL" = "yes" ]; then … … 2933 2962 fi 2934 2963 if [ ! "`DidMondoCallMe`" ] ; then 2935 echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot CD/floppies (y/ n) ?"2964 echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot CD/floppies (y/[n]) ?" 2936 2965 read ch 2937 if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then 2966 if [ "$ch" != "y" ] && [ "$ch" != "Y" ] ; then 2967 USE_LILO=no 2968 else 2938 2969 USE_LILO=yes 2939 else2940 USE_LILO=no2941 2970 fi 2942 2971 fi 2943 2972 if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then 2944 2973 kernelpath=$MINDI_LIB/vmlinuz 2945 LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks. \n"2946 LogIt "However, you are still running your kernel. If Mindi fails to create your \n"2947 LogIt "disks then it may still be a result of a problem with your kernel. \n"2974 LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks." 2975 LogIt "However, you are still running your kernel. If Mindi fails to create your" 2976 LogIt "disks then it may still be a result of a problem with your kernel." 2948 2977 pwd=`pwd` 2949 2978 cd $MINDI_TMP … … 2953 2982 fi 2954 2983 echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$CACHE_LOC" >> $LOGFILE 2955 [ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty... \n"2956 2957 [ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it. 2984 [ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty..." 2985 2986 [ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it.\nGo to http://www.mondorescue.org and download it, then install it." 2958 2987 2959 2988 rm -f $CACHE_LOC/{*img,*gz,*iso} … … 2988 3017 else 2989 3018 if ! PrepareBootDiskImage_LILO $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then 2990 LogIt "W arning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"2991 LogIt " if you want to make a 1.72MB floppy disk.\n"3019 LogIt "WARNING - failed to create 1.72MB boot image." 3020 LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk." 2992 3021 fi 2993 3022 if ! PrepareBootDiskImage_LILO $CACHE_LOC 2880 $kernelpath $ramdisk_size ; then 2994 LogIt "Warning - failed to create 2.88MB floppy disk image.\n" 2995 LogIt "Please reduce your kernel's size\n" 2996 LogIt "if you want to make a 2.88MB floppy disk.\n" 3023 LogIt "WARNING - failed to create 2.88MB floppy disk image." 3024 LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk." 2997 3025 PrepareBootDiskImage_LILO $CACHE_LOC 5760 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image." 2998 3026 fi … … 3000 3028 else 3001 3029 if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then 3002 LogIt "W arning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"3003 LogIt " if you want to make a 1.72MB floppy disk.\n"3030 LogIt "WARNING - failed to create 1.72MB boot image." 3031 LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk." 3004 3032 if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 2880 $kernelpath $ramdisk_size ; then 3005 LogIt "Warning - failed to create 2.88MB floppy disk image.\n" 3006 LogIt "Please reduce your kernel's size\n" 3007 LogIt "if you want to make a 2.88MB floppy disk.\n" 3033 LogIt "WARNING - failed to create 2.88MB floppy disk image." 3034 LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk." 3008 3035 PrepareBootDiskImage_SYSLINUX $CACHE_LOC 5760 $kernelpath $ramdisk_size || Die "Failed to create 5.76MB floppy disk image." 3009 3036 fi … … 3024 3051 fi 3025 3052 OfferToMakeBootableISO $CACHE_LOC 3026 LogIt "Finished. \n"3053 LogIt "Finished." 3027 3054 elif [ "$TAPEDEV" ] ; then 3028 3055 rm -f $CACHE_LOC/{*img,*gz,*iso} 3029 3056 OfferToMakeBootableISO $CACHE_LOC 3030 3057 if [ -e "$CACHE_LOC/all.tar.gz" ] ; then 3031 cp -f $CACHE_LOC/all.tar.gz $MINDI_TMP/ 3058 cp -f $CACHE_LOC/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE 3032 3059 else 3033 3060 Die "Cannot find all.tar.gz, to be written to tape" … … 3037 3064 fi 3038 3065 # cleanup 3039 LogIt "$FRIENDLY_OUTSTRING \n"3066 LogIt "$FRIENDLY_OUTSTRING" 3040 3067 for mtpt in $FLOPPY_WAS_MOUNTED ; do 3041 3068 mount $mtpt -
trunk/mondo-doc/mindi.8
r764 r979 138 138 List of files to be included on boot/root disks. 139 139 .TP 140 .I / root/images/mindi/N.tar.gz140 .I /var/cache/mindi/N.tar.gz 141 141 Number N of multiple tar balls together containing root file system for rescue 142 142 media. 143 143 .TP 144 .I / root/images/mindi/all.tar.gz144 .I /var/cache/mindi/all.tar.gz 145 145 Single tar ball of root file system for rescue media. 146 146 .TP 147 .I / root/images/mindi/initrd.img147 .I /var/cache/mindi/initrd.img 148 148 initrd image for bootable ISO image. 149 149 .TP 150 .I / root/images/mindi/mindi-boot.F.img150 .I /var/cache/mindi/mindi-boot.F.img 151 151 .B mindi 152 152 boot floppy of size F [KB]. 153 153 .TP 154 .I / root/images/mindi/mindi-root.F.img154 .I /var/cache/mindi/mindi-root.F.img 155 155 .B mindi 156 156 root floppy of size F [KB]. 157 157 .TP 158 .I / root/images/mindi/mindi-data.N.img158 .I /var/cache/mindi/mindi-data.N.img 159 159 .B mindi 160 160 data floppy number N for boot/root floppies. 161 161 .TP 162 .I / root/images/mindi/mindi.iso162 .I /var/cache/mindi/mindi.iso 163 163 .B mindi 164 164 bootable ISO image. 165 .SH CONFIGURATION FILE 166 You may create a mindi configuration file under 167 .B /etc/mindi 168 called 169 .B mindi.conf 170 which overwrites default values by setting up the following variables: 171 .TP 172 .I TMPDIR 173 .B (default /tmp): directory to create temporary files 174 .br 175 .TP 176 .I EXTRA_SPACE 177 .B (default 24576): increase if you run out of ramdisk space 178 .br 179 .TP 180 .I IA64_BOOT_SIZE 181 .B (default 8192): size of the ia64 boot disk 182 .br 183 .TP 184 .I CACHE_LOC 185 .B (default /var/cache/mindi): directory where boot/root files 186 and iso are generated 187 .br 188 WARNING: This directory is erased before usage 189 .br 165 190 .SH "SEE ALSO" 166 191 mondoarchive(8), mondorestore(8). 167 192 .TP 168 193 See mailing list at http://www.mondorescue.org for technical support. 169 .SH BUGS170 The target location for the image files created by171 .B mindi172 is hard-coded to173 .IR "/root/images/mindi".174 As a workaround, it is suggested to make175 .I /root/images176 a symbolic link to the desired location for the image files.177 194 .SH AUTHORS 178 195 Bruno Cornec (lead-development) -
trunk/mondo-doc/mondorescue-howto.sgml
r932 r979 1178 1178 1440+0 enregistrements écrits. 1179 1179 mke2fs 1.38 (30-Jun-2005) 1180 cp: écriture de `vmlinuz': Aucun espace disponible sur le périphérique1181 1180 Failed to copy /boot/vmlinuz-2.6.12-15mdk-i686-up-4GB to ramdisk 1182 1181 -
trunk/mondo/src/common/libmondo-devices.c
r914 r979 1462 1462 bkpinfo->use_lzo = 1463 1463 (bkpinfo->backup_media_type == cdstream) ? TRUE : FALSE; 1464 1465 /*1466 if (find_home_of_exe("star") && (!find_home_of_exe("afio") || find_home_of_exe("selinuxenabled")))1467 {1468 bkpinfo->use_star = FALSE;1469 bkpinfo->use_lzo = FALSE;1470 log_to_screen("Using star, not afio");1471 if (!find_home_of_exe("afio"))1472 { log_to_screen("...because afio not found"); }1473 if (find_home_of_exe("selinuxenabled"))1474 { log_to_screen("...because SELINUX found"); }1475 }1476 */1477 1478 1464 mvaddstr_and_log_it(2, 0, " "); 1479 1465 -
trunk/mondo/src/common/libmondo-stream.c
r956 r979 346 346 int res = 0; 347 347 int retval = 0; 348 char *fname = (char *)&res; /* Should NOT be NULL */348 char *fname = (char *)&res; /* Should NOT be NULL */ 349 349 350 350 // xattr
Note:
See TracChangeset
for help on using the changeset viewer.