Changeset 3168 in MondoRescue


Ignore:
Timestamp:
Jul 26, 2013, 8:50:01 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • Fix #697 by adding the iproute parameter at boot time to support addition of static routes
Location:
branches/3.0/mindi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/README.bootparam

    r3134 r3168  
    8383-----------------
    8484
    85 Look also at README.pxe for additional parameters linked to the PXE/NFS usage
     85Look also at README.pxe for additional parameters linked to the PXE/Network usage
  • branches/3.0/mindi/README.pxe

    r3111 r3168  
    1111label mondo
    1212        kernel vmlinuz-mondo
    13         append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 selinux=0 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs|smbfs] [prefix=machine] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [hwaddr=M:A:C:A:D:R] [netfsmount=server:mountpoint] [netfsopt=-o option][netfspath=local_path] [ping=#] ...
     13        append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 selinux=0 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs|smbfs] [prefix=machine] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [hwaddr=M:A:C:A:D:R] [netfsmount=server:mountpoint] [netfsopt=-o option][netfspath=local_path] [ping=#] [iproute=-net:netdest:[netmask:Nm]gw:GW] ...
    1414
    1515ipdev is the device name (e.g. eth2)
     
    1818broadcast is the Network broadcast (e.g. 192.168.1.255)
    1919gateway is the default gateway (e.g. 192.168.1.254)
     20iproute is an additional static route using the route add syntax using : nstead of space to separate values
    2021dhcp is a keyword. Using it will provide all the previous 4 values to activate the LAN interface.
    2122hwaddr is the MAC address of the device you want to use to restore through
     
    2728netfspath is the local path on the remote server where the image is located, if different from the one at backup time.
    2829local_path is the local directory under which the mage was made (with the -d option)
    29 rmadisk_size may have to be increase to 262144 or more on more recent distributions such as RHEL 6
     30ramdisk_size may have to be increase to 262144 or more on more recent distributions such as RHEL 6
    3031The [] mean this parameter is optional
    3132The () mean that you have a choice with the '|' meaning 'or'
     
    5354Please report any problem around that tool to bruno_at_mondorescue.org
    5455
     562013-07-25 adds support for iproute
    55572011-10-09 adds support for hwaddr
    56582009-12-05 nfsopt added tp allow for custom options at mount time
  • branches/3.0/mindi/rootfs/sbin/start-netfs

    r3111 r3168  
    1818ipgateway=`grep netfs-client-defgw /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    1919proto=`grep netfs-proto /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     20iptoute=`grep netfs-route /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    2021ipconf=""
    2122pre=""
     
    4344    echo $i | grep -qi post= && post=`echo $i | cut -d= -f2`
    4445    echo $i | grep -qi proto= && proto=`echo $i | cut -d= -f2`
     46    echo $i | grep -qi iproute= && iproute=`echo $i | cut -d= -f2`
    4547done
    4648
     
    8587    fi
    8688
    87     # Leave time to the satck to wake up (reported by some users)
     89    # Leave time to the stack to wake up (reported by some users)
    8890    sleep 5
     91
     92    # Handle a potential static route
     93    if [ _"$iproute" != _"" ]; then
     94        iproute=`echo $iproute | perl -pi -e 's|:| |g'`
     95        LogIt "Adding static route with route add $iproute"
     96        route add $iproute
     97    fi
    8998
    9099    # ping server helps waking interface up
Note: See TracChangeset for help on using the changeset viewer.