Status message

The page you requested does not exist. A search for booting diskless system via pxe netboot resulted in this page.

Booting diskless system via pxe (netboot)

Category:

Preboot Execution Environment is an useful way to make machine booting without using a system installed on a physical disk. It is very useful for testing purposes, rescue system or for making "thin clients".

The services needed to get everything works are:

  • the dhcp server that istruct the clients requesting an ip, where to get files for booting;
  • the tftp server that sent kernel images and initrds.
  • the nfs server that serve the root partition for clients;

DHCP
This is a basic subnet declaration with added lines for pxe:
[sourcecode language='c']subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.51 192.168.1.89;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
filename "pxelinux.0";
next-server 192.168.1.10;
}[/sourcecode]

filename specified is the file that the client should request to the tftp server and that it should execute (pxelinux) for proper booting. Next-server must be specified if the tftp server is elsewhere outside the machine serving dhcp: in this example, my dhcp server is on 192.168.1.1, and the tftp server is on 192.168.1.10.

Now, we configure the folder served by tftp (usually /var/lib/tftpboot if you apt-get install tftpd-hpa)
[sourcecode language='c']cd /var/lib/tftpboot
wget http://ftp.debian.org/debian/dists/etch/main/installer-i386/current/imag...
mkdir pxelinux.cfg
nano -w pxelinux.cfg/default[/sourcecode]
You can get the pxe executable where you want, i am taking the one distributed with the netboot images of debian etch.
pxelinux.cfg is a folder that contains it's configuration files, that can be different for every machines that is booting from network, based on the mac address of the ethernet card. If you name the configuration file "default", it will be used by every machine that is netbooting.

[sourcecode language='c']DEFAULT debian

LABEL debian
kernel debian/vmlinux
append vga=normal initrd=debian/initrd.img root=/dev/nfs nfsroot=192.168.1.10:/home/pxe_root rw --

LABEL debian-install
kernel debian-installer/i386/linux
append vga=normal initrd=debian-installer/i386/initrd.gz locale=it --

LABEL sysrescuecd
kernel sysrescuecd/rescuecd
append initrd=sysrescuecd/initram.igz root=/dev/ram0

PROMPT 1
TIMEOUT 100[/sourcecode]

Here there are 3 system: one is a full installed debian, with the root folder server via nfs; the second is a netinst image of debian, which can be used to install debian without using CDs nor Removable Device; the third, is a SystemRescueCD system.

http://ftp.nl.debian.org/debian/dists/testing/main/installer-i386/curren...
Here you can find the image of the installer for lenny, named netboot.tar.gz.

For building a debian base system to be served via nfs, you can use the debootstrap utility:
[sourcecode language='c']mkdir /home/pxe_root
debootstrap lenny /home/pxe_root[/sourcecode]
and copy kernel and initrd in /var/lib/tftpboot

Comments

Recover Linux Xandros on Eee-Box, without CDROM, without USB's picture

[...] that is on the Recovery CD. - a live linux system (knoppix? SysRescueCD? I’ve used my debian on nfs.) - basic knowledge of a partition tool editor (like [...]

Add new comment

Via Twitter

  • Fing - Network scanner for Android https://t.co/ukIdHHqK 1 day 5 hours ago
  • @manuelmazzuola io stavo per provare redis, ma ho un sonno che schianto e vo a letto :P lunedì si prova 1 day 20 hours ago
  • Symfony CMF as a CMS replacement for developers #phpday http://t.co/RsUTvcR3 2 days 2 hours ago
  • @rosamammoli tutti entusiasti, è un peccato fermarsi qui solo per oggi #phpday 2 days 3 hours ago
  • The room is full on track 3 for continuous deployment security on http://t.co/MOAyi4U9 #phpday 2 days 4 hours ago

Blog written by Giovanni Toraldo and licensed under CC-BY-SA

This blog is anonymously available via:
tor and tor2web.

Powered by Drupal
ipv6 test
WORLD IPV6 LAUNCH is 6 June 2012 – The Future is Forever