Knowledgebase
ThinLinX Support > ThinLinX Help Desk > Knowledgebase

Search help:


Network booting TLXOS RPi from an x86 server

Solution

The simplest way to network boot TLXOS RPi is to promote a TLXOS RPi server to be a network boot server, and serve its own O/S to clients.  However, with some data duplication and scripting, it is possible to use an x86 server to serve as the boot server instead.

The following is a tested procedure for setting up an Ubuntu 18.04 x86_64 box to serve TLXOS RPi 4.7.1 in diskless mode. This contains lots of Debian-ish assumptions (but will probably work with a range of Debian/Ubuntu versions, not just Ubuntu 18.04) and isn't very robust.

Unlike the TLXOS version, AoE shares are not read-only, so there is no protection against users doing potentially dangerous things like remounting root, /boot, /tfm or read-write multiple clients that share the same copy of the filesystem.

There isn't an easy way to pre-customise the diskless O/S. To do that you'd need to tweak create_midlayers.sh to loopback mount each newly created midlayer, drop an etc/environment file on it, and then unmount it, prior to sharing it via vblade. TLXOS fundamentally isn't intended for preinstall customisation - you're supposed to just use TMS to configure it afterward.

mkdir -p -m 0755 /usr/local/share/tlxos/rpi
mkfs -t ext4 -L tlxos-rpi /dev/some-big-chunk-of-disk
echo "LABEL=tlxos-rpi /usr/local/share/tlxos/rpi ext4 noatime,nodiratime 1 2" >> /etc/fstab
mount /usr/local/share/tlxos/rpi
apt-get install -y dnsmasq vblade-persist runit-systemd xz-utils net-tools e2fsprogs
cd /usr/local/share/tlxos/rpi
wget http://mirrors.thinlinx.com/downloads/NOOBS/TLX_RPi/boot.xz
wget http://mirrors.thinlinx.com/downloads/NOOBS/TLX_RPi/tfm.xz
wget http://mirrors.thinlinx.com/downloads/NOOBS/TLX_RPi/root.xz
unxz boot.xz tfm.xz root.xz
mkdir -p -m 0755 /tftpboot
echo "/usr/local/share/tlxos/rpi/boot /tftpboot vfat loop,ro 0 0" >> /etc/fstab
mount /tftpboot
cp tlxos-rpi.txt /etc/dnsmasq.d/tlxos-rpi.conf
nano /etc/dnsmasq.d/tlxos-rpi.conf # adjust as required
cp create_midlayer.txt /usr/local/sbin/create_midlayer.sh
chmod 755 /usr/local/sbin/create_midlayer.sh
# Substitute your ethernet interface name for ens5 in the following commands
vblade-persist setup 11 0 ens5 /usr/local/share/tlxos/rpi/tfm
vblade-persist setup 11 1 ens5 /usr/local/share/tlxos/rpi/boot
vblade-persist setup 11 2 ens5 /usr/local/share/tlxos/rpi/root
vblade-persist auto all
vblade-persist start all
systemctl restart dnsmasq

Note that Debian logs messages from dnsmasq to /var/log/daemon.log rather than /var/log/syslog, which would require a minor alternation to the create_midlayer.sh script.

 

Attachments:
create_midlayer.txt create_midlayer.txt
tlxos-rpi.txt tlxos-rpi.txt

Related articles Can I install/upgrade TLXOS via PXE boot?
What is TLXOS? Is it Linux? What parts of it are proprietary?
Can I customize the installation image prior to install?
Known issue with TMS <= 8.0.0 on Ubuntu >= 16.04
Article details
Article ID: 42
Category: HowTos
Date added: 2020-06-02 23:46:19
Views: 158

 
« Go back