How to make linux boot from network

来源:互联网 发布:计算机编程大学专业 编辑:程序博客网 时间:2024/04/30 03:02

1. Enable dhcp server on a linux server, the /etc/dhcpd.conf should be looked like this:
ddns-update-style interim;
ignore client-updates;

allow bootp;
allow booting;

subnet 192.168.253.0 netmask 255.255.255.0 {
        option routers                  192.168.253.9;
        option subnet-mask              255.255.255.0;

        option nis-domain               "domain.org";
        option domain-name              "domain.org";
        option domain-name-servers      192.168.253.9;

        option time-offset              -18000; # Eastern Standard Time

}

group {
        next-server 192.168.253.9;
        filename "pxelinux.0";

        host klinux {
                hardware ethernet 00:0C:29:17:B8:92;
                fixed-address 192.168.253.10;

        }
}
2. Start tftp server and create a directory named  "/tftpboot"
3. Install syslinux and copy /usr/lib/syslinux/pxelinux.o into /tftpboot
4. Then let's go in the /tftpboot and create a directory named pxelinux.cfg
5. Create a file named as your target pc's ip address which must be written as uppercase hex format such like C0A8FD0A that means 192.168.0.10.
6. Wrtie something in this file like this:
DEFAULT 192.168.253.10/bzImage root=/dev/ram initrd=192.168.253.10/initrd.gz
  This config file means using ramdisk for root filesystem and the ramdisk image's name is initrd.gz
7. Now put your target and server pc into the same network, make the target boot as network method, good luck !

  

原创粉丝点击