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

Bug#660297: marked as done (initramfs-tools: busybox's switch_root doesn't handle /proc or /sys moving)



Your message dated Wed, 06 Jun 2012 13:17:23 +0000
with message-id <E1ScG71-0004k0-FE@franck.debian.org>
and subject line Bug#660297: fixed in initramfs-tools 0.104
has caused the Debian Bug report #660297,
regarding initramfs-tools: busybox's switch_root doesn't handle /proc or /sys moving
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
660297: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660297
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.100
Severity: normal
Tags: patch

Greetings.

the change to using switch_root leaves /sys and /proc in an unmounted state.
busybox's switch_root doesn't appear to handle the /sys and /proc moving the
way that util-linux's switch_root does.

either busybox's switch_root should be fixed, initramfs-tools uses util-linux's
switch_root, or manually handle mounting the dirs, just like how it's done with
run-init. the following patch implements the last approach.

live well,
  vagrant


commit 705c5e3529536862135d90e1d710d02d750765d7
Author: Vagrant Cascadian <vagrant@freegeek.org>
Date:   Fri Feb 17 16:11:32 2012 -0800

    Work around busybox's switch_root, which doesn't handle moving /proc and /sys
    into the root before switching, by moving the /proc and /sys directories
    directly.
    
    Signed-off-by: Vagrant Cascadian <vagrant@debian.org>

diff --git a/init b/init
index 472b279..242b29d 100755
--- a/init
+++ b/init
@@ -310,13 +310,14 @@ unset readonly
 unset resume
 unset resume_offset
 
+# Move virtual filesystems over to the real filesystem
+mount -n -o move /sys ${rootmnt}/sys
+mount -n -o move /proc ${rootmnt}/proc
+
 # Chain to real filesystem
 if command -v switch_root >/dev/null 2>&1; then
 	exec switch_root ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console
 elif command -v run-init >/dev/null 2>&1; then
-	# Move virtual filesystems over to the real filesystem
-	mount -n -o move /sys ${rootmnt}/sys
-	mount -n -o move /proc ${rootmnt}/proc
 
 	exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console
 fi



--- End Message ---
--- Begin Message ---
Source: initramfs-tools
Source-Version: 0.104

We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive:

initramfs-tools_0.104.dsc
  to main/i/initramfs-tools/initramfs-tools_0.104.dsc
initramfs-tools_0.104.tar.gz
  to main/i/initramfs-tools/initramfs-tools_0.104.tar.gz
initramfs-tools_0.104_all.deb
  to main/i/initramfs-tools/initramfs-tools_0.104_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 660297@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
maximilian attems <maks@debian.org> (supplier of updated initramfs-tools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 06 Jun 2012 14:48:26 +0200
Source: initramfs-tools
Binary: initramfs-tools
Architecture: source all
Version: 0.104
Distribution: unstable
Urgency: high
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: maximilian attems <maks@debian.org>
Description: 
 initramfs-tools - generic modular initramfs generator
Closes: 601324 652525 655175 660297 668616 670496 674484
Changes: 
 initramfs-tools (0.104) unstable; urgency=high
 .
   [ Michael Prokop ]
   * [9e961c6] docs: clarify that PREREQ is only honored inside single directory.
     Thanks to Marc Haber <mh+debian-bugs@zugschlus.de> for spotting thjs issue
     (Closes: #601324)
 .
   [ maximilian attems ]
   * [b60b440] debian/control: Depend on kmod or m-i-t.
   * [f87e71b] hook-functions: handle rootfs output from mount(8).
     (Closes: #668616)
   * [042c5c9] init: tighten /run/initramfs permissions. (Closes: #655175)
   * [df4ffdf] scripts/functions: panic() don't abort on modprobe failures.
     (Closes: #674484)
 .
   [ Vagrant Cascadian ]
   * [ddbdb4f] init: busybox's switch_root doesn't handle /proc or /sys moving.
     (Closes: #660297)
 .
   [ Balwinder S Dheeman ]
   * [3ff8ee6] init: fixes ignored $tmpfs_size. (Closes: #670496)
 .
   [ Josh Triplett ]
   * [2c5c942] initramfs-tools: speed-up by avoiding forks in the per-module
     hot path. (Closes: #652525)
Checksums-Sha1: 
 cbcfdeeb67bfcb7441c197b47dc675eff922f049 1052 initramfs-tools_0.104.dsc
 1218b9ab4df1557ae4aa2180d46b8740b94af9f0 84519 initramfs-tools_0.104.tar.gz
 57e7b2faada169f5978d64c936b4e2ce0d6aa4c9 91002 initramfs-tools_0.104_all.deb
Checksums-Sha256: 
 45c035c998f8c2ec5a8ca1f50df3e91b30f306bcf1c016bf38ec4806daae30d1 1052 initramfs-tools_0.104.dsc
 6048b66aa067de06419c53353f632315b279eab957cd17157f83c3c60b670e6f 84519 initramfs-tools_0.104.tar.gz
 7817d3b28de728e515078d3452efefb60136ac21ce8c5821fb46ef735f156f73 91002 initramfs-tools_0.104_all.deb
Files: 
 b0eadf22423992235c55d3a0ca49723d 1052 utils optional initramfs-tools_0.104.dsc
 fb46dba7c1886c6020586d99ecfb7519 84519 utils optional initramfs-tools_0.104.tar.gz
 e6519d7618d6b7b1c7dc7678b98f3328 91002 utils optional initramfs-tools_0.104_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk/PU3gACgkQeW7Lc5tEHqhiigCgppHUxmZ5/fPynMyrvN2f3LgM
KPEAoIsA+bUqlyeP9sX0x+PK9LIWnYrs
=sjD3
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: