The officially official Devuan Forum!

You are not logged in.

#1 Re: Installation » [SOLVED] persist initramfs fsck.log / persist the following output on disc fail » 2026-05-17 06:57:39

You have this problem, if your /var is a mount point.
It's not mounted yet during initscripts execution.
I use these patches to fix:

--- /etc/init.d/checkroot.sh
+++ /etc/init.d/checkroot.sh
@@ -175,7 +175,9 @@
 	then
 		rootcheck=no
 		# logsave_best_effort but do not display again
-		if [ -x /sbin/logsave ] && [ -e "${FSCK_LOGFILE}" ]; then
+		if [ -w "${FSCK_LOGFILE}" ]; then
+			cp /run/initramfs/fsck.log "${FSCK_LOGFILE}"
+		elif [ -x /sbin/logsave ]; then
 			logsave -s "${FSCK_LOGFILE}" >/dev/null \
 			    cat /run/initramfs/fsck.log
 		else
--- /usr/lib/init/mount-functions.sh
+++ /usr/lib/init/mount-functions.sh
@@ -727,7 +727,9 @@
 # This function does not actually belong here; it is duct-tape solution
 # for #901289.
 logsave_best_effort() {
-	if [ -x /sbin/logsave ] && [ -e "${FSCK_LOGFILE}" ]; then
+	if [ -w "${FSCK_LOGFILE}" ]; then
+		"$@" | tee "${FSCK_LOGFILE}"
+	elif [ -x /sbin/logsave ]; then
 		logsave -s "${FSCK_LOGFILE}" "$@"
 	else
 		log_failure_msg "Cannot persist the following output on disc"

Board footer

Forum Software