Feature #17632

please add to initrd.img missing kernel drivers

Added by beta-tester 2020-04-17 11:06:37 . Updated 2020-04-17 16:34:24 .

Status:
Confirmed
Priority:
Low
Assignee:
Category:
Installation
Target version:
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

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 additional local_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.
    <code class="text">
    
    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


Subtasks


History

#1 Updated by intrigeri 2020-04-17 16:34:24

  • Status changed from New to Confirmed
  • Priority changed from Normal to Low

> please give it a chance…

I think we would happily consider a good, well tested branch, that implements something along these lines.

Such a branch shall pass our test suite:

And it should update the design doc that’s made obsolete by these changes (wiki/src/contribute/design*).