Changeset 2887 in MondoRescue for branches/2.2.9/mindi
- Timestamp:
- Oct 9, 2011, 1:03:19 PM (14 years ago)
- Location:
- branches/2.2.9/mindi
- Files:
-
- 3 edited
-
README.pxe (modified) (3 diffs)
-
mindi (modified) (1 diff)
-
rootfs/sbin/start-netfs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi/README.pxe
r2498 r2887 11 11 label mondo 12 12 kernel vmlinuz-mondo 13 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs] [prefix=machine] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [ netfsmount=server:mountpoint] [netfsopt=-o option][netfspath=local_path] [ping=#] ...13 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs] [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=#] ... 14 14 15 15 ipdev is the device name (e.g. eth2) … … 19 19 gateway is the default gateway (e.g. 192.168.1.254) 20 20 dhcp is a keyword. Using it will provide all the previous 4 values to activate the LAN interface. 21 hwaddr is the MAC address of the device you want to use to restore through 21 22 proto is the protocol to use for mounting the remote share (default is NFS, sshfs is also available) 22 23 server is the ip addr of the Remote Network server … … 48 49 CAVEAT: the limit to the number of char on the append line is 255. Use symlinks to reduce the size of your path if needed. 49 50 50 Please report any problem around that tool to bruno @mondorescue.org51 Please report any problem around that tool to bruno_at_mondorescue.org 51 52 53 2011-10-09 adds support for hwaddr 52 54 2009-12-05 nfsopt added tp allow for custom options at mount time 53 55 2009-09-09 Changed to netfs for multi protocol support (nfs, sshfs, ...) -
branches/2.2.9/mindi/mindi
r2883 r2887 991 991 AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-NETMASK netfs-client-netmask $outfile 992 992 AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-BROADCAST netfs-client-broadcast $outfile 993 AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-HWADDR netfs-client-hwaddr $outfile 993 994 AddFileToCfgIfExists $MINDI_TMP/NETFS-CLIENT-DEFGW netfs-client-defgw $outfile 994 995 AddFileToCfgIfExists $MINDI_TMP/NETFS-SERVER-MOUNT netfs-server-mount $outfile -
branches/2.2.9/mindi/rootfs/sbin/start-netfs
r2709 r2887 12 12 # Get info from config file 13 13 ipdev=`grep netfs-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 14 hwaddr=`grep netfs-client-hwaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 14 15 ipaddress=`grep netfs-client-ipaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` 15 16 ipnetmask=`grep netfs-client-netmask /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-` … … 33 34 for i in `cat /proc/cmdline` ; do 34 35 echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2` 36 echo $i | grep -qi hwaddr= && hwaddr=`echo $i | cut -d= -f2` 35 37 echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2` 36 38 echo $i | grep -qi netfsmount= && export netfsmount=`echo $i | cut -d= -f2` … … 64 66 ipgateway=`echo $ipconf | cut -d: -f5` 65 67 fi 68 69 # If same system, map to the right MAC address 70 hwaddr_found=`ifconfig $ipdev | /bin/grep HWaddr | awk '{print $NF}'` 71 if [ "$hwaddr" != "$hwaddr_found" ]; then 72 ipdev_new=`ifconfig -a | /bin/grep $hwaddr | awk '{print $1}'` 73 if [ "$ipdev_new" != "" ]; then 74 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)" 75 ipdev=$ipdev_new 76 else 77 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address" 78 fi 79 fi 80 66 81 LogIt "Configuring $ipdev statically ($ipaddress/$ipnetmask)" 67 82 ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast 68 83 route add default gw $ipgateway 84 69 85 fi 86 87 # Leave time to the satck to wake up (reported by some users) 88 sleep 5 70 89 71 90 # ping server helps waking interface up
Note:
See TracChangeset
for help on using the changeset viewer.
