Changeset 663 in MondoRescue


Ignore:
Timestamp:
Jun 10, 2006, 10:36:03 AM (18 years ago)
Author:
bcornec
Message:

nfsmount parameter added to allow redeployment from another NFS server (in PXE m
ode)

Location:
branches/2.0.8
Files:
2 edited

Legend:

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

    r611 r663  
    1111label mondo
    1212        kernel vmlinuz-mondo
    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=#] ...
     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)] [nfsmount=server:mountpoint] [ping=#] ...
    1414
    1515ipdev is the device name (e.g. eth2)
     
    1919gateway is the default gateway (e.g. 192.168.1.254)
    2020dhcp is a keyword. Using it will provide all the previous 4 values to activate the LAN interface.
     21server is the ip addr of the NFS server
     22mountpoint is the mount point on the NFS server to use (should be in /etc/exports of the NFS server)
    2123
    2224The initrd and kernel file come rom the first bootable media
     
    3436Without 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.
    3537
    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.
     38During 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. If you have a different NFS server for the deployment than for the archiving, you can also precise it through the nfsmount option. The structure on both server under the mountpoint has to be the same.
    3739
    3840Please report any problem around that tool to bruno@mondorescue.org
    3941
     422006-06-10 nfsmount added to allow redeployment from another NFS server
    40432006-06-02 ipdev added to allow redeployment on another interface
    41442005-12-18 new ipconf and ping option
  • branches/2.0.8/mondo/mondo/common/libmondo-files.c

    r654 r663  
    12851285    fprintf(fout, "ipgateway=%s\n", nfs_client_defgw);
    12861286    fprintf(fout, "ipconf=\n");
     1287    fprintf(fout, "nfsmount=%s\n", bkpinfo->nfs_mount);
    12871288    fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");
    12881289    fprintf(fout, "    echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`\n");
     1290    fprintf(fout, "    echo $i | grep -qi nfsmount= && nfsmount=`echo $i | cut -d= -f2`\n");
    12891291    fprintf(fout, "done\n");
     1292    fprintf(fout, "nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1`\n");
    12901293    fprintf(fout, "echo \"$ipconf\" | grep -q \"dhcp\"\n");
    12911294    fprintf(fout, "if [ $? -eq 0 ]; then\n");
     
    13041307    fprintf(fout, "    route add default gw $ipgateway\n");
    13051308    fprintf(fout, "fi\n");
    1306     fprintf(fout, "ping -c $ipcount %s  # ping server\n", nfs_server_ipaddr);
    1307     fprintf(fout, "mount -t nfs -o nolock %s /tmp/isodir\n",
    1308             bkpinfo->nfs_mount);
     1309    fprintf(fout, "ping -c $ipcount $nfs_server_ipaddr # ping server\n");
     1310    fprintf(fout, "mount -t nfs -o nolock $nfsmount /tmp/isodir\n");
    13091311    paranoid_fclose(fout);
    13101312    chmod(outfile, 0777);
Note: See TracChangeset for help on using the changeset viewer.