How to make linux boot from network

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 !

  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值