Chinaunix

标题: 网络安装都使用pxelinux.0存疑 [打印本页]

作者: niuxxd    时间: 2012-11-14 13:32
标题: 网络安装都使用pxelinux.0存疑
    按照我的理解,机器启动的过程就是启动BIOS,加载引导程序,然后加载内核与虚拟磁盘,进而启动真实的系统。
    一般情况下,引导程序是在磁盘的MBR中或者某分区的第一个扇区。
    从找到的大量的资料来看,网络安装都依赖于pxelinux.0。通过tftp将它下载到本地,之后便与一般的启动过程无异。
     网络安装的机器启动过程与一般情况的区别,只有引导程序不在本地的区别而已。


    我的疑惑是,为什么一定(或者便爱)是pxelinux.0,而不是syslinux本身,或者lilo,grub这些引导程序?


    谢谢您教我
作者: chenyx    时间: 2012-11-14 19:06
我的理解,那个pxelinux.0的作用类似于grub程序,通过它引导kernel和initrd,实现网络启动.
作者: q1208c    时间: 2012-11-14 20:24
因为 lilo, grub, syslinux 里可能没有网络支持. 而 pxelinux.0里有 .
作者: niuxxd    时间: 2012-11-14 21:48
回复 3# q1208c


    这个说法不堪一击吧:引导程序本身并不负责网络连接.网络由PXE的ROM中自带的tftp实现的。

    表示大家都好忙啊,运维,苦逼的工作。
作者: weichongli    时间: 2012-11-14 21:56
pxelinux.0 本身就是syslinux包的一部分

pxlinux是syslinux的一个派生品,用于支持从网络启动

pxlinux.0 是pxelinux的引导程序.
作者: niuxxd    时间: 2012-11-14 23:05
谢谢,我现在已经了解了用grub2也是可以实现的。相对于pxelinux,之前另外一个同样优秀但已经过时的用于网络启动的程序--grub4dos。

而pxelinux之所以此般风性,乃由于它的“兼容性、小巧、效率”所致。

我有这个疑问,还是由于我的惰性所致,很奇怪的是此前我从内核官网上下载到的syslinux软件包里并找不到pxelinux.0,让我想逃避这种方式而希望可以有别的方式实现网络启动。
刚刚重新下载了一次,再解压出来,幸能找到这个pxelinux.0了。

谢谢你们。

回复 5# weichongli


   
作者: halosky123    时间: 2012-11-16 10:02
PXELINUX is a SYSLINUX derivative, for booting Linux off a network
server, using a network ROM conforming to the Intel PXE (Pre-Execution
Environment) specification.  PXELINUX is *not* a program that is
intended to be flashed or burned into a PROM on the network card; if
you want that, check out NILO (http://www.nilo.org/).  NILO can also
be used to create a PXE-compliant boot PROM for most network cards
which have drivers for Linux or FreeBSD.


    ++++ HOW TO CONFIGURE PXELINUX ++++

PXELINUX operates in many ways like SYSLINUX.  If you are not familiar
with SYSLINUX, read syslinux.doc first, since this documentation only
explains the differences.

On the TFTP server, create the directory "/tftpboot", and copy the
following files to it:

        pxelinux.0              - from the SYSLINUX distribution

        any kernel or initrd images you want to boot

Finally, create the directory "/tftpboot/pxelinux.cfg".  The
configuration file (equivalent of syslinux.cfg -- see syslinux.doc for
the options here) will live in this directory.  Because more than one
system may be booted from the same server, the configuration file name
depends on the IP address of the booting machine.  PXELINUX will
search for its config file on the boot server in the following way:

  First, it will search for the config file using the hardware type
  (using its ARP type code) and address, all in lower case hexadecimal
  with dash separators; for example, for an Ethernet (ARP type 1)
  with address 88:99:AA:BB:CCD it would search for the filename
  01-88-99-aa-bb-cc-dd.

  Next, it will search for the config file using its own IP address
  in upper case hexadecimal, e.g. 192.0.2.91 -> C000025B
  (you can use the included progam "gethostip" to compute the




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2