Subject: bug#812: 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: "Devuan bug Tracking System" <[email-masked]>
Date: Wed, 20 Mar 2024 12:08:02 +0000

This is an automatic notification regarding your bug report
which was filed against the devuan-project package:

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

It has been closed by Mark Hindley <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mark Hindley <[email-masked]> by
replying to this email.

-- 
812: https://bugs.devuan.org/cgi/bugreport.cgi?bug=812
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#812: Devuan project: merged-usr
From: Mark Hindley <[email-masked]>
To: [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      

Subject: Firmware is not found by kernel anymore as it is moved to /usr
From: Klaus Ethgen <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Mon, 4 Dec 2023 09:57:17 +0100

-- System Information:
Distributor ID:	Devuan

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Wed, 20 Mar 2024 12:08:07 +0000

#813: netcat-traditional: Debian Bug#1056980: netcat-traditional: upgrade to 1.10-48 fails (postinst

Mark

Subject: netcat-traditional: Debian Bug#1056980: netcat-traditional: upgrade to 1.10-48 fails (postinst
From: Arthur Marsh <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Mon, 04 Dec 2023 23:55:03 +1030

Package: netcat-traditional
Version: 1.10-48
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

Attempting to upgrade netcat-traditional 1.10-48 on unstable in Devuan.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Found Debian Bug#1056980 marked as wontfix.

   * What was the outcome of this action?

Frustration.

   * What outcome did you expect instead?

A working transition.

*** End of the template - remove these template lines ***

-- System Information:
Distributor ID:	Devuan

Kernel: Linux 6.7.0-rc3+ (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages netcat-traditional depends on:
ii  libc6  2.38-3

netcat-traditional recommends no packages.

netcat-traditional suggests no packages.

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Wed, 20 Mar 2024 12:08:08 +0000

#821: Not able to compile modules anymore

Mark

Subject: Not able to compile modules anymore
From: Klaus Ethgen <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Wed, 27 Dec 2023 11:52:03 +0100

Package: linux-headers-6.6.8-amd64
Version: 6.6.8-1
Severity: grave

This package do not allow to compile kernel modules anymore. So dkms is
failing too.

The reason is that the symlinks for kernel headers are installed into
/usr/lib/modules instead of /lib/modules. No linux kernel is able to
find the headers in /usr/lib!

-- System Information:
Distributor ID:	Devuan

Versions of packages linux-headers-6.6.8-amd64 depends on:
ii  gcc-13                                                      13.2.0-9
pn  linux-headers-6.6.8-common                                  <none>
pn  linux-image-6.6.8-amd64 | linux-image-6.6.8-amd64-unsigned  <none>
pn  linux-kbuild-6.6.8                                          <none>

linux-headers-6.6.8-amd64 recommends no packages.

linux-headers-6.6.8-amd64 suggests no packages.

Gru?
   Klaus

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Wed, 20 Mar 2024 12:08:09 +0000

#823: sed is mostly hardcoded in /bin/sed but moved to /usr/bin

Mark

Subject: sed is mostly hardcoded in /bin/sed but moved to /usr/bin
From: Klaus Ethgen <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Tue, 2 Jan 2024 20:39:11 +0100

Package: sed
Version: 4.9-2
Severity: critical

The current version of sed move /bin/sed to /usr/bin/sed and is breaking
nearly the full system as /bin/sed is hardcoded in many startup files.

-- System Information:
Distributor ID:	Devuan

Versions of packages sed depends on:
ii  libacl1      2.3.1-4
ii  libc6        2.37-13
ii  libselinux1  3.5-1+b1

sed recommends no packages.

sed suggests no packages.

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Wed, 20 Mar 2024 12:08:11 +0000

#826: kmod upgrade creates links from /usr/sbin to ../bin

Mark

Subject: kmod upgrade creates links from /usr/sbin to ../bin
From: Arthur Marsh <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Fri, 05 Jan 2024 17:32:50 +1030

Package: kmod
Version: 31-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

[UPGRADE] kmod:amd64 30+20230601-2.1 -> 31-1
[UPGRADE] libkmod2:amd64 30+20230601-2.1 -> 31-1

/usr/sbin# rm depmod insmod lsmod modinfo modprobe rmmod
then tried re-installing version 31-1 (ineffective)

then tried:

/usr/sbin# rm depmod insmod lsmod modinfo modprobe rmmod

and downgraded kmod and libkmod2:

Preparing to unpack .../kmod_30+20230601-2.1_amd64.deb ...
Unpacking kmod (30+20230601-2.1) over (31-1) ...
dpkg: warning: unable to delete old directory '/usr/lib/modprobe.d': Directory not empty
dpkg: warning: downgrading libkmod2:amd64 from 31-1 to 30+20230601-2.1
Preparing to unpack .../libkmod2_30+20230601-2.1_amd64.deb ...
Unpacking libkmod2:amd64 (30+20230601-2.1) over (31-1) ...
Setting up libkmod2:amd64 (30+20230601-2.1) ...
Setting up kmod (30+20230601-2.1) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.7.0-rc8+
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/cat'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/cpio'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/dd'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/dmesg'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/false'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/gunzip'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/kill'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/ln'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/ls'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/mkdir'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/mkfifo'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/mknod'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/mount'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/mv'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/nuke'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/readlink'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/resume'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/sh'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/sleep'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/sync'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/true'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/umount'
cp: not replacing '/var/tmp/mkinitramfs_COM0md/bin/uname'
Processing triggers for libc-bin (2.38-3) ...
Processing triggers for man-db (2.12.0-1) ...

which was effective

-- System Information:
Distributor ID:	Devuan

Kernel: Linux 6.7.0-rc8+ (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages kmod depends on:
ii  libc6     2.38-5
ii  libkmod2  30+20230601-2.1
ii  liblzma5  5.4.5-0.3
ii  libssl3   3.1.4-2
ii  libzstd1  1.5.5+dfsg2-2

kmod recommends no packages.

kmod suggests no packages.

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Wed, 20 Mar 2024 12:08:12 +0000

#827: initramfs-tools-core: modprobe and depmod not found

Mark

Subject: initramfs-tools-core: modprobe and depmod not found
From: "G. L. Gragnani" <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Fri, 05 Jan 2024 08:33:17 +0100

Package: initramfs-tools-core
Version: 0.142
Severity: grave
Justification: renders package unusable

Dear Maintainer,

mkinitramfs reports a series of errors of this kind:
/sbin/modprobe not found
depmod not found

I'm attaching a file of the output.

Is this bug related to the usr-merge problem?

Ciao.
Gigi.

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

Kernel: Linux 6.6.9-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages initramfs-tools-core depends on:
ii  coreutils     9.4-3
ii  cpio          2.14+dfsg-1
ii  e2fsprogs     1.47.0-2+b1
ii  eudev [udev]  3.2.14-1
ii  klibc-utils   2.0.13-2
ii  kmod          31-1
ii  logsave       1.47.0-2+b1
ii  udev          1:3.2.9+devuan4

Versions of packages initramfs-tools-core recommends:
ii  busybox-static [busybox]  1:1.36.1-6
ii  zstd                      1.5.5+dfsg2-2

Versions of packages initramfs-tools-core suggests:
ii  bash-completion  1:2.11-8

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Wed, 20 Mar 2024 12:08:13 +0000

#828: devuan-project: After an upgrade (apt update; apt full-upgrade) the PC fails to reboot correctly.

Mark

Subject: devuan-project: After an upgrade (apt update; apt full-upgrade) the PC fails to reboot correctly.
From: David Haworth <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Fri, 05 Jan 2024 12:58:15 +0100

Package: devuan-project
Severity: grave

Dear Maintainer,

Yesterday I updated my OS in order to install AusweisApp2.
On the first attempt I got some errors from the update command, but they
seemed to be related to source packages. The second attempt appeared to
succeed, and AusweisApp2 worked as expected.

Today, after shutdown/reboot, there were lots of error messages. The switch to
high-resolution text display failed, no display manager started and I was dumped
into an 80x25 text screen, from which I could log in.

From the error messages that flashed past, I was able to determine a few problems:

* One of the init scripts fails because it cannot find /sbin/modprobe.
  ** modprobe appears to be in /usr/sbin now.
  ** As a workaround, I created a symlink:  ln -s /usr/bin/kmod /sbin/modprobe
* Similar failures for depmod and modinfo, similar symlinks created.

* After the above more error messages from /etc/init.d/mountall.sh, /etc/init.d/mountdevsubfs.sh and others
  about not being able to find grep and sed. On examination, these files I noticed that the PATH is forced
  to /sbin:/bin at the top. grep and sed are in /usr/bin now.
  ** As a workaround, I edited the files and added :/usr/sbin:/usr/bin to the path.

* After the above I got error messages about eudev. On examination of /etc/init.d/uedev I noticed a similar
  problem with PATH, which I worked around in a similar way.

Now my PC boots to a display manager and I can log in as expected. I didn't notice any further error messages.

As you can see, the problems seem to be associated with several packages, so it's hard to pinpoint one package.

My guess is that the programs that I mentioned - modprobe, depmod, modinfo, grep, sed - and many others are
being installed in the wrong place. My reasoning is that, in a traditional Unix system, it should be possible
to place /usr in a separate filesystem that won't be available at the time these scripts are called.
However, on modern hardware, it's hardly ever necessary to have a separate filesystem for /usr, so it
could be simply a path problem in several init scripts of at least two packages (initscripts and eudev)

Best wishes,
Dave

-- System Information:
Distributor ID:	Devuan

Kernel: Linux 6.1.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled