From: ChenQi <Qi.Chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] initrdscripts: add $CMDLINE to init-live switch_root
Date: Fri, 13 Jun 2014 11:32:43 +0800 [thread overview]
Message-ID: <539A70DB.1080102@windriver.com> (raw)
In-Reply-To: <53745ECB.5050909@windriver.com>
On 05/15/2014 02:29 PM, ChenQi wrote:
> On 01/15/2014 07:27 PM, krzysztof.m.sywula@intel.com wrote:
>> From: Krzysztof Sywula <krzysztof.m.sywula@intel.com>
>>
>> init-live.sh: $CMDLINE variable should be provided to switch_root
>> to let user specify runlevel on grub command line.
>> Feeding with -c /dev/console as well as busybox switch_root enables
>> that option.
>>
>> Signed-off-by: Krzysztof Sywula <krzysztof.m.sywula@intel.com>
>> ---
>> meta/recipes-core/initrdscripts/files/init-live.sh | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh
>> b/meta/recipes-core/initrdscripts/files/init-live.sh
>> index bd259b9..7e27f91 100644
>> --- a/meta/recipes-core/initrdscripts/files/init-live.sh
>> +++ b/meta/recipes-core/initrdscripts/files/init-live.sh
>> @@ -89,7 +89,10 @@ boot_live_root() {
>> mount -n --move /dev ${ROOT_MOUNT}/dev
>> cd $ROOT_MOUNT
>> - exec switch_root $ROOT_MOUNT /sbin/init
>> +
>> + # busybox switch_root supports -c option
>> + exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init $CMDLINE ||
>> + fatal "Couldn't switch_root, dropping to shell"
>> }
>> fatal() {
>
> I once sent out a patch to remove the '-c /dev/console' because this
> is busybox specific.
> What if util-linux gets installed in the initramfs?
>
> Could you please state what the benefit is with this option? Maybe in
> the comment?
> The disadvantage is obvious, because if you have util-linux in
> initramfs, the 'switch_root' command doesn't support that option, and
> the 'switch_root' command would always fail.
>
> Best Regards,
> Chen Qi
ping
prev parent reply other threads:[~2014-06-13 3:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 11:27 [PATCH] initrdscripts: add $CMDLINE to init-live switch_root krzysztof.m.sywula
2014-01-15 11:33 ` Otavio Salvador
2014-05-15 6:29 ` ChenQi
2014-06-13 3:32 ` ChenQi [this message]
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=539A70DB.1080102@windriver.com \
--to=qi.chen@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/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