From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Check root file system at boot time
Date: Wed, 4 Jun 2014 19:09:14 +0200 [thread overview]
Message-ID: <20140604170914.GA3325@free.fr> (raw)
In-Reply-To: <1401897756168-71600.post@n4.nabble.com>
Pedro, All,
On 2014-06-04 09:02 -0700, psnsilva spake thusly:
> I am facing a problem with checking my root file system at boot time and I
> don't know what I am missing here.
> The target device is a Raspberry Pi and my intention is to check the SD card
> at boot time.
This should not be necessary if the system is properly shut down or
rebooted. In case of power failure, the filesystem is automatically
checked by the filesystem "driver" in the kernel.
Besides, with the standard Buildroot boot process, the root filesystem is
already mounted by the time you can run e2fsck, so you're out of luck in
any case.
> and running "*e2fsck -n /dev/mmcblk0p2*" I get:
> e2fsck -n /dev/mmcblk0p2
You should *not* run fsck on a read-write mounted filesystem. This could
gravely confuse the filesystem "driver" in the kernel.
> In addition, running e2fsck to the SD card, but using my Linux PC is
> working. At the next rPi boot the messages does not appear. Reappearing
> again on the the second and following boots.
>
> Am I missing some needed scripts at /etc/init.d/ (e.g., SXXcheckroot)?
How do you turn off your RPi? If you just unplug the power from the RPI
without doing a proper shutdown, then it is expected the filesystem will
be incoherent, and a repair is done on the next boot.
I have a bunch of RPi herre at home, and I never experienced this
behaviour when I issue a "shutdown" or a "poweroff" command before
unplugging the power supply.
BTW, the "poweroff" command will not power off the RPI, obviously, since
it lacks a power control circuit, but will flash the "ACT" LED 10 times
when it is safe to remove the power supply from the RPi (I discovered
that by accident, and it is very handy on a headless RPi!)
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. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2014-06-04 17:09 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 [this message]
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
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=20140604170914.GA3325@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