Skolelinux-netboot-en: Difference between revisions
No edit summary |
No edit summary |
||
Line 79: | Line 79: | ||
To apply the latest changes, re-run the ansible playbook again. | 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 | |||
=== Share wireless internett to the netboot machine === | |||
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 | 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 | ||
Line 86: | Line 91: | ||
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 | 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 | 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. |
Latest revision as of 16:51, 4 January 2025
skolelinux-netboot
source: https://git.nuug.no/nuug-public/skolelinux-netboot
This repository contains ansible tasks to set up a netboot server for the sole purpose of assisting in setting up laptops in the NUUG/Skolelinux dugnad. It is very specific to our current usecase, and may or may not be useful for anyone else.
Only Debian 12 with has been tested.
Getting started
You need a normal computer, with two network ports. Deoending on your needs, you may be ok with wifi to the internet, and an ethernet port (native or usb dongle) to the local pxe/netboot network. For bigger and more stable setups, a computer with two physical ethernet ports is recommended.
After your standard Debian 12 installation, configure your second network port for the local network you will be netbooting on. Make sure you have a big enough subnet to contain the number of clients you want to netboot at any given time.
The network configured on this interface, will be configured later for the DHCP server as well.
Make sure you upgrade all packages available, and after you've done the setup, reboot your netboot host to ensure it's running the latest kernel and your network ports have their IP addresses as needed.
You need to install ansible and git on your netboot host first:
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.