Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-05-2009, 03:08 AM
|
#1
|
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704
Rep:
|
mounting a loop device
Hi all..
I have following loopback devices, all partitioned with ext2 file system
Iam getting a problem while mounting these..
loop0p1 : 0 195294 /dev/loop0 19
loop0p5 : 0 292960 /dev/loop0 195360
loop0p6 : 0 488160 /dev/loop0 488352
$ sudo mount -o loop -t ext2 /dev/mapper/loop0p1 /mnt/mount1
worked fine
$ sudo mount -o loop -t ext2 /dev/mapper/loop0p5 /mnt/mount2
mount: wrong fs type, bad option, bad superblock on /dev/loop2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
This is the error I am getting ...
Output of dmesg | tail is
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8
fuse init (API version 7.9)
set status page addr 0x00033000
VFS: Can't find an ext2 filesystem on dev loop2.
VFS: Can't find an ext2 filesystem on dev loop2.
VFS: Can't find an ext2 filesystem on dev loop2.
VFS: Can't find an ext2 filesystem on dev loop2.
VFS: Can't find an ext2 filesystem on dev loop1.
VFS: Can't find an ext2 filesystem on dev loop2.
Please help me regarding this....
Thanks in advance...
Last edited by vinaytp; 10-05-2009 at 03:30 AM.
|
|
|
|
10-05-2009, 03:30 AM
|
#2
|
|
Member
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 605
|
Quote:
Originally Posted by vinaytp
$ sudo mount -o loop -t ext2 /dev/mapper/loop0p5 /mnt/mount2
mount: wrong fs type, bad option, bad superblock on /dev/loop2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
This is the error I am getting ...
Please help me regarding this....
Thanks in advance...
|
What do you get from doing a 'dmesg | tail' right after that?
Most likely there is some problem with the filesystem on that device.
Try running fsck.ext2 on it also.
|
|
|
|
10-05-2009, 03:35 AM
|
#3
|
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704
Original Poster
Rep:
|
Quote:
Originally Posted by foodown
What do you get from doing a 'dmesg | tail' right after that?
.
|
Output of fsck.ext2 loop0p5 is
e2fsck 1.40.8 (13-Mar-2008)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open loop0p5
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Then how to mount this loop device..Please suggest me....
|
|
|
|
10-05-2009, 10:47 AM
|
#4
|
|
Member
Registered: Sep 2009
Distribution: Fedora
Posts: 835
Rep: 
|
Quote:
Originally Posted by vinaytp
Output of fsck.ext2 loop0p5 is
e2fsck 1.40.8 (13-Mar-2008)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open loop0p5
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Then how to mount this loop device..Please suggest me....
|
The problem is just what the error message says -- the system is not detecting the storage type you're specifying to it. It isn't ext2. Do this to find out what it is:
|
|
|
|
10-05-2009, 11:15 AM
|
#5
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Use the "-o loop" option when mounting a file image. Once a loop device is attached use the loop device as a disk device.
Here is how you could mount the first partition from a disk image:
sudo /sbin/losetup -fs -o $((63*512)) hdimage.img
sudo mount -t ext2 /dev/loop0 /mnt
You can use "sudo /sbin/fdisk -lu <dev or file>" to list the start of partitions in 512 byte blocks. If you have a disk where the partition table is damaged, the first partition will probably start on block 63 or block 2048. The later I've seen on vista laptops.
Last edited by jschiwal; 10-05-2009 at 11:22 AM.
|
|
|
|
10-05-2009, 11:59 AM
|
#6
|
|
Senior Member
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,189
|
vinaytp,
Are you mounting a CD/DVD image formatted in ext2? it appears not. You could be mounting an external memory card, stick or device via bluetooth. There are cases that recent memory devices (especially those for cellphones) bought over the counter are designed to defy linux formats. Caveat. I have come across this problem myself, and I found out that there are many of us.
Your demsg | tail report explains just what is wrong: it is your device having problem or that it was not properly formatted. Try reformatting it to FAT16, and use -t vfat you might be able to loop it.
If you are mounting an external hard drive partition there is no need to loop it, just plainly mount it.
If you are mounting a cellphone seated memory there is less chance you can loop it. But you may succeed using gnokii, it is downloadable from here.
Hope this helps.
Good luck.
Last edited by malekmustaq; 10-05-2009 at 12:08 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:41 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|