[OE-core] [PATCH 1/4] initramfs-framework: support rootflags and rootfstype boot parameter

Otavio Salvador otavio.salvador at ossystems.com.br
Wed Sep 9 14:10:33 UTC 2015


On Wed, Sep 9, 2015 at 10:10 AM, Patrick Ohly <patrick.ohly at intel.com> wrote:
> These two parameters are supported by the kernel
> (https://www.kernel.org/doc/Documentation/kernel-parameters.txt). When
> an initramfs is used, the kernel does not mount the rootfs and the
> initramfs needs to react to them.
>
> The boot parameters can be set both by the image creator and
> by users.
>
> Supporting these two parameters is useful:
> - rootflags is needed to ensure that the rootfs is already mounted as
>   intended in the time between starting init and init remounting
>   it (as systemd does); this is critical for IMA where iversion must be
>   active already when system starts writing files.
> - setting it correctly up-front avoids messages from the kernel ("cannot
>   mount ... as ext2 because ...") when trying to guess the desired type.
>
> For example, assuming that only one of ext4/ext3/ext2 is set,
> rootfstype could be set in an image recipe with:
> APPEND_append = "${@''.join([' rootfstype=' + i for i in ['ext4', 'ext3', 'ext2'] if i in d.getVar('IMAGE_FSTYPES', True).split()])}"
>
> Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>

Acked-by: Otavio Salvador <otavio at ossystems.com.br>

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the Openembedded-core mailing list