Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Check root file system at boot time
Date: Fri, 6 Jun 2014 18:51:46 +0200	[thread overview]
Message-ID: <20140606165146.GC3481@free.fr> (raw)
In-Reply-To: <1402072948875-71738.post@n4.nabble.com>

Pedro, All,

On 2014-06-06 09:42 -0700, psnsilva spake thusly:
> I am generating the ext4 file system within buildroot. What I did here was,
> after the first boot, to force the check every boot issuing the command
> "tune2fs -C 2 -c 1 /dev/mmcblk0p2". But seems like I have no need for doing
> it.

Ah, OK. No it is not needed. Upon mounted an uncleanly unmounted
filesystem, the kernel will (try to) repair it.

Note however, that if the filesystem is that badly damaged that the
kernel can't even repair it, your screwed. fsck might have a better
chance of fixing the filesystem.

Really, if you expect the filesystem to be often uncleanly unmounted.
you should switch to a read-only filesystem for your / mountpoint (eg.
squashfs). An alternative would be to use a flash-optimised filesystem,
like jffs2, which is designed to recover from untimely power failures to
start with. But jffs2 can sit on a block device, you'd need a reverse
translation layer (eg. blockmtd) to emulate a flash on a block device.

Or, if your filesystem is small enough, put it entirely in an initramfs,
so it is purely in RAM (and only mount your persistent-data filesystem
from the SDcard.)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

      reply	other threads:[~2014-06-06 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 16:02 [Buildroot] Check root file system at boot time psnsilva
2014-06-04 17:09 ` Yann E. MORIN
2014-06-05 10:25   ` psnsilva
2014-06-05 19:21     ` Yann E. MORIN
2014-06-06 13:46       ` psnsilva
2014-06-06 16:27         ` Yann E. MORIN
2014-06-06 16:42           ` psnsilva
2014-06-06 16:51             ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140606165146.GC3481@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox