Re: Problems with Ext2fs on a CF card.
- From: jj@xxxxxxxxxxxxxx (Jim Jackson)
- Date: Mon, 21 May 2007 21:32:15 +0000 (UTC)
Mic <michaelzwrk@xxxxxxxxx> wrote:
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
no. first you do an fdisk and setup the partition(s), even if it is only
one partition. After you have setup the partion(s), then you use mkfs
to make the kind of file system you want on each partition e.g.
mkfs -t ext2 /dev/hda1
If you can't fdisk it then something is up.
When you've made your partitions in fdisk you have done the 'w' command to
write the partition table to disk?
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:
------------------------
1. 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
16 heads, 63 sectors/track, 993 cylinders
Units = cylinders of 1008 * 512 = 516096 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
2. 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.
3. After booting from CF, and rebooting over NFS to run fsck:
3. 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<y>? yes
Free blocks count wrong for group #23 (768, counted=769).
Fix<y>? yes...
Thanks for your help,
Michael
.
- Follow-Ups:
- References:
- Problems with Ext2fs on a CF card.
- From: Mic
- Problems with Ext2fs on a CF card.
- Prev by Date: Re: librarys on target
- Next by Date: Re: Most mature Linux GSM SMS box...
- Previous by thread: Problems with Ext2fs on a CF card.
- Next by thread: Re: Problems with Ext2fs on a CF card.
- Index(es):
Relevant Pages
|