[meta-freescale] [PATCH] wks: add a kickstart file with vfat boot and ext4 rootfs partition

Stefan Agner stefan.agner at toradex.com
Wed Sep 13 14:20:36 PDT 2017


On 13.09.2017 07:55, Otavio Salvador wrote:
> Hello Max,
>
> On Wed, Sep 13, 2017 at 11:41 AM, Max Krummenacher <max.oss.09 at gmail.com> wrote:
> ...
>> Its systemd which makes the difference, with SysVinit (or something
>> else in a poky setup)
>> the not mountable fstab line seems to be simply ignored.
>> If using systemd init gets delayed by a 1.5 minute waiting for the
>> device and then you get
>> something like this:
>>
>>     Welcome to emergency mode! After Press Enter for maintenance
>>     (or press Control-D to continue):
>>
>> /etc/fstab looks like this:
>>     # stock fstab - you probably want to override this with a machine
>> specific one
>>
>>     /dev/root            /                    auto       noatime
>>         1  1
>>     proc                 /proc                proc       defaults
>>         0  0
>>     devpts               /dev/pts             devpts
>> mode=0620,gid=5       0  0
>>     usbdevfs             /proc/bus/usb        usbdevfs   noauto
>>         0  0
>>     tmpfs                /run                 tmpfs
>> mode=0755,nodev,nosuid,strictatime 0  0
>>     tmpfs                /var/volatile        tmpfs      defaults
>>         0  0
>>
>>     # uncomment this if your device has a SD/MMC/Transflash slot
>>     #/dev/mmcblk0p1       /media/card          auto
>> defaults,sync,noauto  0  0
>>
>>     /dev/mmcblkp1    /boot    vfat    defaults    0    0
>>
>> On the Colibri iMX6 the boot partition would be /dev/mmcblk1p1, on the
>> Nitrogen6x /dev/mmcblk0p1.
>> By using the add kickstarter file wic does not modify fstab and the
>> last entry is simply not there.
> Right so we need to fix the root cause of it and not drop the
> partition set. Fabio please try to reproduce it and see if we can
> provide the right fstab for boot. The wic command line we added to not
> change the fstab, as well as a well defined fstab on base-files should
> do the trick.
>

I guess / is a bit different here since it just uses /dev/root, in the end the mmcblk comes from the boot arguments (root=).

One could probably just define the proper mmcblkX with the --disk argument, but that does not work since mmcblk devices are not stable. E.g. if you use the second SDHC controller for an eMMC, and the first SDHC controller is available externally for SD cards, you root device is mmcblk0 if there is no SD card available, and mmcblk1 if there is one available.. At least on mainline that is the case. There are patches floating around which provide a more stable block device name. But the official answer is PARTUUID. So I guess one would have to teach wks PARTUUID support for fstab generation...

Personally I also like to have /boot mounted to the partition where the kernels are, even if that is an external FAT partition... That is also the case on regular Linux distros booting with UEFI.

But Max approach would work around that issue for now until PARTUUID support is available...

--
Stefan


More information about the meta-freescale mailing list