免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1400 | 回复: 0
打印 上一主题 下一主题

Ubuntu_PXE_Install [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-02 20:32 |只看该作者 |倒序浏览

                参考文章  http://wiki.koeln.ccc.de/index.php/Ubuntu_PXE_Install 翻译了一下,第一次翻译,而且英语不是很好,所以也只能翻译个大概了……呵呵……不过应该是可以看懂的Install servicestftpd-hpa
dhcp3-server
netkit-inetd
  准备tftp server
修改配置文件/etc/inetd.conf如下:
tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot
sudo update-inetd --enable BOOT
别忘了创造tftp 目录 /var/lib/tftpboot  (如果没的话)
在Ubuntu 6.06 Server (或者 /etc/inetd.conf 不存在) 可以编辑 /etc/default/tftpd-hpa:
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
Prepare your dhcp-server根据实际修改:
If you have a working dhcp server add the following lines to your group, substituting ip and mac address as needed
host pxeinstall {
  hardware ethernet [网卡地址 不要方括号];
  fixed-address 10.0.0.16;
  next-server [tftp的IP地址];
  filename "pxelinux.0";
}
The following simpler file may also work in a trivial environment
subnet 0.0.0.0 netmask 0.0.0.0 {
  range 192.168.0.1 192.168.0.2;
  filename "pxelinux.0";
}
Get the files获取文件All the files you need are on the install media, or you can get them here:
hoary 5.04

warty 5.10

breezy 5.10
dapper 6.06
edgy 6.10
所有需要的在安装媒体上  或者从这些连接取得各个ubuntu的版本
把netboot 文件放进 /tftpboot 目录
lftp -c "open
http://archive.ubuntu.com/ubuntu/dists/dapper/main/installer-i386/current/images/
; mirror netboot/"
cp -a netboot/* /var/lib/tftpboot
# untar the pxeboot.tar.gz
cd /var/lib/tftpboot/
tar xfz pxeboot.tar.gz
pxe bootloader config
Edit or patch pxelinux.cfg/default .(编辑pxelinux.cfg/default如下:)
--- default.org        2004-10-31 15:32:32.000000000 +0100
+++ default        2004-10-31 00:14:52.000000000 +0200
@@ -13,17 +13,11 @@
F0 debian-installer/boot-screens/f10.txt

label linux
-        kernel debian-installer/linux
-        append vga=normal initrd=debian-installer/initrd.gz ramdisk_size=11057 root=/dev/rd/0 devfs=mount,dall rw --
+        kernel vmlinuz
+        append vga=normal initrd=initrd.gz ramdisk_size=11057 root=/dev/rd/0 devfs=mount,dall rw --
label expert
-        kernel debian-installer/linux
-        append DEBCONF_PRIORITY=low vga=normal initrd=debian-installer/initrd.gz ramdisk_size=11057 root=/dev/rd/0 devfs=mount,dall rw --
-label custom
-        kernel debian-installer/linux
-        append ubuntu/install-type=custom vga=normal initrd=debian-installer/initrd.gz ramdisk_size=11057 root=/dev/rd/0 devfs=mount,dall rw --
-label custom-expert
-        kernel debian-installer/linux
-        append ubuntu/install-type=custom DEBCONF_PRIORITY=low vga=normal initrd=debian-installer/initrd.gz ramdisk_size=11057 root=/dev/rd/0 devfs=mount,dall rw --
+        kernel vmlinuz
+        append DEBCONF_PRIORITY=low vga=normal initrd=initrd.gz ramdisk_size=11057 root=/dev/rd/0 devfs=mount,dall rw --

prompt 1
timeout 0
Make a symlink from default to the ip of the pxe boot client.
cd /tftpboot/pxelinux.cfg
ln -s default 0A000010
Directory layout
Should look like this:应该如下所示:
/tftpboot/
/tftpboot/pxelinux.0
/tftpboot/initrd.gz
/tftpboot/mini.iso
/tftpboot/debian-installer
/tftpboot/debian-installer/linux
/tftpboot/debian-installer/initrd.gz
/tftpboot/debian-installer/boot-screens
/tftpboot/debian-installer/boot-screens/splash.rle
/tftpboot/debian-installer/boot-screens/f1.txt
/tftpboot/debian-installer/boot-screens/f2.txt
/tftpboot/debian-installer/boot-screens/f3.txt
/tftpboot/debian-installer/boot-screens/f4.txt
/tftpboot/debian-installer/boot-screens/f5.txt
/tftpboot/debian-installer/boot-screens/f6.txt
/tftpboot/debian-installer/boot-screens/f7.txt
/tftpboot/debian-installer/boot-screens/f8.txt
/tftpboot/debian-installer/boot-screens/f9.txt
/tftpboot/debian-installer/boot-screens/syslinux.txt
/tftpboot/debian-installer/boot-screens/f10.txt
/tftpboot/initrd.list
/tftpboot/vmlinuz
/tftpboot/pxelinux.cfg
/tftpboot/pxelinux.cfg/default
/tftpboot/pxelinux.cfg/0A000010
Start the PXE client
Just boot up the computer that will use DHCP and then PXE to get the
images,启动电脑应该是没问题了哈 if something isn't working you can use a sniffer on your
install server to check.
tethereal -R bootp
#tethereal -VR bootp
tethereal port tftp
tcpdump -n
Setup a mirror做自己的ubuntu镜象
Download apt-mirror and write a configuration file eg.:下载镜像文件及配置:
set base_path      /usr/local/ubuntu/mirror
deb http://gb.archive.ubuntu.com/ubuntu/ dapper main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ dapper main/debian-installer
deb http://gb.archive.ubuntu.com/ubuntu/ dapper main restricted/debian-installer
Create a 'var' and 'skel' directory under your chosen base path(创造var和skel目录在自己选择的路径下)
Run apt-mirror against the configuration file which you've
created. (再apt-mirror一次)This will replicate the ubuntu mirror to your chosen base path
(you will need to create the soft links to the dists and pool
directories yourself) eg.:
~$ ls -al /usr/local/ubuntu/mirror
total 24
drwxr-xr-x   5 root root   4096 May 18 12:46 .
drwxrwxrwx  11 root root   4096 May 18 12:27 ..
lrwxrwxrwx   1 root root   34 May 18 12:46 dists -> gb.archive.ubuntu.com/ubuntu/dists
drwxr-xr-x   3 root root   4096 May 18 12:46 gb.archive.ubuntu.com
lrwxrwxrwx   1 root root   33 May 18 12:46 pool -> gb.archive.ubuntu.com/ubuntu/pool
drwxr-xr-x   3 root root   4096 May 18 10:53 skel
drwxr-xr-x   2 root root   8192 May 18 13:27 var
Serve the /usr/local/ubuntu directory out with apache
When you boot the ubuntu network installer, point it at the ip address and the 'mirror' directory
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/32587/showart_252323.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP