* [ptxdist] fsck at boot
@ 2014-02-21 16:57 Thomas Heller
2014-03-06 17:35 ` Michael Olbrich
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Heller @ 2014-02-21 16:57 UTC (permalink / raw)
To: ptxdist
I have an SD card (formatted vfat) in my system where logfiles
are written to. Sometimes (after system crashes because of
heavy EMI) the file system gets damaged and on the next boot
the SD card is mounted read-only. I can manually run
'fsck.vfat -a /dev/mmcblk0p1' to repair it.
How can I configure ptxdist so that this command is automatically
run after booting? I tried setting the 6. field in /etc/fstab to '2'
instead of '0', I tried creating a file '/forcefsk', but it seems
nothing helped.
Any tips?
Thanks, Thomas
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] fsck at boot
2014-02-21 16:57 [ptxdist] fsck at boot Thomas Heller
@ 2014-03-06 17:35 ` Michael Olbrich
2014-03-07 19:03 ` Thomas Heller
0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2014-03-06 17:35 UTC (permalink / raw)
To: ptxdist
On Fri, Feb 21, 2014 at 05:57:48PM +0100, Thomas Heller wrote:
> I have an SD card (formatted vfat) in my system where logfiles
> are written to. Sometimes (after system crashes because of
> heavy EMI) the file system gets damaged and on the next boot
> the SD card is mounted read-only. I can manually run
> 'fsck.vfat -a /dev/mmcblk0p1' to repair it.
>
> How can I configure ptxdist so that this command is automatically
> run after booting? I tried setting the 6. field in /etc/fstab to '2'
> instead of '0', I tried creating a file '/forcefsk', but it seems
> nothing helped.
>
> Any tips?
This is with busybox init, right? You could replace /etc/init.d/rcS with
your own in projectroot/ and add something before "mount -a". Probably
"fsck -A" I think.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] fsck at boot
2014-03-06 17:35 ` Michael Olbrich
@ 2014-03-07 19:03 ` Thomas Heller
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Heller @ 2014-03-07 19:03 UTC (permalink / raw)
To: ptxdist
Am 06.03.2014 18:35, schrieb Michael Olbrich:
> On Fri, Feb 21, 2014 at 05:57:48PM +0100, Thomas Heller wrote:
>> I have an SD card (formatted vfat) in my system where logfiles
>> are written to. Sometimes (after system crashes because of
>> heavy EMI) the file system gets damaged and on the next boot
>> the SD card is mounted read-only. I can manually run
>> 'fsck.vfat -a /dev/mmcblk0p1' to repair it.
>>
>> How can I configure ptxdist so that this command is automatically
>> run after booting? I tried setting the 6. field in /etc/fstab to '2'
>> instead of '0', I tried creating a file '/forcefsk', but it seems
>> nothing helped.
>>
>> Any tips?
>
> This is with busybox init, right? You could replace /etc/init.d/rcS with
> your own in projectroot/ and add something before "mount -a". Probably
> "fsck -A" I think.
>
Yes, this works. "fsck -Aa".
It is still required, however, to set the 6. field in /etc/fstab to '1'
instead of '0', and to specify the filesystem type in the 3. field. If
the latter is not done fsck complains about a missing fsck.auto.
Thanks,
Thomas
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-07 19:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21 16:57 [ptxdist] fsck at boot Thomas Heller
2014-03-06 17:35 ` Michael Olbrich
2014-03-07 19:03 ` Thomas Heller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox