Package: e2fsprogs
Version: 1.42.5-1.1
Severity: normal

Hi Ted,

I'm developing support for mounting the /usr (and /etc) filesystems in
the initramfs, to guarantee that /usr is present before init starts,
but I've come across a small problem.  We need to check the /usr
filesystem in the same manner as the root filesystem in
/etc/init.d/checkroot.sh prior to mounting it read-write, since we
don't want to check it with the other filesystems in checkfs.sh because
that's too late.

However, e2fsck has the rootfs special-cased.  I was going to
propose a patch such as:

--- e2fsprogs-1.42.7~WIP-2013-01-01.original/lib/ext2fs/ismounted.c     
2012-12-29 22:23:29.000000000 +0000
+++ e2fsprogs-1.42.7~WIP-2013-01-01/lib/ext2fs/ismounted.c      2013-05-12 
12:47:37.469001122 +0100
@@ -146,7 +146,9 @@
         * read/write, since if the root is mounted read/only, the
         * contents of /etc/mtab may not be accurate.
         */
-       if (!strcmp(mnt->mnt_dir, "/")) {
+       if (!strcmp(mnt->mnt_dir, "/") ||
+           !strcmp(mnt->mnt_dir, "/etc") ||
+           !strcmp(mnt->mnt_dir, "/usr")) {
 is_root:
 #define TEST_FILE "/.ismount-test-file"
                *mount_flags |= EXT2_MF_ISROOT;

This would make e2fsck treat these filesystems the same as the rootfs.
But this would presumably need doing separately for each filesystem's
fsck.  So I really just wanted to ask for your opinion on what you feel
would be the best approach here.  Another potential approach would be
to copy the needed fsck helpers into the initramfs, which would be a
much bigger job but would avoid the need for the above hack entirely,
as well as rebooting after the check completes.  However, ensuring
all the needed bits are copied into the initramfs and are fully
functional does not look like a simple task.


Regards,
Roger

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (550, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
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 e2fsprogs depends on:
ii  e2fslibs    1.42.5-1.1
ii  libblkid1   2.20.1-5.4
ii  libc6       2.17-1
ii  libcomerr2  1.42.5-1.1
ii  libss2      1.42.5-1.1
ii  libuuid1    2.20.1-5.4
ii  util-linux  2.20.1-5.4

e2fsprogs recommends no packages.

Versions of packages e2fsprogs suggests:
pn  e2fsck-static  <none>
pn  gpart          <none>
ii  parted         2.3-13

-- no debconf information

-- debsums errors found:
prelink: /sbin/debugfs: at least one of file's dependencies has changed since 
prelinking
debsums: changed file /sbin/debugfs (from e2fsprogs package)
prelink: /sbin/dumpe2fs: at least one of file's dependencies has changed since 
prelinking
debsums: changed file /sbin/dumpe2fs (from e2fsprogs package)
prelink: /sbin/e2fsck: at least one of file's dependencies has changed since 
prelinking
debsums: changed file /sbin/e2fsck (from e2fsprogs package)
prelink: /sbin/mke2fs: at least one of file's dependencies has changed since 
prelinking
debsums: changed file /sbin/mke2fs (from e2fsprogs package)
prelink: /sbin/tune2fs: at least one of file's dependencies has changed since 
prelinking
debsums: changed file /sbin/tune2fs (from e2fsprogs package)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to