• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: SD Card Disk Errors on Reset  (Read 1614 times)
byteman
Newbie
*

Karma: 1
Posts: 26


View Profile
« on: February 27, 2010, 08:39:33 AM »

I formatted a sd card per the instructions here: http://www.openplug.org/plugwiki/index.php/SD_Card_As_Root_File_System.  I am able to boot from the SD Card and I have installed a later kernel 2.6.32.4

Every time I reset (using the pin hole), I start getting disk errors like the following:

Code:
EXT2-fs error (device mmcblk0p1): ext2_lookup: deleted inode referenced: 137702
I don't recall this happening when I was booting from the nand and resetting.  I can't always do a terminal shutdown.  Seems like the SD Card is caching its "writes" or something.  Any suggestions??
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 440


View Profile WWW
« Reply #1 on: February 27, 2010, 11:57:27 AM »

I can't always do a terminal shutdown.  Seems like the SD Card is caching its "writes" or something.  Any suggestions??
The OS caches writes.  Always has.  You need to cleanly shutdown filesystems when shutting down, which means you have to do a clean shutdown, not a reset.
You could set up an action in udev so that when you attach a particular USB device the system reboots.  You'd just need to make sure it's not something you want to actually use on the system, and to remove it as soon as the shutdown is underway to prevent a reboot loop.
Logged

byteman
Newbie
*

Karma: 1
Posts: 26


View Profile
« Reply #2 on: February 27, 2010, 03:34:37 PM »

Quote
The OS caches writes.  Always has.

I was afraid of that - thought there maybe was some way to turn this off.

Anyway, I like your suggestion - thanks!
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #3 on: February 27, 2010, 03:55:44 PM »

man mount -> sync

       sync   All I/O to the file system should be done synchronously. In case
              of  media  with  limited number of write cycles (e.g. some flash
              drives) "sync" may cause life-cycle shortening.
Logged

byteman
Newbie
*

Karma: 1
Posts: 26


View Profile
« Reply #4 on: February 27, 2010, 06:49:43 PM »

Quote
man mount -> sync

So in my case, the SD card is booting the operating system (as I understand it).  So where do I stick the "sync" option?
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #5 on: February 28, 2010, 01:58:56 AM »

depends on the exact bot setup. If you boot with initrd, just put it in /etc/fstab. If your setup does a remount of the rootfs, just put it in /etc/fstab. If you only specify rootfs on the kernel command line, pass it as rootflags from u-boot.
Logged

Pages: [1]
Print
Jump to: