Subject: Firmware is not found by kernel anymore as it is moved to /usr

From: Klaus Ethgen <[email-masked]>
Date: Mon, 4 Dec 2023 09:57:17 +0100

Package: firmware-realtek
Version: 20230625-1
Severity: critical

After update from 20230515-3, the kernel is no longer able to find the
firmware as debian moved it to /usr.

This makes random subsystems (like bluetooth) fail.

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 6 (excalibur/ceres)
Release:	6
Codename:	excalibur ceres
Architecture: x86_64

Kernel: Linux 6.1.38 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_CPU_OUT_OF_SPEC, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

firmware-realtek depends on no packages.

firmware-realtek recommends no packages.

Versions of packages firmware-realtek suggests:
pn  initramfs-tools  <none>

-- no debconf information
Gruß
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <[email-masked]>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

---

From: Klaus Ethgen <[email-masked]>
Date: Mon, 4 Dec 2023 19:42:19 +0100

I have created that package under [0].

Regards
   Klaus

[0] ftp://ftp.ethgen.ch/pub/debian/pool/unofficial/f/firmware-nonfree/
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <[email-masked]>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

---

From: Mark Hindley <[email-masked]>
Date: Tue, 5 Dec 2023 13:00:21 +0000

Control: reassign -1 devuan-project
Control: forcemerge 810 -1
Control: affects -1 firmware-realtek

Klaus,

> firmware as debian moved it to /usr.

As you have identified, this is a result of Debian's implementation of merged
/usr.

Reassigning and merging.

Mark

---

From: Svante Signell <[email-masked]>
Date: Wed, 06 Dec 2023 17:55:30 +0100

> As you have identified, this is a result of Debian's implementation of merged

Hi Mark and Klaus,

Seems like the simple solution to firmware files moved from /lib to /usr/lib is
to modify the eudev (udev) rule to search both in /lib and /usr/lib. I have not
yet found out which program/rule does the actual installation of these firmware
files. Maybe you know?

Examples:
apt-file show firmware-realtek
firmware-realtek: /usr/lib/firmware/...

apt-file show firmware-linux-free
firmware-linux-free: /lib/firmware/...

apt-file show firmware-atheros
firmware-atheros: /usr/lib/firmware/...

apt-file show firmware-amd-graphics
firmware-amd-graphics: /usr/lib/firmware/...

---

From: Klaus Ethgen <[email-masked]>
Date: Wed, 6 Dec 2023 18:27:40 +0100

Hi Svante,

Am Mi den  6. Dez 2023 um 17:55 schrieb Svante Signell:
> to modify the eudev (udev) rule to search both in /lib and /usr/lib.

That do not work as at boot time, /usr is not always available.

> I have not

Yes, it is in the rules file. it includes dh_movetousr when available.
The firmware itself installs to /lib and that command does explicitly
destroy the package.

Regards
   Klaus

Ps. See my package, I built...
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <[email-masked]>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

---

From: Svante Signell <[email-masked]>
Date: Wed, 06 Dec 2023 19:57:29 +0100

On Wed, 2023-12-06 at 18:27 +0100, Klaus Ethgen wrote:
> > Seems like the simple solution to firmware files moved from /lib to /usr/lib
> > is to modify the eudev (udev) rule to search both in /lib and /usr/lib.
> 

Hi Klaus,

Then you have /usr on a different partition, and you need an initrd to fix that.
That problem is separate from eudev searching for files in /lib and /usr/lib.

> > I have not yet found out which program/rule does the actual installation of
> > these firmware files. Maybe you know?
> 

I did not mean the debian/rules file of firmware-realtek, sorry.

I saw the usage of dh_movetousr in that package in debian/rules, yes. However as
long as the eudev rule file searches both /lib and /usr/lib and you don't have
/usr on a separate partition, you'll be fine (or use an initrd as mentioned
above)

Thanks!

---

From: Mark Hindley <[email-masked]>
Date: Wed, 20 Mar 2024 12:06:27 +0000

Merged /usr is now enforced by base-files 13devuan4 and handled by debootstrap
1.0.134devuan2. Both of these versions are present in ceres and excalibur:

 base-files  | 13devuan4      | excalibur  | source, all
 base-files  | 13devuan4      | unstable   | source, all
 debootstrap | 1.0.134devuan2 | excalibur  | source, all
 debootstrap | 1.0.134devuan2 | unstable   | source, all

Golinux also posted an announcement[1] on the forum.

Therefore I am closing these reports as fixed.

Mark

[1]  https://dev1galaxy.org/viewtopic.php?id=6435