SUS(en)

Z David Seidl

Přejít na: navigace, hledání

The main task of the student will be to configure a server based on the Linux / Debian operating system. The configuration will include ISC-DHCP server, tftp server, nfs server and netboot.

Obsah

Instalation Debian to Virtualbox

* www.virtualbox.org
* www.debian.org

Please install Virtualbox on your PC or run Virtualbox on PC in class. Download instalation CD from Debian website (netinst version) and install minimalist version of Debian on new Virtual PC. (Do not install XWinsows and so on, plese during instalation process install only SSH server)

Configure your virtual PC. Set two ethernet interfaces, first connect to NAT network, second connect to Host only network. In host only network disable internat DHCP server.

Instalation ISC DHCP server

* https://www.isc.org/dhcp-manual-pages/

On interface connected to Host only network configure static IP address. Install ISC DHCP server on your Debian and enable DHCP server on interface connected to Host only network. Test your configuration on second virtual PC. (Connect second virtual PC only to Host only network, and test if this PC get IP address from your DHCP server)

Example od dhcp config:

subnet 192.168.57.0 netmask 255.255.255.0 {
 range 192.168.57.100 192.168.57.200;
 option broadcast-address 192.168.57.255;
 option routers 192.168.57.2;
 next-server 192.168.57.2;
 filename "pxelinux.0";
}

Instalation NFS server

* http://nfs.sourceforge.net/

Install nfs-kernel-server to your virtual PC, and export /home directory. Test your configuration on second virtual PC.

Instalation TFTP-HPA server

* http://chschneider.eu/linux/server/tftpd-hpa.shtml

Install tftp-hpa-server to your virtual PC. Test your configuration on second virtual PC.

Instalation netboot

* https://www.debian.org/releases/stable/amd64/index.html.en

Configure your server to enable netboot instaling of Debian. Enable netboot in DHCP server and test your configuration on second virtual PC.

Debian netboot instaler

http://ftp.cz.debian.org/debian/dists/Debian9.4/main/installer-i386/current/images/netboot/netboot.tar.gz
http://ftp.cz.debian.org/debian/dists/Debian9.4/main/installer-amd64/current/images/netboot/netboot.tar.gz

for unzip use: gzip -d  netboot.tar.gz; tar -xf netboot.tar

Configure netboot to booting Debain from network

Edit configuration of pxelinux and create new boot menu.
File structure in tftp root directory

Debian
ldlinux.c32
libcom32.c32
libutil.c32
pxelinux.cfg
pxelinux.0
vesamenu.c32

Example of boot menu configuration

DEFAULT vesamenu.c32
PROMPT 0
 
MENU TITLE  Boot Menu

LABEL Debian - NetBoot
KERNEL /Debian/vmlinuz-3.16.0-4-686-pae
APPEND initrd=/Debian/initrd.img-3.16.0-4-686-pae root=/dev/nfs nfsroot=192.168.57.2:/tftpboot/Debian/root ip=dhcp rw

Create root file system for netboot PC and export using NFS.
Description:

  • -> cp [copy directory from server root]
  • -> without cp [only create directory]
bin -> cp
boot -> cp
dev
etc -> cp
home
lib -> cp
lib64 -> cp
media
mnt
opt -> cp
proc
root -> cp
run
sbin -> cp
srv -> cp
sys
tmp
usr -> cp
var -> cp
Osobní nástroje