From: Stefan Agner <stefan@agner.ch>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] busybox: avoid circular dependency when using initramfs
Date: Tue, 06 Sep 2016 10:51:15 -0700 [thread overview]
Message-ID: <99dad66f7f15b748ecf124e12a8a0abf@agner.ch> (raw)
In-Reply-To: <D66BCC92-E85B-4BCA-AB12-2517146B91C9@gmail.com>
On 2016-09-06 09:35, Khem Raj wrote:
>> On Sep 4, 2016, at 1:25 PM, Stefan Agner <stefan@agner.ch> wrote:
>>
>> The kernel does not automatically mount devtmpfs when using initramfs
>> based booting (even when using CONFIG_DEVTMPFS_MOUNT). If the rootfs
>> is built with USE_DEVFS=1 (which is the default), the system ends up
>> with a completely empty /dev to begin with.
>>
>> Busybox uses the first entry in inittab slightly different than
>> other init systems:
>> <id>: WARNING: This field has a non-traditional meaning for BusyBox init!
>>
>> The id field is used by BusyBox init to specify the controlling tty for
>> the specified process to run on. The contents of this field are
>> appended to "/dev/" and used as-is.
>>
>> Since /dev/null is not there yet, Busybox throws errors instead of
>> executing the commands, and hence never mounts devtmpfs:
>> init started: BusyBox v1.24.1 (2016-09-04 11:53:14 PDT)
>> can't open /dev/null: No such file or directory
>> can't open /dev/null: No such file or directory
>> can't open /dev/null: No such file or directory
>> can't open /dev/null: No such file or directory
>> can't open /dev/null: No such file or directory
>> can't open /dev/null: No such file or directory
>> can't open /dev/null: No such file or directory
>>
>> Avoid this circular dependency by not specifing <id>. With that
>> Busybox ends up using the stdio of the init process and executes
>> the inittab just fine.
>
> This looks good. Have you also tested it when using busybox/mdev as main
> init system just not in initramfs
>
I remember that I tried it once with squashfs and ramdisk, which, as far
as I can recall, behaves as if it is a regular rootfs wrt devtmpfs
mount...
--
Stefan
prev parent reply other threads:[~2016-09-06 17:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-04 20:25 [PATCH] busybox: avoid circular dependency when using initramfs Stefan Agner
2016-09-06 16:35 ` Khem Raj
2016-09-06 17:51 ` Stefan Agner [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=99dad66f7f15b748ecf124e12a8a0abf@agner.ch \
--to=stefan@agner.ch \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/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