From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.126.131]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WM03k-0005ky-A5 for ptxdist@pengutronix.de; Fri, 07 Mar 2014 20:03:52 +0100 Message-ID: <531A181B.9070203@ctypes.org> Date: Fri, 07 Mar 2014 20:03:55 +0100 From: Thomas Heller MIME-Version: 1.0 References: <5307858C.6030400@ctypes.org> <20140306173500.GK32080@pengutronix.de> In-Reply-To: <20140306173500.GK32080@pengutronix.de> Subject: Re: [ptxdist] fsck at boot Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de 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