Article View: linux.debian.bugs.dist
Article #6451Bug#1155557: mmdebstrap needs option to ignore non-empty dir
From: Johannes Schauer Marin Rodrigues
Date: Fri, 27 Nov 2026 17:30
Date: Fri, 27 Nov 2026 17:30
68 lines
4200 bytes
4200 bytes
Hi,
Am 2026-11-27 17:53, schrieb Thomas Lange:
> I'm doing automated installations. The disks are partitioned, file
> systems are created and mounted. If the user wants to have a directory
> on a different partition (for e.g. /local or /home or /usr/local)
> these subdirectories are already created and mounted before mmdebstrap
> is called.
> Then mmdebstrap refuses to run with
>
> I: automatically chosen format: directory
> E: /srv/home is not empty
from the docs:
directory, dir
A chroot directory will be created in TARGET. If the
directory already exists,
it must either be empty or only contain an empty
"lost+found" directory.
and then far further down in the man page:
• whether the output directory is empty. This check can
be disabled using
--skip=check/empty
I take this as an opportunity to improve the documentation. The docs for
the directory
output format should probably also mention --skip=check/empty:
--- a/mmdebstrap
+++ b/mmdebstrap
@@ -8902,7 +8902,8 @@ chosen.
A chroot directory will be created in I<TARGET>. If the directory
already
exists, it must either be empty or only contain an empty
C<lost+found>
-directory. The special I<TARGET> C<-> does not work with this
format because a
+directory (unless you supply B<--skip=tar-in/mknod>). The special
I<TARGET>
+C<-> does not work with this format because a
directory cannot be written to standard output. If you need your
directory be
named C<->, then just explicitly pass the relative path to it like
F<./->. If
a directory is chosen as output in any other mode than B<sudo>,
then its
That being said, you are probably running mmdebstrap as root? You can
also run mmdebstrap
as the non-root user in unshare mode and still distribute the output
across multiple
filesystems without ever requiring root privileges by creating and
filtering a tarball
and using the ability of mke2fs to use a tarball on standard input.
Using that method we
are creating bootable system images with a separate /boot partition for
the MNT open
hardware laptop. If you want to get rid of the root requirement, I can
provide you with
more details.
Thanks!
cheers, josch
Technical Details
Message-ID:
<O47VM-eve0-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<O47VM-eve0-5@gated-at.bofh.it> <O47VM-eve0-5@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> Newsgroups: linux.debian.bugs.dist Subject: Bug#1155557: mmdebstrap needs option to ignore non-empty dir Date: Fri, 27 Nov 2026 18:30:02 +0100 Message-ID: <O47VM-eve0-3@gated-at.bofh.it> References: <O47VM-eve0-5@gated-at.bofh.it> <O47VM-eve0-5@gated-at.bofh.it> X-Original-To: Thomas Lange <lange@cs.uni-koeln.de>, 1155557@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Fri Nov 27 17:21:06 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de>, 1155557@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: josch@debian.org X-Debian-Pr-Message: followup 1155557 X-Debian-Pr-Package: mmdebstrap X-Debian-Pr-Source: mmdebstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Sender: josch@mister-muffin.de User-Agent: Roundcube Webmail/1.3.17 X-Greylist: delayed 355 seconds by postgrey-1.37 at buxtehude; Fri, 27 Nov 2026 17:20:12 UTC X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005428 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 68 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Fri, 27 Nov 2026 18:14:13 +0100 X-Original-Message-ID: <b1530c90e5b2457e32c034cafba6be0c@mister-muffin.de> X-Original-References: <27401.46498.47652.117036@cs.uni-koeln.de> <27401.46498.47652.117036@cs.uni-koeln.de>