From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WLcCC-0004hT-OE for ptxdist@pengutronix.de; Thu, 06 Mar 2014 18:35:00 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1WLcCC-0002Bv-Ma for ptxdist@pengutronix.de; Thu, 06 Mar 2014 18:35:00 +0100 Date: Thu, 6 Mar 2014 18:35:00 +0100 From: Michael Olbrich Message-ID: <20140306173500.GK32080@pengutronix.de> References: <5307858C.6030400@ctypes.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5307858C.6030400@ctypes.org> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de 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