Changeset 610 in MondoRescue for branches/stable


Ignore:
Timestamp:
Jun 2, 2006, 11:45:53 PM (18 years ago)
Author:
bcornec
Message:

CAUTION: This patch breaks the PXE interface through the ipconf option
It adds thepossibility to precise the NIC name through ipconf as first parameter.

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/README.pxe

    r569 r610  
     1$Id$
     2
    13README for mondo/mindi usage with PXE
    24
     
    911label mondo
    1012        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
     15ipdev is the device name (e.g. eth2)
     16ipadr is the IP Address (e.g. 192.168.1.1)
     17netmask is the Netmask (e.g. 255.255.255.0)
     18broadcast is the Network broadcast (e.g. 192.168.1.255)
     19gateway is the default gateway (e.g. 192.168.1.254)
     20dhcp is a keyword. Using it will provide all the previous 4 values to activate the LAN interface.
    1221
    1322The initrd and kernel file come rom the first bootable media
     
    2534Without 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.
    2635
    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 DhCP 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.
     36During 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.
    2837
    2938Please report any problem around that tool to bruno@mondorescue.org
    3039
     402006-06-02 ipdev added to allow redeployment on another interface
    31412005-12-18 new ipconf and ping option
    32422005-12-14 detailed explanations on where to find initrd and kernel
  • branches/stable/mondo/mondo/common/libmondo-files.c

    r541 r610  
    12791279    fprintf(fout, "done\n");
    12801280    fprintf(fout, "ifconfig lo 127.0.0.1  # config loopback\n");
     1281    fprintf(fout, "ipdev=%s\n", nfs_dev);
    12811282    fprintf(fout, "ipaddress=%s\n", nfs_client_ipaddr);
    12821283    fprintf(fout, "ipnetmask=%s\n", nfs_client_netmask);
     
    12871288    fprintf(fout, "    echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`\n");
    12881289    fprintf(fout, "done\n");
    1289     fprintf(fout, "if [ \"$ipconf\" = \"dhcp\" ]; then\n");
    1290     fprintf(fout, "    udhcpc -i %s\n", nfs_dev);
     1290    fprintf(fout, "grep -q \"dhcp\" \"$ipconf\"\n");
     1291    fprintf(fout, "if [ $? = 0 ]; then\n");
     1292    fprintf(fout, "    ipdev=`echo $ipconf | cut -d: -f1`\n");
     1293    fprintf(fout, "    udhcpc -i $ipdev\n", );
    12911294    fprintf(fout, "else\n");
    12921295    fprintf(fout, "    if [ \"$ipconf\" != \"\" ]; then\n");
    1293     fprintf(fout, "        ipaddress=`echo $ipconf | cut -d: -f1`\n");
    1294     fprintf(fout, "        ipnetmask=`echo $ipconf | cut -d: -f2`\n");
    1295     fprintf(fout, "        ipbroadcast=`echo $ipconf | cut -d: -f3`\n");
    1296     fprintf(fout, "        ipgateway=`echo $ipconf | cut -d: -f4`\n");
     1296    fprintf(fout, "        ipdev=`echo $ipconf | cut -d: -f1`\n");
     1297    fprintf(fout, "        ipaddress=`echo $ipconf | cut -d: -f2`\n");
     1298    fprintf(fout, "        ipnetmask=`echo $ipconf | cut -d: -f3`\n");
     1299    fprintf(fout, "        ipbroadcast=`echo $ipconf | cut -d: -f4`\n");
     1300    fprintf(fout, "        ipgateway=`echo $ipconf | cut -d: -f5`\n");
    12971301    fprintf(fout, "    fi\n");
    1298     fprintf(fout, "    ifconfig %s $ipaddress netmask $ipnetmask broadcast $ipbroadcast\n", nfs_dev);
     1302    fprintf(fout, "    ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast\n");
    12991303    fprintf(fout, "    route add default gw $ipgateway\n");
    13001304    fprintf(fout, "fi\n");
Note: See TracChangeset for help on using the changeset viewer.