Changeset 234 in MondoRescue
- Timestamp:
- Dec 18, 2005, 12:36:51 AM (19 years ago)
- Location:
- branches/2.05
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.05/mindi/README.pxe
r204 r234 9 9 mondo 10 10 kernel vmlinuz-mondo 11 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"] ...11 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=#] ... 12 12 13 13 The initrd and kernel file come rom the first bootable media … … 25 25 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 26 27 During boot mondorestore will start your NFS configuration and mount mondo's content from the network rather than from a physical media. 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. 28 28 29 29 Please report any problem around that tool to bcornec@users.berlios.de 30 30 31 2005-12-18 new ipconf and ping option 31 32 2005-12-14 detailed explanations on where to find initrd and kernel -
branches/2.05/mondo/mondo/common/libmondo-files.c
r222 r234 1243 1243 fatal_error("Cannot store NFS config"); 1244 1244 } 1245 fprintf(fout, "#!/bin/sh\n"); 1246 fprintf(fout, "# number of ping\n"); 1247 fprintf(fout, "ipcount=3\n"); 1248 fprintf(fout, "for i in `cat /proc/cmdline` ; do\n"); 1249 fprintf(fout, " echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2`\n"); 1250 fprintf(fout, "done\n"); 1245 1251 fprintf(fout, "ifconfig lo 127.0.0.1 # config loopback\n"); 1246 fprintf(fout, "ifconfig %s %s netmask %s broadcast %s # config client\n", nfs_dev, 1247 nfs_client_ipaddr, nfs_client_netmask, nfs_client_broadcast); 1248 fprintf(fout, "route add default gw %s # default route\n", nfs_client_defgw); 1249 fprintf(fout, "ping -c 1 %s # ping server\n", nfs_server_ipaddr); 1252 fprintf(fout, "ipaddress=%s\n", nfs_client_ipaddr); 1253 fprintf(fout, "ipnetmask=%s\n", nfs_client_netmask); 1254 fprintf(fout, "ipbroadcast=%s\n", nfs_client_broadcast); 1255 fprintf(fout, "ipgateway=%s\n", nfs_client_defgw); 1256 fprintf(fout, "ipconf=\n"); 1257 fprintf(fout, "for i in `cat /proc/cmdline` ; do\n"); 1258 fprintf(fout, " echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`\n"); 1259 fprintf(fout, "done\n"); 1260 fprintf(fout, "if [ \"$ipconf\" = \"dhcp\" ]; then\n"); 1261 fprintf(fout, " udhcpc -i %s\n", nfs_dev); 1262 fprintf(fout, "else\n"); 1263 fprintf(fout, " if [ \"$ipconf\" != \"\" ]; then\n"); 1264 fprintf(fout, " ipaddress=`echo $ipconf | cut -d: -f1`\n"); 1265 fprintf(fout, " ipnetmask=`echo $ipconf | cut -d: -f2`\n"); 1266 fprintf(fout, " ipbroadcast=`echo $ipconf | cut -d: -f3`\n"); 1267 fprintf(fout, " ipgateway=`echo $ipconf | cut -d: -f4`\n"); 1268 fprintf(fout, " fi\n"); 1269 fprintf(fout, " ifconfig %s $ipaddress netmask $ipnetmask broadcast $ipbroadcast\n", nfs_dev); 1270 fprintf(fout, " route add default gw $ipgateway\n"); 1271 fprintf(fout, "fi\n"); 1272 fprintf(fout, "ping -c $ipcount %s # ping server\n", nfs_server_ipaddr); 1250 1273 fprintf(fout, "mount -t nfs -o nolock %s /tmp/isodir\n", 1251 1274 bkpinfo->nfs_mount); 1252 fprintf(fout, "exit 0\n");1253 1275 paranoid_fclose(fout); 1254 1276 chmod(outfile, 0777);
Note:
See TracChangeset
for help on using the changeset viewer.