From: Eric Biggers <ebiggers3@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: fstests@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: [xfstests-bld PATCH] gen-image: create /etc/mtab symlink
Date: Fri, 8 Sep 2017 16:58:29 -0700 [thread overview]
Message-ID: <20170908235829.67348-1-ebiggers3@gmail.com> (raw)
From: Eric Biggers <ebiggers@google.com>
Currently the root_fs's are being created with no /etc/mtab file.
/etc/mtab is supposed to be obsolete, but some programs such as mke2fs
still expect it to exist. On Debian systems, systemd will automatically
symlink /etc/mtab to ../proc/self/mounts as specified by
/usr/lib/tmpfiles.d/debian.conf. But if the root_fs is used as a chroot
(as android-xfstests does), that does not happen, and as of Debian
Stretch the 'mount' program from util-linux doesn't create /etc/mtab
either. So until nothing else needs it, just make an /etc/mtab symlink
while creating the root_fs.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
kvm-xfstests/test-appliance/gen-image | 1 +
1 file changed, 1 insertion(+)
diff --git a/kvm-xfstests/test-appliance/gen-image b/kvm-xfstests/test-appliance/gen-image
index 48cf624..8343294 100755
--- a/kvm-xfstests/test-appliance/gen-image
+++ b/kvm-xfstests/test-appliance/gen-image
@@ -289,6 +289,7 @@ echo "fsgqa:!::" >> $ROOTDIR/etc/gshadow
mkdir $ROOTDIR/home/fsgqa
chown 31415:31415 $ROOTDIR/home/fsgqa
chmod 755 $ROOTDIR/root
+ln -sf ../proc/self/mounts $ROOTDIR/etc/mtab
fix_symlinks
cp $ROOTDIR/lib/systemd/system/serial-getty@.service \
--
2.14.1.581.gf28d330327-goog
reply other threads:[~2017-09-08 23:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170908235829.67348-1-ebiggers3@gmail.com \
--to=ebiggers3@gmail.com \
--cc=ebiggers@google.com \
--cc=fstests@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox