From: Rob Landley <rob@landley.net>
To: Nix <nix@esperi.org.uk>
Cc: Neil Brown <neilb@suse.de>, Al Viro <viro@ftp.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: pivot_root broken in 2.6.15-rc1-mm2
Date: Fri, 25 Nov 2005 07:16:28 -0600 [thread overview]
Message-ID: <200511250716.29127.rob@landley.net> (raw)
In-Reply-To: <87psopkkqm.fsf@amaterasu.srvr.nix>
On Friday 25 November 2005 05:52, Nix wrote:
> On 23 Nov 2005, Rob Landley gibbered uncontrollably:
> > Rather than unmounting rootfs, it deletes everything out of it to free up
> > the space. (It basically does the functional equivalent of "find / -xdev
> > | xargs rm -rf"
>
> Er, find / -xdev | xargs rm -f, I hope.
Yeah. :)
> (rm won't respect the -xdev you gave to find, and, well, if your new root
> is mounted at all, you're dead :) )
It's C code, not shell, so that was off the top of my head. :)
And that, in fact, is one of the big reasons that there's a utility for it:
not accidentally deleting anything out of your root partition is kind of
important.
(Another is that calling chroot and such after deleting their binaries out of
initramfs but before the paths are adjusted so that the ones in the new root
can find their shared libraries is a bit of a headache. It's a lot easier to
just have it all in one binary that's already loaded everything it needs and
frees its memory on exec.)
Rob
--
Steve Ballmer: Innovation! Inigo Montoya: You keep using that word.
I do not think it means what you think it means.
next prev parent reply other threads:[~2005-11-25 13:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-23 2:07 pivot_root broken in 2.6.15-rc1-mm2 Neil Brown
2005-11-23 2:15 ` Al Viro
2005-11-23 2:38 ` Johannes Stezenbach
2005-11-23 3:01 ` Neil Brown
2005-11-23 12:02 ` Rob Landley
2005-11-25 11:52 ` Nix
2005-11-25 13:16 ` Rob Landley [this message]
2005-11-25 15:32 ` Nix
2005-11-23 11:43 ` Rob Landley
2005-11-24 5:09 ` Neil Brown
2005-11-24 5:54 ` [PATCH] " Rob Landley
2005-11-25 11:53 ` Nix
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=200511250716.29127.rob@landley.net \
--to=rob@landley.net \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nix@esperi.org.uk \
--cc=viro@ftp.linux.org.uk \
/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