Author Topic: e2fsck for ext2 SD cards  (Read 2501 times)

markk

  • Newbie
  • *
  • Posts: 10
    • View Profile
e2fsck for ext2 SD cards
« on: October 28, 2004, 12:18:08 pm »
I've been trying to work out the best place to put
Code: [Select]
e2fsck -y /dev/mmcda1in my startup scripts. I think this is necessary as many problems seem to stem from cumulative errors on the SD card.

Various suggestions on the OpenEmbedded Wiki (OpenZaurusFineTuning, How to setup OpenZaurus with SD card as root filesystem) have also implied this, but there doesn't appear to be a definitive answer anywhere.

This proot script includes the check, but has the line commented out. Alternatively it could go somewhere in /etc/init.d/mountall.sh or even /etc/init.d/sd.

Any ideas?
SL-5500 | OE selfbuilt GPE (64/0) | 128MB Impact SD | 128MB Lexar CF | Linksys WCF12 Wifi CF

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
e2fsck for ext2 SD cards
« Reply #1 on: October 28, 2004, 04:12:07 pm »
As a general rule, I put my custom startup stuff in separate scripts (I copy something in /etc/init.d and edit). It gives me more flexibility (I can change when the script is to be run) and easier administration (it's easier to remember where I put things and also easier to back up). I suggest you create something like /etc/init.d/sdfsck and put it there.

z.
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

oxstone

  • Newbie
  • *
  • Posts: 26
    • View Profile
e2fsck for ext2 SD cards
« Reply #2 on: October 29, 2004, 09:13:42 pm »
Quote
I've been trying to work out the best place to put
Code: [Select]
e2fsck -y /dev/mmcda1in my startup scripts. I think this is necessary as many problems seem to stem from cumulative errors on the SD card.

Various suggestions on the OpenEmbedded Wiki (OpenZaurusFineTuning, How to setup OpenZaurus with SD card as root filesystem) have also implied this, but there doesn't appear to be a definitive answer anywhere.

This proot script includes the check, but has the line commented out. Alternatively it could go somewhere in /etc/init.d/mountall.sh or even /etc/init.d/sd.

Any ideas?
The problem is that e2fsck isn't included in the default 3.5.1 ROM. That explains why the e2fsck line is commented in the "proot" script you talked about: it's supposed to be ran on a freshly flashed Zaurus.
You could install the e2fsprogs-e2fsck package and un-comment the e2fsck line in the script. Tell us if that works!

otzenpunk

  • Newbie
  • *
  • Posts: 8
    • View Profile
e2fsck for ext2 SD cards
« Reply #3 on: November 01, 2004, 10:42:51 am »
Quote
Quote
I've been trying to work out the best place to put
Code: [Select]
e2fsck -y /dev/mmcda1in my startup scripts. I think this is necessary as many problems seem to stem from cumulative errors on the SD card.

Various suggestions on the OpenEmbedded Wiki (OpenZaurusFineTuning, How to setup OpenZaurus with SD card as root filesystem) have also implied this, but there doesn't appear to be a definitive answer anywhere.

This proot script includes the check, but has the line commented out. Alternatively it could go somewhere in /etc/init.d/mountall.sh or even /etc/init.d/sd.

Any ideas?
The problem is that e2fsck isn't included in the default 3.5.1 ROM. That explains why the e2fsck line is commented in the "proot" script you talked about: it's supposed to be ran on a freshly flashed Zaurus.
You could install the e2fsprogs-e2fsck package and un-comment the e2fsck line in the script. Tell us if that works!

How to setup OpenZaurus with SD card as root filesystem has a proot file with the e2fsck line enabled. I use it and it works for me. Obviously you have to install the e2fsprogs-e2fsck package to the original (flash rom) installation and not to the sd card installation. Only thing I had to do was booting without sd card, installing the package to root directory and reboot with the sd card inserted.