X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/f08bb34f0ce4e23a80671f4bb3aad5edb801fe75..8611eec2eaa194d79354d8137c4df67bb2eece15:/blog/archive/2014/10/index.html diff --git a/blog/archive/2014/10/index.html b/blog/archive/2014/10/index.html index 43b97451c6..bb867c2280 100644 --- a/blog/archive/2014/10/index.html +++ b/blog/archive/2014/10/index.html @@ -21,6 +21,127 @@

Entries from October 2014.

+
+
+ Debian Jessie, PXE and automatic firmware installation +
+
+ 17th October 2014 +
+
+

When PXE installing laptops with Debian, I often run into the +problem that the WiFi card require some firmware to work properly. +And it has been a pain to fix this using preseeding in Debian. +Normally something more is needed. But thanks to +my isenkram +package and its recent tasksel extension, it has now become easy +to do this using simple preseeding.

+ +

The isenkram-cli package provide tasksel tasks which will install +firmware for the hardware found in the machine (actually, requested by +the kernel modules for the hardware). (It can also install user space +programs supporting the hardware detected, but that is not the focus +of this story.)

+ +

To get this working in the default installation, two preeseding +values are needed. First, the isenkram-cli package must be installed +into the target chroot (aka the hard drive) before tasksel is executed +in the pkgsel step of the debian-installer system. This is done by +preseeding the base-installer/includes debconf value to include the +isenkram-cli package. The package name is next passed to debootstrap +for installation. With the isenkram-cli package in place, tasksel +will automatically use the isenkram tasks to detect hardware specific +packages for the machine being installed and install them, because +isenkram-cli contain tasksel tasks.

+ +

Second, one need to enable the non-free APT repository, because +most firmware unfortunately is non-free. This is done by preseeding +the apt-mirror-setup step. This is unfortunate, but for a lot of +hardware it is the only option in Debian.

+ +

The end result is two lines needed in your preseeding file to get +firmware installed automatically by the installer:

+ +

+base-installer base-installer/includes string isenkram-cli
+apt-mirror-setup apt-setup/non-free boolean true
+

+ +

The current version of isenkram-cli in testing/jessie will install +both firmware and user space packages when using this method. It also +do not work well, so use version 0.15 or later. Installing both +firmware and user space packages might give you a bit more than you +want, so I decided to split the tasksel task in two, one for firmware +and one for user space programs. The firmware task is enabled by +default, while the one for user space programs is not. This split is +implemented in the package currently in unstable.

+ +

If you decide to give this a go, please let me know (via email) how +this recipe work for you if you decide to give it a go. :)

+ +

So, I bet you are wondering, how can this work. First and +foremost, it work because tasksel is modular, and driven by whatever +files it find in /usr/lib/tasksel/ and /usr/share/tasksel/. So the +isenkram-cli package place two files for tasksel to find. First there +is the task description file (/usr/share/tasksel/descs/isenkram.desc):

+ +

+Task: isenkram-packages
+Section: hardware
+Description: Hardware specific packages (autodetected by isenkram)
+ Based on the detected hardware various hardware specific packages are
+ proposed.
+Test-new-install: show show
+Relevance: 8
+Packages: for-current-hardware
+
+Task: isenkram-firmware
+Section: hardware
+Description: Hardware specific firmware packages (autodetected by isenkram)
+ Based on the detected hardware various hardware specific firmware
+ packages are proposed.
+Test-new-install: mark show
+Relevance: 8
+Packages: for-current-hardware-firmware
+

+ +

The key parts are Test-new-install which indicate how the task +should be handled and the Packages line referencing to a script in +/usr/lib/tasksel/packages/. The scripts use other scripts to get a +list of packages to install. The for-current-hardware-firmware script +look like this to list relevant firmware for the machine: + +

+#!/bin/sh
+#
+PATH=/usr/sbin:$PATH
+export PATH
+isenkram-autoinstall-firmware -l
+

+ +

With those two pieces in place, the firmware is installed by +tasksel during the normal d-i run. :)

+ +

If you want to test what tasksel will install when isenkram-cli is +installed, run DEBIAN_PRIORITY=critical tasksel --test +--new-install to get the list of packages that tasksel would +install.

+ +

Debian Edu will be +pilots in testing this feature, as isenkram is used to install +firmware now.

+ +
+
+ + + Tags: debian, english, isenkram, sysadmin. + + +
+
+
+
Ubuntu used to show the bread prizes at ICA Storo @@ -136,7 +257,7 @@ project the last nine years. Please check it out. :)

  • September (5)
  • -
  • October (2)
  • +
  • October (3)
  • @@ -317,7 +438,7 @@ project the last nine years. Please check it out. :)

  • chrpath (2)
  • -
  • debian (105)
  • +
  • debian (106)
  • debian edu (150)
  • @@ -329,7 +450,7 @@ project the last nine years. Please check it out. :)

  • drivstoffpriser (4)
  • -
  • english (257)
  • +
  • english (258)
  • fiksgatami (21)
  • @@ -343,7 +464,7 @@ project the last nine years. Please check it out. :)

  • intervju (41)
  • -
  • isenkram (9)
  • +
  • isenkram (10)
  • kart (19)
  • @@ -401,7 +522,7 @@ project the last nine years. Please check it out. :)

  • surveillance (26)
  • -
  • sysadmin (1)
  • +
  • sysadmin (2)
  • valg (8)