[OE-core] systemd/busybox fsck fail to run

Khem Raj raj.khem at gmail.com
Wed Sep 5 20:25:21 UTC 2018



On 9/5/18 5:46 AM, Andrej Valek wrote:
> Hi Alex,
> 
> There could be multiple options, how to handle this.
> 
> My 2cents about this problem:
>  1. Use update-alternatives to handle this
>  2. Rework busybox itself to handle this option
>  3. Just create a patch to ignore this option
> 

I am not sure if systemd-fsck is supposed to work with anything other
than util-linux and e2progfs tools. So lets add a hard dependency in
systemd for this.

> Cheers,
> Andrej
> 
> On 09/05/18 10:37, Alex Kiernan wrote:
>> I've just come across a box with a corrupt filesystem which wasn't
>> being cleaned (using systemd and busybox):
>>
>> Aug 29 16:03:22 localhost systemd-fsck[143]: read_bad_blocks_file: No
>> such file or directory while trying to open -M
>> Aug 29 16:03:22 localhost systemd-fsck[143]: Warning: fsck.ext4
>> /dev/mmcblk0p4 terminated by signal 8
>> Aug 29 16:03:22 localhost systemd-fsck[143]: fsck failed with exit status 8.
>> Aug 29 16:03:22 localhost systemd-fsck[143]: Ignoring error.
>> Aug 29 16:03:22 localhost systemd[1]:
>> systemd-fsck at dev-mmcblk0p4.service: cgroup is empty
>> Aug 29 16:03:22 localhost systemd[1]:
>> systemd-fsck at dev-mmcblk0p4.service: Child 143 belongs to
>> systemd-fsck at dev-mmcblk0p4.service.
>> Aug 29 16:03:22 localhost systemd[1]:
>> systemd-fsck at dev-mmcblk0p4.service: Main process exited, code=exited,
>> status=0/SUCCESS
>> Aug 29 16:03:22 localhost systemd[1]:
>> systemd-fsck at dev-mmcblk0p4.service: Changed start -> exited
>> Aug 29 16:03:22 localhost systemd[1]:
>> systemd-fsck at dev-mmcblk0p4.service: Job
>> systemd-fsck at dev-mmcblk0p4.service/start finished, result=done
>> Aug 29 16:03:22 localhost systemd[1]: Started File System Check on
>> /dev/mmcblk0p4.
>>
>> It turns out systemd-fsck unconditionally passes `-l` to lock the filesystem:
>>
>> https://github.com/systemd/systemd/blame/master/src/fsck/fsck.c#L408
>>
>> which busybox fsck doesn't interpret and so passes on to fsck.ext4,
>> which then interprets it as a badblocks file...
>>
>> What's the right answer here? Add a patch to busybox fsck so it just
>> ignores `-l`, or do we need something more sophisticated?
>>
>> Obviously swapping in util-linux-fsck works around the problem.
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180905/3822af07/attachment-0002.sig>


More information about the Openembedded-core mailing list