Debian Bug report logs - #676001
initramfs-tools: busybox's switch_root doesn't handle /proc or /sys moving

Package: busybox; Maintainer for busybox is Debian Install System Team <debian-boot@lists.debian.org>; Source for busybox is src:busybox.

Reported by: Vagrant Cascadian <vagrant@debian.org>

Date: Sat, 18 Feb 2012 01:00:02 UTC

Severity: wishlist

Tags: wontfix

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, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#660297; Package initramfs-tools. (Sat, 18 Feb 2012 01:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vagrant Cascadian <vagrant@debian.org>:
New Bug report received and forwarded. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Sat, 18 Feb 2012 01:00:05 GMT) Full text and rfc822 format available.

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

From: Vagrant Cascadian <vagrant@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: initramfs-tools: busybox's switch_root doesn't handle /proc or /sys moving
Date: Fri, 17 Feb 2012 16:23:13 -0800
Package: initramfs-tools
Version: 0.100
Severity: normal
Tags: patch

Greetings.

the change to using switch_root leaves /sys and /proc in an unmounted state.
busybox's switch_root doesn't appear to handle the /sys and /proc moving the
way that util-linux's switch_root does.

either busybox's switch_root should be fixed, initramfs-tools uses util-linux's
switch_root, or manually handle mounting the dirs, just like how it's done with
run-init. the following patch implements the last approach.

live well,
  vagrant


commit 705c5e3529536862135d90e1d710d02d750765d7
Author: Vagrant Cascadian <vagrant@freegeek.org>
Date:   Fri Feb 17 16:11:32 2012 -0800

    Work around busybox's switch_root, which doesn't handle moving /proc and /sys
    into the root before switching, by moving the /proc and /sys directories
    directly.
    
    Signed-off-by: Vagrant Cascadian <vagrant@debian.org>

diff --git a/init b/init
index 472b279..242b29d 100755
--- a/init
+++ b/init
@@ -310,13 +310,14 @@ unset readonly
 unset resume
 unset resume_offset
 
+# Move virtual filesystems over to the real filesystem
+mount -n -o move /sys ${rootmnt}/sys
+mount -n -o move /proc ${rootmnt}/proc
+
 # Chain to real filesystem
 if command -v switch_root >/dev/null 2>&1; then
 	exec switch_root ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console
 elif command -v run-init >/dev/null 2>&1; then
-	# Move virtual filesystems over to the real filesystem
-	mount -n -o move /sys ${rootmnt}/sys
-	mount -n -o move /proc ${rootmnt}/proc
 
 	exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console
 fi




Severity set to 'important' from 'normal' Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 19 Mar 2012 09:09:21 GMT) Full text and rfc822 format available.

Added indication that bug 660297 blocks 658070 Request was from Laurent Bigonville <bigon@debian.org> to control@bugs.debian.org. (Sun, 25 Mar 2012 21:54:06 GMT) Full text and rfc822 format available.

Bug 660297 cloned as bug 676001 Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Mon, 04 Jun 2012 20:39:18 GMT) Full text and rfc822 format available.

Added blocking bug(s) of 676001: 658070 Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Mon, 04 Jun 2012 20:39:19 GMT) Full text and rfc822 format available.

Removed blocking bug(s) of 676001: 658070 Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Mon, 04 Jun 2012 20:45:10 GMT) Full text and rfc822 format available.

Bug reassigned from package 'initramfs-tools' to 'busybox'. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Mon, 04 Jun 2012 20:45:13 GMT) Full text and rfc822 format available.

No longer marked as found in versions initramfs-tools/0.100. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Mon, 04 Jun 2012 20:45:13 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Tue, 05 Jun 2012 04:51:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 05 Jun 2012 04:51:04 GMT) Full text and rfc822 format available.

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

From: Michael Tokarev <mjt@tls.msk.ru>
To: maximilian attems <maks@debian.org>
Cc: 676001@bugs.debian.org, debian-kernel@lists.debian.org, debian-boot@lists.debian.org
Subject: Re: Processed: reassign 676001 to busybox
Date: Tue, 05 Jun 2012 08:45:59 +0400
On 05.06.2012 00:45, Debian Bug Tracking System wrote:
> Processing commands for control@bugs.debian.org:
> 
>> reassign 676001 busybox
> Bug #676001 [initramfs-tools] initramfs-tools: busybox's switch_root doesn't handle /proc or /sys moving
> Bug reassigned from package 'initramfs-tools' to 'busybox'.

When reassigning bugs like this, care to explain the reasoning
too, so that it wont be necessary to send a followup questions
like this one?

I disagree it is a busybox problem, and don't think it is a
switch_root business (be it from busybox or from util-linux).

There are a few special directories which needs to be moved
or umounted.  This includes /proc, /dev, /sys and not mentioned
here /run.  These directories might be mounted in the new root
already, or there may be some option passed to initramfs to
not mount these, or there may be other local policy or whatever
decisions.  All that can't be handled and can't be known to
switch_root -- this is exactly why we have initramfs/init as
a script, to be able to handle various local usecases/policies
and made it extendable.

Also, as shown by Vagrant in the initial bugreport, it is
really trivial to fix it in initramfs.

The fact that util-linux is doing this does not make it right
thing to do.

Why do you think it is a busybox bug?

Thanks,

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Fri, 08 Jun 2012 06:33:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 08 Jun 2012 06:33:07 GMT) Full text and rfc822 format available.

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

From: Michael Tokarev <mjt@tls.msk.ru>
To: maximilian attems <maks@debian.org>
Cc: 676001@bugs.debian.org, debian-kernel@lists.debian.org, debian-boot@lists.debian.org
Subject: reassign 676001 back to initramfs-tools
Date: Fri, 08 Jun 2012 10:31:46 +0400
reassign 676001 initramfs-tools
thanks

Reassigning the bug back to initramfs-tools where it belongs
according to my comments below and lack of any arguments to
the opposite.  With all my dislike to such a ping-pong.

Thanks,

/mjt

On 05.06.2012 08:45, Michael Tokarev wrote:
[]
> I disagree it is a busybox problem, and don't think it is a
> switch_root business (be it from busybox or from util-linux).
> 
> There are a few special directories which needs to be moved
> or umounted.  This includes /proc, /dev, /sys and not mentioned
> here /run.  These directories might be mounted in the new root
> already, or there may be some option passed to initramfs to
> not mount these, or there may be other local policy or whatever
> decisions.  All that can't be handled and can't be known to
> switch_root -- this is exactly why we have initramfs/init as
> a script, to be able to handle various local usecases/policies
> and made it extendable.
> 
> Also, as shown by Vagrant in the initial bugreport, it is
> really trivial to fix it in initramfs.
> 
> The fact that util-linux is doing this does not make it right
> thing to do.
> 
> Why do you think it is a busybox bug?




Bug reassigned from package 'busybox' to 'initramfs-tools'. Request was from Michael Tokarev <mjt@tls.msk.ru> to control@bugs.debian.org. (Fri, 08 Jun 2012 06:33:08 GMT) Full text and rfc822 format available.

Bug reassigned from package 'initramfs-tools' to 'busybox'. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Fri, 08 Jun 2012 10:49:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Fri, 08 Jun 2012 10:54:17 GMT) Full text and rfc822 format available.

Acknowledgement sent to maximilian attems <maks@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 08 Jun 2012 10:54:20 GMT) Full text and rfc822 format available.

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

From: maximilian attems <maks@debian.org>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 676001@bugs.debian.org, debian-kernel@lists.debian.org
Subject: Re: Processed: reassign 676001 to busybox
Date: Fri, 8 Jun 2012 10:52:04 +0000
dude care to have a bit of patience before reassigning back,
that be really nice.

On Tue, Jun 05, 2012 at 08:45:59AM +0400, Michael Tokarev wrote:
> On 05.06.2012 00:45, Debian Bug Tracking System wrote:
> > Processing commands for control@bugs.debian.org:
> > 
> >> reassign 676001 busybox
> > Bug #676001 [initramfs-tools] initramfs-tools: busybox's switch_root doesn't handle /proc or /sys moving
> > Bug reassigned from package 'initramfs-tools' to 'busybox'.
> 
> When reassigning bugs like this, care to explain the reasoning
> too, so that it wont be necessary to send a followup questions
> like this one?
> 
> I disagree it is a busybox problem, and don't think it is a
> switch_root business (be it from busybox or from util-linux).

switch_root in util-linux does it.
 
> There are a few special directories which needs to be moved
> or umounted.  This includes /proc, /dev, /sys and not mentioned
> here /run.  These directories might be mounted in the new root
> already, or there may be some option passed to initramfs to
> not mount these, or there may be other local policy or whatever
> decisions.  All that can't be handled and can't be known to
> switch_root -- this is exactly why we have initramfs/init as
> a script, to be able to handle various local usecases/policies
> and made it extendable.

If you name a command switch-root and not run-init, you'd have
to take care to emmulate what the original command does.

In this case it is util-linux is clearly predating busybox and thus
busybox is buggy not fully implementing the command.

-- 
maks





Removed tag(s) patch. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Fri, 08 Jun 2012 10:54:25 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Fri, 08 Jun 2012 11:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 08 Jun 2012 11:15:11 GMT) Full text and rfc822 format available.

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

From: Michael Tokarev <mjt@tls.msk.ru>
To: maximilian attems <maks@debian.org>
Cc: 676001@bugs.debian.org, debian-kernel@lists.debian.org
Subject: Re: Processed: reassign 676001 to busybox
Date: Fri, 08 Jun 2012 15:10:42 +0400
On 08.06.2012 14:52, maximilian attems wrote:
> dude care to have a bit of patience before reassigning back,
> that be really nice.

I gave a few days, maybe it was too few, I dunno.

> On Tue, Jun 05, 2012 at 08:45:59AM +0400, Michael Tokarev wrote:
[]
>> I disagree it is a busybox problem, and don't think it is a
>> switch_root business (be it from busybox or from util-linux).
> 
> switch_root in util-linux does it.

Yes, but it is still none of its business.

>> There are a few special directories which needs to be moved
>> or umounted.  This includes /proc, /dev, /sys and not mentioned
>> here /run.  These directories might be mounted in the new root
>> already, or there may be some option passed to initramfs to
>> not mount these, or there may be other local policy or whatever
>> decisions.  All that can't be handled and can't be known to
>> switch_root -- this is exactly why we have initramfs/init as
>> a script, to be able to handle various local usecases/policies
>> and made it extendable.
> 
> If you name a command switch-root and not run-init, you'd have
> to take care to emmulate what the original command does.
> 
> In this case it is util-linux is clearly predating busybox and thus
> busybox is buggy not fully implementing the command.

Almost no of busybox commands implements fully the corresponding
"big brother" behavour.

But this is not the point.

The point is, and I described it above, it is none of switch_root
business to move other filesystems, because it does not have enough
information.  We've a long list of actions an initramfs does, and
this list includes mounting many filesystems.  The script which
does that has much more information about what it should do and
how, and has much more chances to report errors (eg, when the new
root does not have /proc or /sys directory or whatever).

Besides, and I also mentioned that in my initial explanation above,
/proc and /sys are not different from any other filesystem which
should be moved to the new root - like /run or /dev.

Now it'd be nice to know why util-linux handles these, but again,
it is not the point at all.  Just move these explicitly, exactly
the way it is done with /run or anything else which might be
needed later.

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Fri, 08 Jun 2012 11:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to maximilian attems <maks@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 08 Jun 2012 11:24:04 GMT) Full text and rfc822 format available.

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

From: maximilian attems <maks@debian.org>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: 676001@bugs.debian.org, debian-kernel@lists.debian.org
Subject: Re: Processed: reassign 676001 to busybox
Date: Fri, 8 Jun 2012 11:22:20 +0000
On Fri, Jun 08, 2012 at 03:10:42PM +0400, Michael Tokarev wrote:
> On 08.06.2012 14:52, maximilian attems wrote:
> > dude care to have a bit of patience before reassigning back,
> > that be really nice.
> 
> I gave a few days, maybe it was too few, I dunno.
> 
> > On Tue, Jun 05, 2012 at 08:45:59AM +0400, Michael Tokarev wrote:
> []
> >> I disagree it is a busybox problem, and don't think it is a
> >> switch_root business (be it from busybox or from util-linux).
> > 
> > switch_root in util-linux does it.
> 
> Yes, but it is still none of its business.

that is your personal opinon and shown to be wrong. (:
 
> > If you name a command switch-root and not run-init, you'd have
> > to take care to emmulate what the original command does.
> > 
> > In this case it is util-linux is clearly predating busybox and thus
> > busybox is buggy not fully implementing the command.
> 
> Almost no of busybox commands implements fully the corresponding
> "big brother" behavour.

well in the cases where it is needed and as busybox doesn't do it is a
bug.
 
> But this is not the point.

No, you clearly again miss the point.
 
> The point is, and I described it above, it is none of switch_root
> business to move other filesystems, because it does not have enough
> information.  We've a long list of actions an initramfs does, and
> this list includes mounting many filesystems.  The script which
> does that has much more information about what it should do and
> how, and has much more chances to report errors (eg, when the new
> root does not have /proc or /sys directory or whatever).

No and again no.

run-init doesn't move mount things, you could rename switch_root
to run-init, then it would be correct.
You confuse things, switch_root is the new command name by util-linux
and it does a certain number of things. It doesn't matter, if
you personally agree with them or not.

Ah and please stop evading into the init script.
thank you.

-- 
maks





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Fri, 08 Jun 2012 16:51:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 08 Jun 2012 16:51:06 GMT) Full text and rfc822 format available.

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

From: Michael Tokarev <mjt@tls.msk.ru>
To: maximilian attems <maks@debian.org>
Cc: debian-kernel@lists.debian.org, debian-boot@lists.debian.org, debian-devel@lists.debian.org, 676001@bugs.debian.org
Subject: Re: Processed: reassign 676001 to busybox
Date: Fri, 08 Jun 2012 20:48:07 +0400
On 08.06.2012 15:28, maximilian attems wrote:
> On Fri, Jun 08, 2012 at 02:59:26PM +0400, Michael Tokarev wrote:
>> [Adding debian-devel@ to the Cc list]
>>
>> Short story (and it is short): the bug has been filed
>> against initramfs-tools initially, it is about how
>> /proc and /sys filesystem should be handled in initramfs
>> when switching to new root.  Original reporter included
>> a trivial patch for initramfs that does re-mounting of
>> these filesystems.  Max reassigned it to busybox without
>> giving any reasonings or comments whatsoever.  I explained
>> that it is none of switch_root business, in
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676001#24 ,
>> and asked to not reassign bugs without giving a word of
>> explanation.  After a few days of inactivity I reassigned
>> this bug back to initramfs, per my explanation.  Now max
>> reassigned it back.
> 
> no, no, you get the story wrong.
> 
> The bug on initramfs-tools side is fixed^Wworked-around.
> I reassigned the *cloned* bug to busybox to have it properly
> fixed there.

Aha.  This makes MUCH more sense now.  Somehow I thought you
reassigned just the original bugreport to busybox.

> please get an ice cream and keep cool.
> No need to make a drama out of a simple single bug.

Without the above explanation ("cloned"), it looked to me
like completely wrong thing to do from your side, and
indeed, I become very upset seeing a reassign again without
explanations/comments (these were somehow received later,
after I already sent the "hot" email out).  That's exactly
what I talked about on the initial reassignment -- lack of
any comments.  Now when you explained and I actually looked
at the bug history and noticed the clone operation (#660297),
things become real again.

And no, I can't get an ice cream.  I've a flu currently with
body temperature being 38.6°C, so I guess an ice cream may do
more harm than good.

And in this context, I can buy the argument about busybox not
implementing switch_root functionality from util-linux.

Thank you for explaining things, and I'm sorry for being
upset for nothing.

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Fri, 08 Jun 2012 17:39:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 08 Jun 2012 17:39:06 GMT) Full text and rfc822 format available.

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

From: Michael Tokarev <mjt@tls.msk.ru>
To: maximilian attems <maks@debian.org>
Cc: 676001@bugs.debian.org
Subject: Re: Processed: reassign 676001 to busybox
Date: Fri, 08 Jun 2012 21:36:19 +0400
On 08.06.2012 15:22, maximilian attems wrote:
> On Fri, Jun 08, 2012 at 03:10:42PM +0400, Michael Tokarev wrote:
>> On 08.06.2012 14:52, maximilian attems wrote:
>>> dude care to have a bit of patience before reassigning back,
>>> that be really nice.
>>
>> I gave a few days, maybe it was too few, I dunno.
>>
>>> On Tue, Jun 05, 2012 at 08:45:59AM +0400, Michael Tokarev wrote:
>> []
>>>> I disagree it is a busybox problem, and don't think it is a
>>>> switch_root business (be it from busybox or from util-linux).
>>>
>>> switch_root in util-linux does it.
>>
>> Yes, but it is still none of its business.
> 
> that is your personal opinon and shown to be wrong. (:

>>> If you name a command switch-root and not run-init, you'd have
>>> to take care to emmulate what the original command does.
>>>
>>> In this case it is util-linux is clearly predating busybox and thus
>>> busybox is buggy not fully implementing the command.
>>
>> Almost no of busybox commands implements fully the corresponding
>> "big brother" behavour.
> 
> well in the cases where it is needed and as busybox doesn't do it is a
> bug.

Switch_root utility in util-linux appeared _after_ the same
utility appeared in busybox.  In util-linux it was implemented
in 2009, http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=commit;h=711ea7307d54caa74aa89fc7e8614236e3721f1c
This command there were taken from dracut apparently.

In there, it has been written in 2002 (I guess), has been
called "switchroot" (no underscore), and it does _umounting_
of /dev, /proc, /sys, as can be seen at
http://pjones.fedorapeople.org/mkstart/usr/lib/mkstart/switchroot.c

In busybox it has been implemented as switch_root in 2005, in this commit:
http://git.busybox.net/busybox/commit/util-linux/switch_root.c?id=0f34a821ab99e4936c7aa4974f58784442172211
which, obviously, pre-dates the same command in util-linux.

There in busybox, it is named switch_root right from the
beginning, and were made after run-init behavour (instead
of the switchroot from dracut).

So we can conclude these implementations (in util-linux
and busybox) are independent and not follows or modelled
from one another.

In dractu, were it umounted /dev /proc /sys instead of
moving these, I guess it was modelled after nash which
was a bad example of shell to use in initrd, it didn't
have most standard shell constructs so it weren't easy
to program in it.  But I can only guess.

[]
> run-init doesn't move mount things, you could rename switch_root
> to run-init, then it would be correct.
> You confuse things, switch_root is the new command name by util-linux
> and it does a certain number of things. It doesn't matter, if
> you personally agree with them or not.
> 
> Ah and please stop evading into the init script.

I'm not.

Thanks,

/mjt




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#676001; Package busybox. (Wed, 04 Jul 2012 16:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@tls.msk.ru>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Wed, 04 Jul 2012 16:27:06 GMT) Full text and rfc822 format available.

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

From: Michael Tokarev <mjt@tls.msk.ru>
To: 676001@bugs.debian.org
Cc: maximilian attems <maks@debian.org>, Vagrant Cascadian <vagrant@debian.org>
Subject: Re: Bug#676001: Processed: reassign 676001 to busybox
Date: Wed, 04 Jul 2012 20:24:43 +0400
severity 676001 wishlist
tags 676001 + wontfix
thanks

As shown, historically it was util-linux which
implemented functionality previously found in busybox,
not the other way around, and as noted several times,
it is none of switch_root business to deal with other
filesystems (it is more a misfeature in util-linux
implementation).

So marking this bug as wontfix, and appropriately
lowering severity.

Thanks,

/mjt

On 08.06.2012 21:36, Michael Tokarev wrote:
> On 08.06.2012 15:22, maximilian attems wrote:
>> On Fri, Jun 08, 2012 at 03:10:42PM +0400, Michael Tokarev wrote:
>>> On 08.06.2012 14:52, maximilian attems wrote:
>>>> dude care to have a bit of patience before reassigning back,
>>>> that be really nice.
>>>
>>> I gave a few days, maybe it was too few, I dunno.
>>>
>>>> On Tue, Jun 05, 2012 at 08:45:59AM +0400, Michael Tokarev wrote:
>>> []
>>>>> I disagree it is a busybox problem, and don't think it is a
>>>>> switch_root business (be it from busybox or from util-linux).
>>>>
>>>> switch_root in util-linux does it.
>>>
>>> Yes, but it is still none of its business.
>>
>> that is your personal opinon and shown to be wrong. (:
> 
>>>> If you name a command switch-root and not run-init, you'd have
>>>> to take care to emmulate what the original command does.
>>>>
>>>> In this case it is util-linux is clearly predating busybox and thus
>>>> busybox is buggy not fully implementing the command.
>>>
>>> Almost no of busybox commands implements fully the corresponding
>>> "big brother" behavour.
>>
>> well in the cases where it is needed and as busybox doesn't do it is a
>> bug.
> 
> Switch_root utility in util-linux appeared _after_ the same
> utility appeared in busybox.  In util-linux it was implemented
> in 2009, http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=commit;h=711ea7307d54caa74aa89fc7e8614236e3721f1c
> This command there were taken from dracut apparently.
> 
> In there, it has been written in 2002 (I guess), has been
> called "switchroot" (no underscore), and it does _umounting_
> of /dev, /proc, /sys, as can be seen at
> http://pjones.fedorapeople.org/mkstart/usr/lib/mkstart/switchroot.c
> 
> In busybox it has been implemented as switch_root in 2005, in this commit:
> http://git.busybox.net/busybox/commit/util-linux/switch_root.c?id=0f34a821ab99e4936c7aa4974f58784442172211
> which, obviously, pre-dates the same command in util-linux.
> 
> There in busybox, it is named switch_root right from the
> beginning, and were made after run-init behavour (instead
> of the switchroot from dracut).
> 
> So we can conclude these implementations (in util-linux
> and busybox) are independent and not follows or modelled
> from one another.
> 
> In dractu, were it umounted /dev /proc /sys instead of
> moving these, I guess it was modelled after nash which
> was a bad example of shell to use in initrd, it didn't
> have most standard shell constructs so it weren't easy
> to program in it.  But I can only guess.
> 
> []
>> run-init doesn't move mount things, you could rename switch_root
>> to run-init, then it would be correct.
>> You confuse things, switch_root is the new command name by util-linux
>> and it does a certain number of things. It doesn't matter, if
>> you personally agree with them or not.
>>
>> Ah and please stop evading into the init script.
> 
> I'm not.
> 
> Thanks,
> 
> /mjt





Severity set to 'wishlist' from 'important' Request was from Michael Tokarev <mjt@tls.msk.ru> to control@bugs.debian.org. (Wed, 04 Jul 2012 16:27:12 GMT) Full text and rfc822 format available.

Added tag(s) wontfix. Request was from Michael Tokarev <mjt@tls.msk.ru> to control@bugs.debian.org. (Wed, 04 Jul 2012 16:27:13 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 16:58:17 2014; Machine Name: beach.debian.org

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