Changeset 618 in MondoRescue for trunk/mindi
- Timestamp:
- Jun 3, 2006, 12:16:18 AM (18 years ago)
- Location:
- trunk/mindi
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/ChangeLog
r588 r618 3 3 MINDI CHANGES 4 4 5 1.0.8 (2006-05-25) 5 1.0.8-2 (2006-06-02) 6 - Fix bugs in the swap+LABEL code found on rhel4 7 (Peter Naber/Bruno Cornec) 8 - PXE mode now supports change of NIC for redeployment 9 (Bruno Cornec) 10 11 1.0.8-1 (2006-05-25) 6 12 - new build process (Bruno Cornec) 7 13 - Fix a bug when a disk less than 2.8 MB can be built, to -
trunk/mindi/README.pxe
r588 r618 1 $Id$ 2 1 3 README for mondo/mindi usage with PXE 2 4 … … 9 11 label mondo 10 12 kernel vmlinuz-mondo 11 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=36864 rw root=/dev/ram iso_mode acpi=off apm=off devfs=nomount exec-shield=0 pxe [prefix="machine"] [ipconf=(ipadr:netmask:broadcast:gateway|dhcp)] [ping=#] ... 13 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=36864 rw root=/dev/ram iso_mode acpi=off apm=off devfs=nomount exec-shield=0 pxe [prefix="machine"] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [ping=#] ... 14 15 ipdev is the device name (e.g. eth2) 16 ipadr is the IP Address (e.g. 192.168.1.1) 17 netmask is the Netmask (e.g. 255.255.255.0) 18 broadcast is the Network broadcast (e.g. 192.168.1.255) 19 gateway is the default gateway (e.g. 192.168.1.254) 20 dhcp is a keyword. Using it will provide all the previous 4 values to activate the LAN interface. 12 21 13 22 The initrd and kernel file come rom the first bootable media … … 25 34 Without prefix keyword, the name of the images used during archiving with the -p option will be used (they may differ). If -p wasn't used then the name mondorescue-1.iso, ... will be used. 26 35 27 During boot mondorestore will start your NFS configuration and mount mondo's content from the network rather than from a physical media. You may alter the IP configuration stored from the original machine by passing the ipconf option describing respectively the IP address, netmask, broadcast and default gateway you want to setup for the machine, separated by ':'. Or alternatively, you may specify the dhcp keyword so that a D hCP request is made to get those information. On some configurations, you may also want to increase the number of ping queries made before the NFS mount, which is of 3 by default, using the ping option and give the number you want.36 During boot mondorestore will start your NFS configuration and mount mondo's content from the network rather than from a physical media. You may alter the IP configuration stored from the original machine by passing the ipconf option describing respectively the IP address, netmask, broadcast and default gateway you want to setup for the machine, separated by ':'. Or alternatively, you may specify the dhcp keyword so that a DHCP request is made to get those information. In the 2 cases, you have to mention on which physical interface those parameters should apply. On some configurations, you may also want to increase the number of ping queries made before the NFS mount, which is of 3 by default, using the ping option and give the number you want. 28 37 29 38 Please report any problem around that tool to bruno@mondorescue.org 30 39 40 2006-06-02 ipdev added to allow redeployment on another interface 31 41 2005-12-18 new ipconf and ping option 32 42 2005-12-14 detailed explanations on where to find initrd and kernel -
trunk/mindi/mindi
r588 r618 1366 1366 1367 1367 if [ -d "/proc/lvm" ] || [ -d "/dev/mapper" ]; then 1368 echo -en "\rAnalyzing LVM...\r"1369 all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32`1368 echo -en "\rAnalyzing LVM...\r" 1369 all_partitions=`$MINDI_LIB/analyze-my-lvm | fgrep ">>>" | cut -d' ' -f2-32` 1370 1370 fi 1371 1371 all_partitions="$all_partitions `ListAllPartitions 2> /dev/null`" … … 1378 1378 for c_p in $all_partitions ; do 1379 1379 # echo "c_p = $c_p" > /dev/stderr 1380 [ "`echo "/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" | fgrep "$c_p"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/scd"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/ram"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | fgrep ":/"`" != "" ] && continue1380 [ "`echo "/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" | fgrep "$c_p"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/scd"`" != "" ] || [ "`echo "$c_p" | fgrep "/dev/ram"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | fgrep ":/"`" != "" ] && continue 1381 1381 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$c_p"`" ] && continue 1382 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue1383 if [ -h "$c_p" ] && [ "`echo "$c_p" | fgrep "/dev/hd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/sd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/md"`" = "" ] ; then1384 current_partition=`ResolveSoftlink $c_p`1385 [ "`echo "$current_partition" | fgrep "/dev/mapper"`" != "" ] && current_partition="$c_p"1386 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$current_partition"`" ] && continue1387 else1388 current_partition="$c_p"1389 fi1390 [ "$c_p" = "none" ] && continue1391 absolute_partition=`ResolveSoftlink $c_p`1392 partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | /bin/grep -w "$current_partition" | /bin/grep -vx " *#.*" | $AWK '{print $2}' | head -n1`1393 1394 # This part tries to retrieve the correct device from a LABEL line in /etc/fstab1395 # current_partition contains only first column of /etc/fstab1396 if [ "`echo "$current_partition" | /bin/grep -f -i "LABEL="`" != "" ]; then1397 str_to_find_fmt_with=$current_partition1398 redhat_label=`echo "$current_partition" | /bin/cut -d'=' -f2`1399 actual_dev=""1400 1382 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue 1383 if [ -h "$c_p" ] && [ "`echo "$c_p" | fgrep "/dev/hd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/sd"`" = "" ] && [ "`echo "$c_p" | fgrep "/dev/md"`" = "" ] ; then 1384 current_partition=`ResolveSoftlink $c_p` 1385 [ "`echo "$current_partition" | fgrep "/dev/mapper"`" != "" ] && current_partition="$c_p" 1386 [ "`echo "/dev/scd0 /dev/scd1 /dev/sr0 /dev/sr1 /dev/cdrom /dev/cdrom1" | fgrep "$current_partition"`" ] && continue 1387 else 1388 current_partition="$c_p" 1389 fi 1390 [ "$c_p" = "none" ] && continue 1391 absolute_partition=`ResolveSoftlink $c_p` 1392 partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | /bin/grep -w "$current_partition" | /bin/grep -vx " *#.*" | $AWK '{print $2}' | head -n1` 1393 1394 # This part tries to retrieve the correct device from a LABEL line in /etc/fstab 1395 # current_partition contains only first column of /etc/fstab 1396 if [ "`echo "$current_partition" | /bin/grep -i "LABEL="`" != "" ]; then 1397 str_to_find_fmt_with=$current_partition 1398 redhat_label=`echo "$current_partition" | /bin/cut -d'=' -f2` 1399 actual_dev="" 1400 1401 1401 # 1st try : blkid, the good way 1402 if [ -x "/sbin/blkid" ] 1402 if [ -x "/sbin/blkid" ]; then 1403 1403 actual_dev=`/sbin/blkid | /bin/grep "$current_partition" | /bin/cut -d':' -f1` 1404 1404 fi 1405 1405 1406 1406 # 2nd try, which works on a standard partition (ext2/3), but not on swap 1407 if [ "x$actual_dev" = "x" ] 1408 actual_dev=`/bin/mount -l | /bin/grep " [$redhat_label]" | /bin/cut -d' ' -f1`1407 if [ "x$actual_dev" = "x" ]; then 1408 actual_dev=`/bin/mount -l | /bin/grep "\[$redhat_label\]" | /bin/cut -d' ' -f1` 1409 1409 fi 1410 1410 1411 1411 # 3rd try, with vol_id (which works with swap) 1412 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ] 1412 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ]; then 1413 1413 list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' ` 1414 1414 for dev_swap in $list_swaps ; do 1415 1415 dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"` 1416 if [ "x$dev_exists" != "x" ] 1416 if [ "x$dev_exists" != "x" ]; then 1417 1417 actual_dev=$dev_swap 1418 1418 break; … … 1422 1422 1423 1423 # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5 1424 if [ "x$actual_dev" = "x" -a "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""]; then1424 if [ "x$actual_dev" = "x" -a _"`echo $current_partition | /bin/grep -i 'LABEL=SWAP'`" != _"" ]; then 1425 1425 try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`" 1426 1426 present_dev="`/bin/cat /proc/swaps | /bin/grep -w /dev/$try_dev`" … … 1431 1431 1432 1432 # Check if one of all those tries has known success 1433 if [ "x$actual_dev" != "x" ] 1433 if [ "x$actual_dev" != "x" ]; then 1434 1434 current_partition=$actual_dev 1435 1435 else … … 1441 1441 1442 1442 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB` 1443 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ] 1443 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ]; then 1444 1444 partition_size="lvm" 1445 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_partition 2> /dev/null`" ] 1445 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then 1446 1446 partition_size="lvm" 1447 1447 else
Note:
See TracChangeset
for help on using the changeset viewer.