/dev/mmcblk0p3 / ext4 defaults,noatime 0 2
Checking file systems...WARNING:File system errors were found and have been corrected,but the nature of the errors require this system to be rebooted.After you press enter, this system will be rebooted.Press Enter to continue...
--
You received this message because you are subscribed to the Google Groups "Mender List mender.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mender+un...@lists.mender.io.
To post to this group, send email to men...@lists.mender.io.
Visit this group at https://groups.google.com/a/lists.mender.io/group/mender/.
Hi Don,
We've been experimenting with that lately and it seems that if you change fstab to reference /dev/root instead it all "just works". The assumption is that is kernel magic to simply refer to whatever rootfs is specified on the kernel command line.
Drew
Checking file systems...fsck.ext4: No such file or directory while trying to open /dev/rootFAILUREFile system errors were encountered that could not be fixed automatically.This system cannot continue to boot and will therefore be halteduntil those errors are fixed manually by a System Administrator.After you press Enter, this system will be halted and powered off.
Speaking about your concerns re power failure mid-way writing SD: don't worry about it as mender writes incoming update to inactive partition, then reads it back to validate, and only then reboots to use a new update. So power failure in the middle of update will only appear as failed update in mender UI. Then you just retry it.
In regards to corruption you've got: have seen in before. It is caused by cache in linux system - not everything gets written before you start to use it. We ended up mounting our images through guestmount because it can work directly on whole SD card image. Or you may use loop device in case of single partition.
Notably no noatime option is needed as your root partition should be normally read-only.
--
--
And BTW: as you use Raspberry don't forget to arm the watchdog in uboot. It will reset your board if a new artifact does not start in 15 seconds and will roll back to previous image automatically. My images boot on Raspberry Pi 3 model B in around three seconds: plenty of time left to get watchdog kicked by systemd.
On Mon, 30 Jul 2018, 05:16 Vladimir Bashkirtsev <vbashk...@gmail.com> wrote:I do understand that you use mkfs.ext4 with -d option. But that's exactly what I found to fail because of caching issues. And I do not speak about SD - just plain HDD. mkfs.ext4 uses lower level calls to populate file system and they are not flushed immediately (and in fact may be delayed considerably). If you will try to use a file which has ext4 created this way in a few seconds after (in my tests even after 30 seconds) by means of fopen then it is likely not to have all writes completed - hence corrupted image. When I saw it for the first time I was stunned but looking through e2fsprogs code makes things fairly clear: they bypass many system layers to make creation of file system efficient. Loop mount is much better way as umount will definitely flush every outstanding write.
--
To get a watchdog on Raspberry going you need three things:1. Enable Broadcom watchdog in u-boot configuration
2. Enable Broadcom watchdog in the kernel you run. Plain vanilla Raspbian kernel already has it.
3. A userland daemon (watchdog - what an unexpected choice of name!) which will be poking watchdog device once in no less 15 seconds (recommended a half of watchdog maximum - 8 seconds for Raspberry). All that daemon does is writing a string "15" (number of seconds till reset) to /dev/watchdog every 8 seconds - so you can implement it yourself by callingecho 15 > /dev/watchdogsleep 8in a loop.
--
Correct option to turn on watchdog for Raspberry is CONFIG_BCM2835_WDT (both in u-boot and kernel)
--
--
config WATCHDOG_HANDLE_BOOT_ENABLEDbool "Update boot-enabled watchdog until userspace takes over"default yhelpThe default watchdog behaviour (which you get if you say Y here) isto ping watchdog devices that were enabled before the driver hasbeen loaded until control is taken over from userspace using the/dev/watchdog file. If you say N here, the kernel will not updatethe watchdog on its own. Thus if your userspace does not start fastenough your device will reboot.
--
Or even better way to resolve your issue if you can rebuild your kernel:config WATCHDOG_HANDLE_BOOT_ENABLEDbool "Update boot-enabled watchdog until userspace takes over"default yhelpThe default watchdog behaviour (which you get if you say Y here) isto ping watchdog devices that were enabled before the driver hasbeen loaded until control is taken over from userspace using the/dev/watchdog file. If you say N here, the kernel will not updatethe watchdog on its own. Thus if your userspace does not start fastenough your device will reboot.On Thu, 2 Aug 2018, 01:34 Don Cross <cosin...@gmail.com> wrote:On Wed, Aug 1, 2018 at 1:50 AM Vladimir Bashkirtsev <vbashk...@gmail.com> wrote:Correct option to turn on watchdog for Raspberry is CONFIG_BCM2835_WDT (both in u-boot and kernel)
--