Re: [LEDE-DEV] x86 auto fsck at boot possible?

2018-02-20 Thread Jeff Ahrenholz
>> How can I enable automatic fsck.ext4 on x86?

In response to your original question, you could call e2fsck from the script 
file package/base-files/files/lib/preinit/80_mount_root prior to mounting the 
root fs.

-Jeff
  

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] x86 auto fsck at boot possible?

2018-02-20 Thread Nishant Sharma

Hi Daniel,

On Monday 19 February 2018 09:44 PM, Daniel Golle wrote:

Many thanks for your reply.


How can I enable automatic fsck.ext4 on x86?


Your description sounds like you are using ext4 as a root filesystem
without an overlay on top. The option of having a read-write rootfs
instead of squashfs+overlay is mostly intended for development
purposes (such as working on features happening early during boot and
hence before the r/w-overlay has been mounted).


Yes, I am using ext4 on rootfs. I was not aware of the caveats that you 
have just mentioned.



For use in production, I'd always use squashfs-based images having an
overlay on top -- there shouldn't be a need for fsck with ext4 or
f2fs as both allow to replay the journal and clean things up when being
mounted. This just won't work when mounted by the kernel using the
root= parameter in read-only mode (replaying the journal and fixing
things will write stuff in the end and is hence not allowed when
mounting read-only). The later read-write remount also won't allow that
because the filesystem is already mounted.

Is there any reason why you choose to have a read-write rootfs instead
of the squashfs+overlay approach?


I simply built the images by adding more packages and used the default 
combined-ext4 image built by the buildroot. Would using squashfs images 
generated by buildroot be fine? I would like to use additional space 
available on the SSD on /overlay.


I am building a squashfs image and will post if I need further clarity.

Thanks & regards,
Nishant

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] x86 auto fsck at boot possible?

2018-02-19 Thread Nishant Sharma

Hi,

I have a few PCEngines APUs and Alix running OpenWrt. At times the 
filesystem is found to be in read-only mode and I need to do fsck and 
then reboot in order to make config changes.


How can I enable automatic fsck.ext4 on x86?

Thanks in advance.

Regards,
Nishant

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev