Debian Bug report logs - #697002
jessie: -R skips check of /etc and /usr in addition to /

version graph

Package: util-linux; Maintainer for util-linux is LaMont Jones <lamont@debian.org>; Source for util-linux is src:util-linux.

Reported by: Roger Leigh <rleigh@debian.org>

Date: Sun, 30 Dec 2012 17:48:01 UTC

Severity: important

Tags: patch

Found in version util-linux/2.20.1-5.3

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#697002; Package util-linux. (Sun, 30 Dec 2012 17:48:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roger Leigh <rleigh@debian.org>:
New Bug report received and forwarded. Copy sent to LaMont Jones <lamont@debian.org>. (Sun, 30 Dec 2012 17:48:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Roger Leigh <rleigh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: jessie: -R skips check of /etc and /usr in addition to /
Date: Sun, 30 Dec 2012 17:45:01 +0000
[Message part 1 (text/plain, inline)]
Package: util-linux
Version: 2.20.1-5.3
Severity: important
Tags: patch
Usertags: usrinitramfs etcinitramfs

The attached patch is to apply for jessie, so isn't appropriate
to use until after wheezy is released.  See
http://wiki.debian.org/ReleaseGoals/MountUsrInInitramfs
for further information.

To summarise, the intent is to mount /usr (and potentially also
/etc for certain specialised use cases) in the initramfs, so that
/usr is available as soon as init starts.

The fsck -R option ignores filesystems which are mounted when
checkfs runs.  Currently this is only the rootfs (plus special
filesystems which aren't checked).  With /usr (and /etc) mounted
early, the -R option therefore needs extending to support these
filesystems as well so that we check them manually in checkroot,
and skip them in checkfs.

The upload of this change will need coordinating with the
initramfs-tools and sysvinit packages so that we get the
dependencies correct so that usr is checked (and only checked
once, not zero or twice).


Thanks,
Roger

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.33-kvm-i386-20111128-dirty (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages util-linux depends on:
ii  debconf [debconf-2.0]  1.5.48
ii  dpkg                   1.16.9
ii  initscripts            2.88dsf-34
ii  install-info           4.13a.dfsg.1-10
ii  libblkid1              2.20.1-5.3
ii  libc6                  2.13-37
ii  libncurses5            5.9-10
ii  libselinux1            2.1.9-5
ii  libslang2              2.2.4-15
ii  libtinfo5              5.9-10
ii  libuuid1               2.20.1-5.3
ii  lsb-base               4.1+Debian8
ii  tzdata                 2012j-1
ii  zlib1g                 1:1.2.7.dfsg-13

util-linux recommends no packages.

Versions of packages util-linux suggests:
pn  dosfstools           <none>
pn  kbd | console-tools  <none>
pn  util-linux-locales   <none>

-- debconf information excluded
[usrfsck.patch (text/x-diff, attachment)]

Message sent on to Roger Leigh <rleigh@debian.org>:
Bug#697002. (Thu, 13 Feb 2014 01:48:08 GMT) Full text and rfc822 format available.

Message #8 received at 697002-submitter@bugs.debian.org (full text, mbox):

From: Phillip Susi <psusi@ubuntu.com>
To: 697002-submitter@bugs.debian.org
Subject: jessie: -R skips check of /etc and /usr in addition to /
Date: Wed, 12 Feb 2014 20:46:46 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Wait... /usr I can see, but you can't have /etc on its own partition,
otherwise you would not be able to find /etc/fstab in order to find
out that you need to mount the other partition.  It's a catch-22.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJS/CQGAAoJEI5FoCIzSKrwbvwIAJxL1VVbfgiFocEkPuaKBm1C
UJdf97iKomjtqXwq+mnPlx5IedHyLEiErlbLtpm9NWugp4CzMo+OAfJPOipm42lA
EtTOcQmdwg4Ocm1bpyDAczbmgiB5vXdka8bDMAc7YX8aMiZjruVI7a/dusqeC5Mz
WzWt7mYYWVbdweriuWZFq+2rvEZKEcMDG6OAXLKzcNFvTnoz3DAWcm3dUzqwSDt2
/VszGP+nwDmbboZdPtw3L34QfaLIC4KL2swSH5Qar8vXCf4yPbY7HqaDS4niPDT4
0lVmFRU2mAnBpHHOpWCcwOeDSpHya56vJ9fwi1BK0swlPjI9OZY4GkUFpL1OSzI=
=HHzQ
-----END PGP SIGNATURE-----



Information stored :
Bug#697002; Package util-linux. (Thu, 13 Feb 2014 10:06:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roger Leigh <rleigh@codelibre.net>:
Extra info received and filed, but not forwarded. (Thu, 13 Feb 2014 10:06:09 GMT) Full text and rfc822 format available.

Message #13 received at 697002-quiet@bugs.debian.org (full text, mbox):

From: Roger Leigh <rleigh@codelibre.net>
To: Phillip Susi <psusi@ubuntu.com>, 697002-quiet@bugs.debian.org
Cc: 697002-submitter@bugs.debian.org
Subject: Re: Bug#697002: jessie: -R skips check of /etc and /usr in addition to /
Date: Thu, 13 Feb 2014 10:02:59 +0000
On Wed, Feb 12, 2014 at 08:46:46PM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> Wait... /usr I can see, but you can't have /etc on its own partition,
> otherwise you would not be able to find /etc/fstab in order to find
> out that you need to mount the other partition.  It's a catch-22.

I didn't realise this patch had been applied yet.  It's the
first bit of the mounting /usr in the initramfs work.

WRT /etc, you are entirely correct that it's a catch-22.
However, the initramfs patches add options to mount etc
in the initramfs as for the rootfs, and then we can read
the fstab from /etc and mount /usr etc.  This likely won't
be a widely-used feature, but it does allow e.g. an
encrypted /etc, writable /etc and various other
possibilities.  Currently these all require the entire
rootfs to be encrypted/writable etc.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



Message sent on to Roger Leigh <rleigh@debian.org>:
Bug#697002. (Thu, 13 Feb 2014 10:06:12 GMT) Full text and rfc822 format available.

Information stored :
Bug#697002; Package util-linux. (Thu, 13 Feb 2014 14:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Phillip Susi <psusi@ubuntu.com>:
Extra info received and filed, but not forwarded. (Thu, 13 Feb 2014 14:36:04 GMT) Full text and rfc822 format available.

Message #21 received at 697002-quiet@bugs.debian.org (full text, mbox):

From: Phillip Susi <psusi@ubuntu.com>
To: Roger Leigh <rleigh@codelibre.net>, 697002-quiet@bugs.debian.org
Subject: Re: Bug#697002: jessie: -R skips check of /etc and /usr in addition to /
Date: Thu, 13 Feb 2014 09:32:06 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/13/2014 5:02 AM, Roger Leigh wrote:
> WRT /etc, you are entirely correct that it's a catch-22. However,
> the initramfs patches add options to mount etc in the initramfs as
> for the rootfs, and then we can read the fstab from /etc and mount
> /usr etc.  This likely won't be a widely-used feature, but it does
> allow e.g. an encrypted /etc, writable /etc and various other 
> possibilities.  Currently these all require the entire rootfs to be
> encrypted/writable etc.

So the /etc mount is detected at mkinitramfs time and hard coded into
the initramfs?  Or is it added to the kernel command line along with
the root?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS/NdkAAoJEI5FoCIzSKrwCscH/jfWh4Kw/FlJ7KzStK7VgL8v
bLUaEvV4Ez4ubIOAAD+U/qZ9yv39xxd48UXhAC733ow0bi114Ldtb0nl30dmrisG
0agFLX/rKOz6QMQYzhsNjTOa2GEjoWOnGXOI4ogf2pjvf/aQaL3Zwq3Q11QfGUer
f8jAEqfnjoRliUFghKjFUno7zNrfHb+CyfDhWcb2vlevWkjh33qA0QLi7B+pV6UW
HMSxwvDvHud5YlT2aX+W1FUaNQdVLxEZEdswrslL1Whz3oiTkH4CuwEldOefVdzu
jUCuaizIIzY77g4nbWtNxKz/GqWrWcdUxKG9zRhysRZgG9/pB73yEvL7BY4rvnQ=
=x21p
-----END PGP SIGNATURE-----



Information stored :
Bug#697002; Package util-linux. (Thu, 13 Feb 2014 14:39:18 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roger Leigh <rleigh@codelibre.net>:
Extra info received and filed, but not forwarded. (Thu, 13 Feb 2014 14:39:18 GMT) Full text and rfc822 format available.

Message #26 received at 697002-quiet@bugs.debian.org (full text, mbox):

From: Roger Leigh <rleigh@codelibre.net>
To: Phillip Susi <psusi@ubuntu.com>
Cc: 697002-quiet@bugs.debian.org
Subject: Re: Bug#697002: jessie: -R skips check of /etc and /usr in addition to /
Date: Thu, 13 Feb 2014 14:37:19 +0000
On Thu, Feb 13, 2014 at 09:32:06AM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 2/13/2014 5:02 AM, Roger Leigh wrote:
> > WRT /etc, you are entirely correct that it's a catch-22. However,
> > the initramfs patches add options to mount etc in the initramfs as
> > for the rootfs, and then we can read the fstab from /etc and mount
> > /usr etc.  This likely won't be a widely-used feature, but it does
> > allow e.g. an encrypted /etc, writable /etc and various other 
> > possibilities.  Currently these all require the entire rootfs to be
> > encrypted/writable etc.
> 
> So the /etc mount is detected at mkinitramfs time and hard coded into
> the initramfs?  Or is it added to the kernel command line along with
> the root?

On the kernel command-line only; there's nothing embedded into the
initramfs.  In this aspect, it's configured and handled the same as
the rootfs to keep the initramfs generic.  You just put it into the
grub config, though at present there's no automated configuration
for this.  I can't recall of the top of my head, but there may be an
initramfs hook to ensure the modules/filesystem helpers for mounting
it are included in the image since they may differ from the rootfs.
I'd have to check.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 05:19:36 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.