Skolelinux-netboot-en-test
skolelinux-netboot
kilde: https://git.nuug.no/nuug-public/skolelinux-netboot
Dette depotet inneholder mulige oppgaver for å sette opp en netboot-server med det eneste formålet å hjelpe til med å sette opp bærbare datamaskiner i NUUG/Skolelinux dugnad. Det er veldig spesifikt for vår nåværende bruk, og kan være nyttig for noen andre.
Bare Debian 12 har blitt testet.
Kom i gang
Du trenger en vanlig datamaskin med to nettverksporter. Ut fra dine behov, kan det hende det er ok med wifi til internett, og en ethernet-port (native eller usb-dongle) til det lokale pxe/netboot-nettverket. For større og mer stabile oppsett anbefales en datamaskin med to fysiske Ethernet-porter.
Etter du har installert standard Debian 12-installasjon, konfigurer din andre nettverksport for det lokale nettverket du skal nettstarte på. Sørg for at du har et stort nok subnett til å inneholde antall klienter du vil nettstarte til enhver tid.
Nettverket som er konfigurert på dette grensesnittet, vil også bli konfigurert senere for DHCP-serveren.
Sørg for at du oppgraderer alle tilgjengelige pakker, og etter at du har gjort oppsettet, start nettboot-verten på nytt for å sikre at den kjører den nyeste kjernen og at nettverksportene har sine IP-adresser etter behov.
Du må installere ansible og git på netboot-verten først:
a) If you installed Debian 12 netinstall, run the following to be root:
su -
Enter the password for your user account and you are root.
b) Else if you installed Debian 12 kde live run this command to be root:
sudo -i
Enter the password for your user account and you are root.
apt install ansible git
Then run ansible-pull to run the tasks from this repository:
Then you can clone the public git repository used to set up the remainder of the netboot infrastructure:
git clone https://git.nuug.no/nuug-public/skolelinux-netboot.git
This will create the directory skolelinux-netboot/ that contains the ansible playbook and other data needed to configure the netboot host.
cd skolelinux-netboot
Configure local settings
Before running the playbook, you need to create a file local-vars.yml (this file is ignored by git) containing values the ansible playbook will use during the setup. Use your favourite editor to create the file, and fill it with the following data:
internet_interface: "eno1" # Interface name that has internet access # DHCP server configuration dhcpd_interface: "enx7cc2c6469631" # Interface name for local netboot network dhcpd_subnet_network: "192.168.100.0" # Network address for local network dhcpd_subnet_netmask: "255.255.252.0" # Network netmask for local network dhcpd_pool_start: "192.168.100.50" # DHCP IP pool start address dhcpd_pool_end: "192.168.103.250" # DHCP IP pool end address dhcpd_option_routers: "192.168.100.1" # Gateway for local network (your netboot host!) dhcpd_option_domainnameservers: "1.1.1.1,1.0.0.1" # DNS servers to push to clients dhcpd_option_nextserver: "192.168.100.1" # Netboot PXE server (your netboot host!) # Full name, username and cleartext password of your desired non-root # user to be created during preseed. This is going to be the user that # is automatically logged in as the kiosk user. preseed_user_fullname: "" preseed_username: "" preseed_user_password: "" # Username and password that will be configured in ProFTP and that ShredOS will # use to upload PDF reports # after shredding of disks. proftpd_shredos_user: "someuser" proftpd_shredos_pass: "somepass" # A list of donors of laptops. IMPORTANT: Use only lowercase and uppalphanumeric # (a-z, A-Z, 0-9), no spaces! Each donor will get their own ShredOS netboot menu # choice, and their own ShredOS logs directory. donors: - "bigcompany" - "district123"
Now you should be able to run the playbook that will perform all the necessary configuration tasks. This might take a little while.
ansible-playbook netboot-host-setup.yml -D
It's probably a good idea to reboot your netboot host again after this (assuming all went well), to make sure services start at boot (DHCP server, ProFTPd, Apt-cacher-ng). You can check with e.g.:
systemctl status proftpd.service systemctl status isc-dhcp-server.service systemctl status apt-cacher-ng.service
You should now be able to use this host in the local network where you are performing the Skolelinux installations. This host should be the only DHCP server in the network, and the gateway IP must match what is being pushed by this host over DHCP.
If there are any changes in your local-vars.yml file, you should be able to simply re-run the playbook, and the system will be reconfigured accordingly.
If there are any new development for this setup made available in the git repository, you can update your files, by running a git command while being in the skolelinux-netboot/ directory:
git pull
To apply the latest changes, re-run the ansible playbook again.
Disable Suspend/Hvilemodus på preseed-maskinen
When this is not disabled the computers getting tanked from the preseed machine wil stop installing as we have experienced xD
a) Go to systemsettings/systeminnstillinger -> Strømstyring/Powermanagement -> ta av haken i Lås økt / Lock session and click on Bruk/Use
a) Either start a preinstalled Debian 12 kde laptop with both wireless and ethernet network (cable), or boot a Debian live KDE from a USB-stick
b) When the system is started to Desktop -> left click the network icon in the bottom right corner and connect to a wireless network. Example Rebel-Network
c) Right click the network icon in the right corner of the screen again and do: > Configure Network Connections/Sett opp nettverkskoblinger -> Wired Connection 1 -> Kablet Forbindelse 1 -> IPv4 (tab/fane -> Method/Metode -> Shared to other computers / Delt til andre datamaskiner -> Use/Bruk
d) Go to settings -> powermanagement/strømstyring -> On AC Power/På nettstørm (tab/fane) -> remove check mark for Lock session -> On battery/På batteridrift > remove check mark for Lock session -> On Low Battery/Lavt batterinivå remove check mark for Lock session -> click Use/Bruk
e) Connect a network cable from the network card on the laptop to Internet in network card on the preseed machine.