🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
2 messages
2 total messages Started by David Heitman Sun, 08 Nov 2026 18:30
Bug#1153455: initscripts: Single character typo in mountkernfs.sh causes EXTRAKERNELFS=cgroup2 to silently fail
#3813
Author: David Heitman
Date: Sun, 08 Nov 2026 18:30
140 lines
5769 bytes
Package: initscripts
Version: 3.18-1devuan1
Severity: normal
X-Debbugs-Cc: dmheitman@proton.me

Dear Maintainer,

   * What led up to the situation?
       Trying to mount a cgroups2 hierarchy and nothing happened

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
       Identified that the domount case never matched with MOUNTMODE
       empty, traced it back and found the typo in mountkernfs.sh

   * What was the outcome of this action?
      Fixed the typo (see mountkernfs.sh), works like a charm now.
      Just need to replace MNTMOUDE with MNTMODE as intended.
      My locally changed version below, tested and working.


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

Kernel: Linux 7.3.3+deb14-amd64 (SMP w/32 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 not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages initscripts depends on:
ii  sysv-rc         3.18-1devuan1
ii  sysvinit-utils  3.18-1devuan1

Versions of packages initscripts recommends:
ii  e2fsprogs         1.47.4-1+b3
ii  psmisc            23.7-2
ii  util-linux-extra  2.42.4-1devuan2

initscripts suggests no packages.

-- Configuration Files:
/etc/default/rcS changed:
EXTRAKERNELFS=cgroup2

/etc/init.d/mountkernfs.sh changed:
PATH=/sbin:/bin
. /lib/init/vars.sh
. /lib/init/tmpfs.sh
. /lib/lsb/init-functions
. /lib/init/mount-functions.sh
mount_filesystems() {
	MNTMODE="$1"
	#
	# Mount tmpfs on /run and/or /run/lock
	#
	mount_run "$MNTMODE"
	mount_lock "$MNTMODE"
	#
	# Mount proc filesystem on /proc
	#
	domount "$MNTMODE" proc "" /proc proc "-onodev,noexec,nosuid"
	if grep -E -qs 'securityfs$' /proc/filesystems; then
		domount "$MNTMODE" securityfs "" /sys/kernel/security securityfs
	fi
	#
	# Mount sysfs on /sys
	#
	# Only mount sysfs if it is supported (kernel >= 2.6)
	if grep -E -qs 'sysfs$' /proc/filesystems; then
		domount "$MNTMODE" sysfs "" /sys sysfs "-onodev,noexec,nosuid"
	fi
	if [ -d /sys/fs/pstore ]; then
		domount "$MNTMODE" pstore "" /sys/fs/pstore pstore ""
	fi
	#
	# Mount efivarfs on /sys/firmware/efi/efivars if necessary
	#
	efivarsmnt=/sys/firmware/efi/efivars
	if [ -d $efivarsmnt ]; then
		# domount is a no-op if already mounted
		domount "$MNTMODE" efivarfs "" $efivarsmnt none ""
	fi
	#
	# Mount specific additional requests
	#
	for fs in $EXTRAKERNELFS; do
		case $fs in
			debugfs)
				if grep -wqs 'debugfs$' /proc/filesystems && [ -d /sys/kernel/debug ]; then
					domount "$MNTMODE" debugfs "" /sys/kernel/debug debugfs -onodev,noexec,nosuid
				else
					echo "Warning: ignoring unavailable debugfs" >&2
				fi
				;;
			cgroup2)
				if grep -wqs 'cgroup2$' /proc/filesystems && [ -e /proc/cgroups ]; then
					domount "$MNTMODE" cgroup2 "" /sys/fs/cgroup cgroup2 -onodev,noexec,nosuid
				else
					echo "Warning: ignoring unavailable cgroup2" >&2
				fi
				;;
			*) echo "Warning: ignoring unsupported kernel filesystem $fs" >&2 ;;
		esac
	done
}
case "$1" in
	"")
		echo "Warning: mountkernfs should be called with the 'start' argument." >&2
		mount_filesystems mount_noupdate
		;;
	start)
		mount_filesystems mount_noupdate
		;;
	restart | reload | force-reload)
		mount_filesystems remount
		;;
	stop | status)
		# No-op
		;;
	*)
		echo "Usage: mountkernfs [start|stop]" >&2
		exit 3
		;;
esac


-- no debconf information
Bug#1153455: initscripts: Single character typo in mountkernfs.sh causes EXTRAKERNELFS=cgroup2 to silently fail
#3814
Author: Mark Hindley
Date: Sun, 08 Nov 2026 18:40
9 lines
1941 bytes
Control: tags -1 pending

David,

Thanks. Fix is committed and upload pending.

Best wishes

Mark
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads