LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-28-2017, 04:37 AM   #1
dmanila
LQ Newbie
 
Registered: Aug 2017
Posts: 2

Rep: Reputation: Disabled
Unable To Mount EXT2 Partition


Hi,

I am facing an issue with mounting of a partition.
I have an appliance which runs WindRiver Linux 8 in one of the partition and FreeBSD 10.1 in another.
There is a raw partition (no FS) available. I formatted the raw partition as EXT2 when FreeBSD is running and copied some data to it.

Then I booted Linux and tried to mount raw partition.
But mount is failing.

wsa115:/# mount -t ext2 /dev/sda8 /test
mount: wrong fs type, bad option, bad superblock on /dev/sda8,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try dmesg | tail or so
wsa115:/#


dmesg is reporting error as below

EXT4-fs (sda8): mounting ext2 filesystem using ext4 subsystem
EXT4-fs (sda8): ext4_check_descriptors: Block bitmap for group 864 not in group (block 0)!
EXT4-fs (sda8): group descriptors corrupted

Can anyone give any inputs on this issue?

Dinesh
 
Old 08-28-2017, 06:07 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, RPi OS, Mint & Android
Posts: 12,885

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
ext2, & ext4 are separate modules iirc. You might get out without a recompile of the kernel by using tune2fs -j to add a journal to it. Don't know how the other system would fare.
 
Old 08-28-2017, 07:13 AM   #3
dmanila
LQ Newbie
 
Registered: Aug 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi,

I tried with tunefs .
But still same issue is happening.

Dinesh
 
Old 08-28-2017, 11:08 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, RPi OS, Mint & Android
Posts: 12,885

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
tune2fs has to work on an unmounted partition. Plenty in google for you. It should work.
 
Old 08-28-2017, 12:03 PM   #5
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 472

Rep: Reputation: 150Reputation: 150
Quote:
There is a raw partition (no FS) available. I formatted the raw partition as EXT2 when FreeBSD is running and copied some data to it.
This doesn't make sense. If you formatted the raw partition as ext2 then it is no longer a raw partition.

Quote:
Then I booted Linux and tried to mount raw partition.
You can't mount a raw partition. You can only mount formatted partitions that have some file system that mount understands. You can't mount a raw partition as there is no file system to mount. Mounting a partition refers to mounting a file system on that partition.

Also since you are using BSD are you sure there are no BSD sub-partitions on .dev/sdb8? If there are BSD sub-partitions inside this partition then that is your problem.

Quote:
wsa115:/# mount -t ext2 /dev/sda8 /test
mount: wrong fs type, bad option, bad superblock on /dev/sda8,
missing codepage or helper program, or other error
As a side note there is no need to specify the file system type with -t type for basic Linux file system types such as extn. This is only required for a few external types such as nfs, nfs4, cifs, smbfs, ncpfs. In most cases mount can determine the correct type itself.

From man mount:
Code:
-t, --types vfstype
...
For most types all the mount program has to do is issue a simple mount(2) system call, and no detailed knowledge 
of the filesystem  type  is  required.
...
If no -t option is given, or if the auto type is specified, mount will try to guess the desired type.  Mount 
uses the blkid library  for  guessing  the filesystem  type;  if that does not turn up anything that looks 
familiar, mount will try to read the file /etc/filesystems, or, if that does not exist, /proc/filesystems.
You could simply use # mount /dev/sda8 /test. However this is a side note. You appear to have other problems.

Last edited by tofino_surfer; 08-28-2017 at 04:20 PM. Reason: clarified post
 
Old 08-28-2017, 04:15 PM   #6
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 472

Rep: Reputation: 150Reputation: 150
Quote:
ext2, & ext4 are separate modules iirc. You might get out without a recompile of the kernel by using tune2fs -j to add a journal to it. Don't know how the other system would fare.
without a recompile of the kernel Wow. Is it 1997 again ? The modern Linux kernel is modular and doesn't need to be recompiled for file system modules.

ext2, & ext4 are separate modules Actually the ext4 module now handles ext3 and ext2 as well. There are no ext2/3 modules on Centos 7 and I can mount older ext2/3 partitions without problems. They were phased out a while ago. The ext4 driver now handles ext2/3 as well. If you type man ext2 or man ext3 you get the same ext4 manual page. Try it business_kid.

From the ext4 manpage:
Code:
EXT4(5)                                                                  File Formats Manual                                                                  EXT4(5)

NAME
       ext2 - the second extended file system
       ext2 - the third extended file system
       ext4 - the fourth extended file system

DESCRIPTION
       The  second,  third,  and fourth extended file systems, or ext2, ext3, and ext4 as they are commonly known, are Linux file systems that have historically been
       the default file system for many Linux distributions.  They are general purpose file systems that have been designed for extensibility and backwards  compati‐
       bility.   In  particular,  file  systems previously intended for use with the ext2 and ext3 file systems can be mounted using the ext4 file system driver, and
       indeed in many modern Linux distributions, the ext4 file system driver has been configured handle mount requests for ext2 and ext3 file systems.
The ext2.ko and ext3.ko modules no longer exist.

Code:
$ locate ext4.ko
/usr/lib/modules/3.10.0-327.22.2.el7.x86_64/kernel/fs/ext4/ext4.ko
/usr/lib/modules/3.10.0-327.el7.x86_64/kernel/fs/ext4/ext4.ko
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/kernel/fs/ext4/ext4.ko
$ locate ext3.ko
$ locate ext2.ko
Besides if you read the original post the OP specified ext2 explicitly while the system attempted to use ext4 subsystem. The OP did nothing wrong. This is how Linux works now business_kid.

Code:
wsa115:/# mount -t ext2 /dev/sda8 /test
EXT4-fs (sda8): mounting ext2 filesystem using ext4 subsystem
EXT4-fs (sda8): ext4_check_descriptors: Block bitmap for group 864 not in group (block 0)!
EXT4-fs (sda8): group descriptors corrupted
 
Old 08-29-2017, 05:14 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
$ sudo blkid

What does the device say about itself? And I thought that BSD only had like ZFS and UFS? And UFS is dramatically not the same or compatible with linux's version. But there's many BSDs, which one did you use and how did you format / populate the ext2? Beyond that you could dd part (or all) of the partition to a file and hexedit it to take a closer look, or hexdump. Normally there's some meta data at the front of a partition, which might indicate which filesystem, or which data depending on what went where. If it's all zeros perhaps you didn't write anything because you didn't have the permissions, or it failed silently.
 
Old 08-29-2017, 01:17 PM   #8
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 472

Rep: Reputation: 150Reputation: 150
I highly recommend using blkid as well.

Code:
sudo blkid /dev/sda8
sudo blkid /dev/sda
The first blkid command gives partition information. The second gives the drive partition format.

As I mentioned before you should try mount without the -t type with
# mount /dev/sda8 /test.

Basically you want to test whether there is enough information in the partition for mount to determine the file system type itself as it usually can. The -t type parameter is normally not necessary with extn. Previously it was trying to use the ext4 module to mount this partition as you were telling it was type ext2.

If you are unaware of BSD sub-partitions this recent thread will help.

https://www.linuxquestions.org/quest...ml#post5731214

If you have BSD sub-partitions then you need the BSDDISKLABEL kernel configuration parameter as mentioned in the very last post in the thread above by the thread's OP, which solved their problem.

Grub2 is capable of detecting BSD sub-partitions with the basic ls command in the grub shell. When booting press 'c' for a grub command shell. The following is the grub ls output for the thread above. As can be seen there are three levels hd, dos partition, and then bsd sub-partition.

Code:
grub > ls
hd0, (hd0,msdos1,bsd1),(hd0,msdos1,bsd2),(hd0,msdos1,bsd3),(hd0,msdos1,bsd4),(hd0,msdos1,bsd5),(hd0,msdos 1,bsd6),(hd0,msdos1,bsd7),(hd0,msdos1,bsd8),(hd0,msdos1,bsd9),(hd0,msdos)
 
Old 08-30-2017, 02:59 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,848

Rep: Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383
"group descriptors corrupted"
I'd testdisk it and see what you get off before you go any farther.

I'm usually lazy. What does Gparted report? It has a lazy man's repair on it I think.





"You can't mount a raw partition" Actually you can and while many linux distro's don't like it, a number of systems still use it like that.
 
Old 09-04-2017, 03:54 PM   #10
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 472

Rep: Reputation: 150Reputation: 150
Quote:
"group descriptors corrupted"
I'd testdisk it and see what you get off before you go any farther.
There may be nothing wrong with the disk. This message was given by EXT4-fs as it tried to mount the partition. If there are BSD sub-partitions that Linux isn't aware of then that is confusing the mounting process.

It starts with determining if there are BSD sub-partitions that Linux can't see.

Quote:
I'm usually lazy. What does Gparted report? It has a lazy man's repair on it I think.
Will GParted recognize any possible BSD sub-partitions if they exist and if the BSDDISKLABEL kernel configuration parameter has not been given ? It all starts there.

Quote:
You can't mount a raw partition" Actually you can and while many linux distro's don't like it, a number of systems still use it like that.
What does this have to do with this thread where the user simply wants to mount an ext2 partition created in FreeBSD ? They were talking about formatting a "raw" partition as ext2, copying data to it, and then trying to mount a "raw" partition. This didn't make sense and my comments were related to that.

If you are talking about raw partitions written with dd or some VM qcow2 image or some database that doesn't use a file system then possibly yes, but it doesn't relate to this thread.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to mount the partition MANISH BHARTI Linux - Newbie 6 03-03-2016 11:24 AM
Unable to mount partition beparas Linux - Hardware 3 12-12-2011 02:28 AM
[SOLVED] Gain access to ext2 partition without ext2 support in kernel ColInvictus Gentoo 3 10-26-2009 06:57 AM
LXer: Mount an ext2 or ext3 partition in Windows LXer Syndicated Linux News 0 03-28-2007 07:46 AM
mount ext2 (logical partition) in solaris 10? shshjun Solaris / OpenSolaris 5 03-20-2006 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration