[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696901: chroot-setup.sh: [kfreebsd-*] procfs mounted instead of linprocfs in target

Package: debian-installer-utils
Version: 1.94
Severity: important
Tags: d-i patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org


I noticed that the wrong type of proc filesystem, procfs (meant for
native FreeBSD) gets mounted in a kfreebsd-amd64 target during install.

The correct proc filesystem for GNU/kFreeBSD is linprocfs.  This
contains among other things, /proc/cmdline (which is what
chroot-setup.sh actually looks for to decide if proc needs mounting).

Later, when grub-installer runs, it would have tried to mount
/target/proc correctly (as linprocfs) thanks to the fix for #613430, but
only if that directory is empty, which procfs will not be.

As a result, the grub-common postinst complains about being unable to
find /proc/mounts, with unknown consequences.  (grub-mkdevicemap and
grub-probe still seem to work;  the GRUB install step fails currently
for a different reason).

A patch fixing this is attached.  Thanks.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/chroot-setup.sh b/chroot-setup.sh
index a7f6495..6eb1b22 100644
--- a/chroot-setup.sh
+++ b/chroot-setup.sh
@@ -116,11 +116,11 @@ EOF
 			# Some packages (eg. the kernel-image package) require a mounted
 			# /proc/. Only mount it if not mounted already
 			if [ ! -f /target/proc/cmdline ]; then
-				mount -t procfs proc /target/proc
+				mount -t linprocfs proc /target/proc
 			# Some package might need sysfs mounted
 			# Only mount it if not mounted already
 			if [ ! -d /target/sys/devices ]; then
 				mount -t linsysfs sysfs /target/sys

Reply to: