IPXE远程运行sysrecuecd系统

既然用到ipxe,就试试远程运行systemrecuecd。万一系统出毛病,可以用来恢复或者急救。

下载cd

1wget http://downloads.sourceforge.net/project/systemrescuecd/sysresccd-x86/4.7.3/systemrescuecd-x86-4.7.3.iso  

装进 http://172.168.8.1/ks/sysrcd目录中

1mount -o loop systemrescuecd-x86-4.7.3.iso /mnt/iso  
2mkdir -p /var/www/html/ks/sysrcd  
3cp -r /mnt/iso/* /var/www/html/ks/sysrcd  

重头戏,依然按前面的方法修改boot2.php即可

 1  case '\ec:f4:bb:d9:96:40':
 2    $ip="172.16.36.2:172.16.37.254:255.255.254.0:myhost-16-36-2";
 3    $ipa=explode(':',$ip);
 4    echo "ifopen net0\n";
 5    echo "set net0/ip $ipa[0]\n";
 6    echo "set net0/netmask $ipa[2]\n";
 7    echo "set net0/gateway $ipa[1]\n";
 8    echo "set net0/dns $dns\n";
 9    echo "set base-url http://172.16.8.1/ks/sysrcd\n";
10    echo "kernel \${base-url}/isolinux/rescue32 netboot=\${base-url}/sysrcd.dat nodhcp eth0=172.16.36.2/23 dns=172.16.8.1 gateway=172.16.37.254 rootpass=xxxxxxxx vncserver=1:password nameif=eth0:ec:f4:bb:d9:96:40\n";
11    echo "initrd ${base-url}/isolinux/initram.igz\n";
12    echo "boot\n";
13    break;

注意上面,静态ip的设置部分,还有同时设置了sshd和vncserver,方便远程操作。


用IPXE启动个Ubuntu桌面
IPXE万能工具hiren.iso的启动方式
comments powered by Disqus