Tehtävä 5 – PXE & Preseed:
sudo setxkbmap fi
sudo apt-get update
sudo apt-get install arpwatch
sudo apt-get install wakeonlan
78:ac:c0:c1:08:56
xubuntu@xubuntu:~$ tail -F /var/log/syslog
Nov 28 13:43:25 xubuntu arpwatch: execl: /usr/lib/sendmail: No such file or directory
Nov 28 13:43:25 xubuntu arpwatch: reaper: pid 4061, exit status 1
Nov 28 13:43:25 xubuntu arpwatch: execl: /usr/lib/sendmail: No such file or directory
Nov 28 13:43:25 xubuntu arpwatch: reaper: pid 4062, exit status 1
Nov 28 13:45:13 xubuntu arpwatch: new station 172.28.172.137 78:ac:c0:c1:09:a6 eno1
Nov 28 13:45:13 xubuntu arpwatch: execl: /usr/lib/sendmail: No such file or directory
Nov 28 13:45:13 xubuntu arpwatch: reaper: pid 4065, exit status 1
Nov 28 13:45:34 xubuntu arpwatch: new station 172.28.9.61 2c:44:fd:85:91:90 eno1
Nov 28 13:45:34 xubuntu arpwatch: execl: /usr/lib/sendmail: No such file or directory
Nov 28 13:45:34 xubuntu arpwatch: reaper: pid 4066, exit status 1
Nov 28 13:48:18 xubuntu arpwatch: new station 169.254.74.204 78:ac:c0:c1:04:a5 eno1
Nov 28 13:48:18 xubuntu arpwatch: new station 172.28.172.242 78:ac:c0:c1:08:56 eno1
Nov 28 13:48:18 xubuntu arpwatch: execl: /usr/lib/sendmail: No such file or directory
Nov 28 13:48:18 xubuntu arpwatch: reaper: pid 4074, exit status 1
Nov 28 13:48:23 xubuntu arpwatch: execl: /usr/lib/sendmail: No such file or directory
Nov 28 13:48:23 xubuntu arpwatch: reaper: pid 4073, exit status 1
Kokeilin käynnistää:
xubuntu@xubuntu:~$ wakeonlan 78:ac:c0:c1:08:56
Sending magic packet to 255.255.255.255:9 with 78:ac:c0:c1:08:56
xubuntu@xubuntu:~$
Magic paketti lähti broadcast lähetyksenä
Muokan tiedosto:
sudo nano /etc/default/isc-dhcp-server
INTERFACES =”eno1″
Kopion talteen original tiedoston.
$ sudo cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcp.conf.orig
Muokkaan tiedostoa:
sudoedit /etc/dhcp/dhcpd.conf
ddns-update-style none;
#option domain-name “example.org”;
#option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
authoritative; # BE CAREFUL
next-server 172.28.172.131; # TFTP server ip address
filename “pxelinux.0”; # name of bootloader image
subnet 172.28.0.0 netmask 255.255.0.0 {
host alex {
hardware ethernet 78:ac:c0:c1:08:56;
fixed-address 172.28.11.11;
option subnet-mask 255.255.0.0;
option routers 172.28.1.254;
option domain-name-servers 8.8.8.8, 172.28.1.67, 172.28.1.69;
option domain-name “tielab.haaga-helia.fi”;
}
}
$ service isc-dhcp-server restart
$ wakeonlan 78:ac:c0:c1:08:56
Orjakoneella ruduulle tuli DHCP:n serverini määrämä IP-osoite: 172.28.11.11
Latasin tästä netboot tarballin:
Purkasin sen ja kopioin /var/lib/tftpboot/ kansioon.
$ sudo cp -r * /var/lib/tftpboot/
Muokkasin tiedosto:
sudoedit /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/syslinux.cfg
# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
path ubuntu-installer/amd64/boot-screens/
include ubuntu-installer/amd64/boot-screens/menu.cfg
default ubuntu-installer/amd64/boot-screens/vesamenu.c32
label alex
kernel ubuntu-installer/amd64/linux
append initrd=ubuntu-installer/amd64/initrd.gz auto=true auto url=tftp://172.28.172.131/ubuntu-installer/amd64/proseed.cfg locale=en_US.UTF-8$
prompt 1
timeout 5
default alex
Sitten lähetin taikapaketin:
wakeonlan 78:ac:c0:c1:08:56
Orjakoneella alkoi asennus, mutta se pysähtynyt kohtaan:
Download debconf preconfiguration file
Yritän korjata se vielä.
Lähteet:
https://joonaleppalahti.wordpress.com/2016/11/18/palvelinten-hallinta-harjoitus-8/