Hi. I use a Compact Flash card (SanDisk) to hold an ext2 Linux File System on an embedded system, running 2.6 Linux. The CF is connected in true IDE mode. I have numerous problems running a File System from the CF: mkfs does not work on partitions, fsck reports errors after booting from the CF etc. and the FS gets corrupted over time. Below is the procedure I follow to put the FS on the CF. Please advise if you recognize any faults in the procedure or have any idea what else I can check - any help is most welcome.
Here is what I do:
------------------------ Boot over NFS mkfs.ext2 /dev/hda mount -t ext2 /dev/hda /mnt/hda/ cd /mnt/hda tar -xvjf /my_file_system.tar.bz2 Boot over CF.
Notes and Problems I see:
------------------------
- cannot mkfs partition if I use fdisk to create partitions (i.e. hda1, hda2), mkfs fails. That's why I run it straight on /dev/hda. fdisk: Disk /dev/hda: 512 MB, 512483328 bytes
Device Boot Start End Blocks Id System /dev/hda1 1 497 250456+ 83 Linux /dev/hda2 498 993 249984 83 Linux
mkfs.ext2 /dev/hda1 mke2fs 1.38 (30-Jun-2005) mkfs.ext2: No such file or directory while trying to determine filesystem size
- fsck complains right after untar fsck -t ext2 /dev/hda fsck 1.38 (30-Jun-2005) e2fsck 1.38 (30-Jun-2005) /dev/hda was not cleanly unmounted, check forced.
- After booting from CF, and rebooting over NFS to run fsck:
- After reboot from CF, another reset: fsck -t ext2 /dev/hda fsck 1.38 (30-Jun-2005) e2fsck 1.38 (30-Jun-2005) /dev/hda was not cleanly unmounted, check forced. Pass 1: Checking inodes, blocks, and sizes Inode 85069, i_blocks is 16, should be 2. Fix? yes Free blocks count wrong for group #23 (768, counted=769). Fix? yes...
Thanks for your help, Michael