Installing Linux from the network

Aus Wiki
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Using PXE to install Debian Linux

Prepare a DHCP/TFTP server

Useful e.g. for ThinClients or for remotely controlled, automated backups.

  • configure the client's BIOS: enable the LAN boot ROM (PXE) and Wake-on-LAN, if needed
    • for Wake-on-LAN you might need to plug in a WoL cable to connect mainboard and network card
  • install a DHCP & TFTP server on your local machine
apt-get install isc-dhcp-server tftpd-hpa
  • configure /etc/dhcp/dhcpd.conf
subnet 192.168.2.0 netmask 255.255.255.0 {
option domain-name "exampledomain";
option routers 192.168.2.1;
option domain-name-servers 192.168.2.1;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
server-name "exampleserver";

host exampleclient {
        hardware ethernet 00:11:22:33:44:55;
        fixed-address 192.168.2.100;
        filename "/pxelinux.0";
}
}
  • configure /etc/default/tftp-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--ipv4 --listen --secure"
  • start server services:
service isc-dhcp-server restart
service tftpd-hpa restart

Serve an installer system via TFTP

cd /srv/tftp
wget http://ftp.debian.org/debian/dists/wheezy/main/installer-i386/current/images/netboot/netboot.tar.gz
tar -xzf netboot.tar.gz
chown tftp.tftp /srv/tftp -R
  • switch on your client machine and have it boot via PXE, the Debian installation splash screen should pop up

Debian: Automated installation

if substring (option vendor-class-identifier, 0, 3) = "d-i" {
    filename "http://host/preseed.cfg";
}

See also: Booting an OS from the network

2 options on the server side:

  • provide root filesystem via mounted remote (NFS) directory or
  • provide a client-specific RAM disk image

More scalable is the RAM disk:

  • You can upload the same image to several clients at the same time.

When using one NFS directory for several systems "collisions" could occur.

When using a RAM disk, you can still mount additional software via NFS (e.g. in the /usr directory).

Links

Diskless Linux

Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Werkzeuge