please add to initrd.img missing kernel drivers
Originally created by @beta-tester on #17632 (Redmine)
hello,
long time ago it was asked for the possibility to add pxe-boot support
to tails.
the tails developers team had no time to figure out how to add that
pxe-booting possibility to tails.
now, there is an easy to implement solution available to make
pxe-booting possible without interfering the regular tails booting
process nor interfering the regular tails environment.
please give it a chance…
-
1’st step: comment out all entries in
<INITRD>/etc/modprobe.d/all-net-blacklist.conf
or remove that file completely from<ISO>/live/initrd.img
-
2’nd step: include all the missing network kernel drivers modules in
<INITRD>/usr/lib/modules/<VERSION>/kernel/drivers/net/
to<ISO>/live/initrd.img
-
3’rd step: add to the
<INITRD>/scripts/live
script in<ISO>/live/initrd.img
the following additionallocal_bottom()
function at the end of the file,
to bring down the network interface and unload the network kernel driver module just after the<PXE-SERVER>/filesystem.squashfs
of tails was fetched from the pxe-server to not interfer with the further tails initialization process.local_bottom () { local device_ for device_ in /sys/class/net/*; do local device device=$(basename $device_) if [ "$device" != "lo" ]; then # set network devices down ip link set $device down local module_ module_=$(readlink $device_/device/driver/module) if [ -n "$module_" ]; then # remove used network drivers local module module=$(basename $module_) modprobe -r $module fi fi done } </code>
these few three steps makes pxe-booting possible.
for example, use the following pxe-menu entry on the pxe-server site:
<code class="text">
LABEL tails-x64
MENU LABEL Tails x64
KERNEL http://<PXE-SERVER>/srv/nfs/tails-x64/live/vmlinuz
INITRD http://<PXE-SERVER>/srv/nfs/tails-x64/live/initrd.img
APPEND fetch=http://<PXE-SERVER>/srv/nfs/tails-x64/live/filesystem.squashfs ro boot=live config live-media=removable nopersistence noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 noautologin module=Tails slab_nomerge slub_debug=FZP mce=0 vsyscall=none page_poison=1 init_on_alloc=1 init_on_free=1 mds=full,nosmt
TEXT HELP
Boot to Tails x64 Live
ENDTEXT
</code>
please see also here for use cases and history:
https://redmine.tails.boum.org/code/issues/16236#note-14
https://redmine.tails.boum.org/code/issues/16236#note-26