All of lore.kernel.org
 help / color / mirror / Atom feed
* automatic fsck?
@ 2009-03-13 18:38 JustinLove
  2009-03-15 20:45 ` Dmitry Artamonow
  0 siblings, 1 reply; 3+ messages in thread
From: JustinLove @ 2009-03-13 18:38 UTC (permalink / raw)
  To: openembedded-devel

I routinely had problems with ext2 that were fixed by fsck.  I switched to 
ext3, but there are still occasions where the filesystem gets wedged, but a 
simple fsck restores it.  Is it possible to run fsck automatically on startup, 
as many desktop systems do?  The kernel startup messages are telling me

EXT3-fs warning: maximal mount count reached, running e2fsck is recommended

I realize that most of the mechanics involve files on root, which won't do much 
good if the filesystem is corrupted.  Long term plan is to repartition and make 
root readonly, but I'd still like fsck for the other partitions.

Environment:

Linux beagleboard 2.6.27-omap1 #1 Wed Jan 14 07:47:57 CST 2009 armv7l unknown

Angstorm on beagleboard, running from SD card with 2 partitions, FAT/ext3


So far I've figured out:

- fstab has '1' in last column for rootfs
- Install e2fsprogs-fsck and/or e2fsprogs-e2fsck
- change ENABLE_ROOTFS_FSCK=yes in /etc/default/rcS
- Specify "ro" on kernel command line
- "shutdown -F -r now", but this has no effect, I still get the warning message

What am I missing?

-- 
Justin Love

Creative Electronics & Software
650 Sundown Road
South Elgin, IL 60177

Phone 847-695-0023 x233
FAX   847-695-0483




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: automatic fsck?
  2009-03-13 18:38 automatic fsck? JustinLove
@ 2009-03-15 20:45 ` Dmitry Artamonow
  2009-03-16 19:19   ` JustinLove
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Artamonow @ 2009-03-15 20:45 UTC (permalink / raw)
  To: openembedded-devel

On 13:38 Fri 13 Mar     , JustinLove wrote:

> So far I've figured out:
>
> - fstab has '1' in last column for rootfs
> - Install e2fsprogs-fsck and/or e2fsprogs-e2fsck
> - change ENABLE_ROOTFS_FSCK=yes in /etc/default/rcS
> - Specify "ro" on kernel command line
> - "shutdown -F -r now", but this has no effect, I still get the warning 
> message
>
> What am I missing?

If I remember correctly, you also need to specify your fs type (ext3 instead
of auto) and real device (/dev/mmcblk0p2 instead of rootfs) in your
fstab. Maybe that'll help.

In fact there's other problem, and much bigger - by default rootfs
gets mounted with 'defaults' option, and it silently wears your flash,
because 'defaults' imply atime turned on. It may be one of the causes
of FS corruption too. Guess, I'll roll a patch fixing that.

-- 
Best regards,
Dmitry "MAD" Artamonow




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: automatic fsck?
  2009-03-15 20:45 ` Dmitry Artamonow
@ 2009-03-16 19:19   ` JustinLove
  0 siblings, 0 replies; 3+ messages in thread
From: JustinLove @ 2009-03-16 19:19 UTC (permalink / raw)
  To: openembedded-devel

Dmitry Artamonow wrote:
> If I remember correctly, you also need to specify your fs type (ext3 instead
> of auto) and real device (/dev/mmcblk0p2 instead of rootfs) in your
> fstab. Maybe that'll help.

One or both of those was successful.  Guess I was unscientific in applying both 
at once ;^)

> In fact there's other problem, and much bigger - by default rootfs
> gets mounted with 'defaults' option, and it silently wears your flash,
> because 'defaults' imply atime turned on. It may be one of the causes
> of FS corruption too. Guess, I'll roll a patch fixing that.

I also added 'noatime' to fstab, but 'mount' does not show noatime set for 
either rootfs or /dev/root.

I tried using rootflags=noatime on the kernel command line, but it said it was 
an unrecognized mount option, and failed to mount root at all.

-- 
Justin Love

Creative Electronics & Software
650 Sundown Road
South Elgin, IL 60177

Phone 847-695-0023 x233
FAX   847-695-0483




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-16 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-13 18:38 automatic fsck? JustinLove
2009-03-15 20:45 ` Dmitry Artamonow
2009-03-16 19:19   ` JustinLove

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.