LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ext2 filesystem mount problem (https://www.linuxquestions.org/questions/linux-newbie-8/ext2-filesystem-mount-problem-4175450409/)

beandigital 02-16-2013 06:00 AM

ext2 filesystem mount problem
 
Hi

I formatted a hard disk from my pc with ext2. I am using this hard drive in an embedded system. When I plug the hard drive into the embedded system and try to mount it I get the following error.

mount -t ext2 /dev/sda /mnt/sda
EXT2-fs (sda1): error: ext2_check_descriptors: Block bitmap for group 0 not in group (block 50462976)!
EXT2-fs (sda1): group descriptors corrupted
mount: mounting /dev/sda1 on /mnt/ failed: Invalid argument

Can anyone tell me what this means?

Thanks

Jon

druuna 02-16-2013 06:05 AM

Quote:

mount -t ext2 /dev/sda /mnt/sda
Is there a typo here (/dev/sda vs /dev/sda1)?

Retry using this:
Code:

mount -t ext2 /dev/sda1 /mnt/sda

beandigital 02-16-2013 09:25 AM

Sorry I meant to write sda1. The error is still there with sda1 used.

druuna 02-16-2013 09:47 AM

What happens if you let the system figure out the filesystem used?
Code:

mount /dev/sda1 /mnt/sda
You might want to add the -v flag to get some more output.

michaelk 02-16-2013 10:33 AM

It is possible that the default parameters used by the computers mkfs like block size is not compatible with the embedded system. Does your embedded system have mkfs?

beandigital 02-16-2013 11:23 AM

If I let the system figure out the filesystem and use the -v flag I get the sames result.

I formatted the hard disk on a Windows pc using a program called EaseUS partition master. The only parameter I could change is the cluster size which I set to 4K. I have mkfs.ext2 on Busybox but it was taking so long to do that I gave up in the end.

Thanks

Jon

druuna 02-16-2013 11:26 AM

Quote:

Originally Posted by beandigital (Post 4893080)
If I let the system figure out the filesystem and use the -v flag I get the sames result.

I formatted the hard disk on a Windows pc using a program called EaseUS partition master. The only parameter I could change is the cluster size which I set to 4K. I have mkfs.ext2 on Busybox but it was taking so long to do that I gave up in the end.

That might be the problem. I would use mkfs.ext2 and try again. This might take a while, but that all depends on the size of that partition and the options given to mkfs.ext2.

beandigital 02-16-2013 11:40 AM

The trouble is it took about 5 mins on the pc and over 3 hours without finishing in the embedded system. Ideally I would like to avoid doing it on the embedded system. But if I don't have a choice then I will. Do you know why there would be a compatibility issue between the two devices. I guess I just assumed that an ext2 file system would work on any device without issue.

beandigital 02-16-2013 11:47 AM

1 Attachment(s)
I have attached the output of running mkfs.ext2 on the embedded system.

jpollard 02-16-2013 12:13 PM

Quote:

Originally Posted by beandigital (Post 4893085)
The trouble is it took about 5 mins on the pc and over 3 hours without finishing in the embedded system. Ideally I would like to avoid doing it on the embedded system. But if I don't have a choice then I will. Do you know why there would be a compatibility issue between the two devices. I guess I just assumed that an ext2 file system would work on any device without issue.

You specified a 4k cluster size... which may not be what the embedded controller handles. This may have caused what the filesystem considers to be block 0 to start in the wrong place.

If you are going to be working on a linux embedded system, I suggest getting a linux workstation as well.

michaelk 02-16-2013 12:53 PM

It looks like the difference is inode size. 2.6 kernels default to 256 but 2.4 kernels default 128. Do you know what kernel version is running on embedded system?

mkfs.ext2 -I 128 /dev/sda1

beandigital 02-16-2013 01:01 PM

The Kernel is 3.0. So I guess that would be the 256 inode size?

michaelk 02-16-2013 01:06 PM

I would expect it to be 256. What kernel are you running on your desktop?

beandigital 02-16-2013 01:16 PM

Well I actually created the ext2 using a program on a Windows machine. The only parameter I could change was the cluster size that I set to 4k. So not sure what inode size it chose to use.

michaelk 02-16-2013 01:24 PM

And what program did you use?

As suggested it would be best to format the drive via linux vs windows. Any current Live CD version should work.


All times are GMT -5. The time now is 09:02 AM.