注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

红烧鱼

linux & windows management

 
 
 

日志

 
 
关于我
mac

专注IT基础架构设计与运维。 欢迎给我留言,或邮件沟通zjwsk@163.com

网易考拉推荐

use iPXE install windows and linux  

2014-11-18 19:15:54|  分类: Server Managemen |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

-- by Mac.j

1. tftp server config.
   download iPXE boot file (
http://boot.ipxe.org/undionly.kpxe). put to tftp root directory, such /var/lib/tftpboot


2. DHCP server config.
   use below code add to /etc/dhcpd.conf,

class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
 next-server 192.168.5.21;
 if exists user-class and option user-class = "iPXE" {
 filename "
http://my.web.server/boot.ipxe";
 } else {
 filename "undionly.kpxe";
}


3. web server config for windows install.
in my lab, I can use this install windows 2008,2012, even windows 2003 :)
3.1 install Windows Assessment and Deployment Toolkit (ADK)
   (
http://www.microsoft.com/download/details.aspx?id=30652)

3.2 use Windows ADK, Deployment and Imaging Tools Environment.
    This should open a command prompt window. Create 32-bit and 64-bit versions of Windows PE:

    mkdir C:\temp\winpe
    copype x86 C:\temp\winpe\x86
    copype amd64 C:\temp\winpe\amd64

3.3 Copy the contents of C:\temp\winpe to a directory on your web server (e.g. /var/www/winpe for Apache, or C:\inetpub\wwwroot\winpe for IIS).


3.4 Download the latest version of wimboot(http://git.ipxe.org/releases/wimboot/wimboot-latest.zip) ,extract the file wimboot to the same directory on your web server.


3.5 Create a text file boot.ipxe in the same directory on your web server, containing:

#!ipxe
#http://ipxe.org/howto/winpe
cpuid --ext 29 && set arch amd64 || set arch x86
kernel wimboot
initrd ${arch}/media/Boot/BCD                     BCD
initrd ${arch}/media/Boot/boot.sdi                boot.sdi
initrd ${arch}/media/sources/boot.wim             boot.wim
boot


4. use this iPXE boot menu (file name same as step 3.5: boot.ipxe), can select install all OS version, such as linux. but you must extract your linux iso image to the web server

#!ipxe

menu Please choose an operating system to boot
item rhel65             1. redhat enterprise linux 6 update 5
item rhel7              2. redhat enterprise linux 7
item windows            3. windows pe for server x64 (2008 or 2012)

choose --default rhel65 --timeout 360000 target && goto ${target}

 

:rhel65
set repo
http://10.245.254.93/linux/rhel/6Server/x86_64
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img ks=http://10.245.254.93/linux/ks/ks-rhel63-v2.cfg
initrd ${repo}/images/pxeboot/initrd.img
boot

 

:rhel7
set repo
http://10.245.254.93/linux/rhel/7Server/x86_64
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
initrd ${repo}/images/pxeboot/initrd.img
boot

 

:windows
cpuid --ext 29 && set arch amd64 || set arch x86
kernel wimboot
initrd ${arch}/media/Boot/BCD                     BCD
initrd ${arch}/media/Boot/boot.sdi                boot.sdi
initrd ${arch}/media/sources/boot.wim             boot.wim
boot


根据http://ipxe.org 文档测试总结而成。转载请保留链接
  评论这张
 
阅读(992)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017