LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   mount: wrong fs type, bad option, bad superblock on /dev/sda1 (http://www.linuxquestions.org/questions/ubuntu-63/mount-wrong-fs-type-bad-option-bad-superblock-on-dev-sda1-908196/)

dvalente 10-14-2011 01:17 PM

mount: wrong fs type, bad option, bad superblock on /dev/sda1
 
I'm a novice Linux guy with a big problem. I've been using a second hard drive in a Dell Latitude system running Ubuntu Natty (11.04) as my primary OS. On the second Hard Drive formatted as ext4, I hold all of the disk images needed by VirtualBox to run the various VMs that i use daily.

I recently got a new Windows 7 64-bit machine and wanted to use the VMs on that system. I installed the drive as a second HD in my windows system, and when it didn't recognize the drive, I went to the Disk Management App and chose to bring the drive "online". This allowed windows to see the drive, but not access it. Thinking I might be screwed, I installed the drive back into my ubuntu system so that I could move all the files off it, format the disk for windows, and then move them back.

When I try to mount the drive in ubuntu I get the subject error message. Am I screwed? I really need the data on that drive!!

HELP!

T3RM1NVT0R 10-14-2011 01:53 PM

@ Reply
 
Let me see if I am getting it correctly:

1. Dell Latitude system running Ubuntu Natty. I am assuming Ubuntu is running on first hdd.
2. Second hdd on the same system formatted as ext4 which holds your VM images.
3. New machine runs Windows and you tried to put the second hdd of your Ubuntu machine to Windows machine.
4. When it didnt work you put it back on, on Ubuntu machine.
5. Now, second hdd partition is not mounting on Ubuntu. Is that the case?

If yes then here are the questions for you:

1. Did you tried to do anything when you brough that disk online on Windows?
2. How you are trying to mount the partition? Let us know the command you are using?
3. Did you try to run fsck on the partition and then tried to mount it?
4. Any other changes.

dvalente 10-14-2011 02:02 PM

Thanks for the quick reply.

Your recap of my scenario is correct. When it was in the windows machine, besides bringing it online (which made it show as available in Win Explorer), I attempted to open it and received a message indicating that the drive was inaccessible and needed to be formatted. I did not choose to format the disk, and then proceeded down the path of re-installing the drive into the ubuntu machine.

There is no command I'm using to mount the drive. the drive shows in Nautilus file explorer and by double clicking on it, the system attempts the mount. this is the procedure that I've been using since I started using this setup.


This is the output for "sudo fsck /dev/sda1"

fsck from util-linux-ng 2.17.2
e2fsck 1.41.14 (22-Dec-2010)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda1

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>

T3RM1NVT0R 10-14-2011 02:13 PM

@ Reply
 
Alright.

You said that your second hdd partition was formatted as ext4 then how fsck.ext2 will be able to check that partition?

Run the following command instead:

Code:

fsck.ext4 /dev/sda1
It would be good if you could paste the output of the following command:

Code:

df -h
and

Code:

ls -l /dev/ | grep sd
Use sudo to run all the above mentioned commands.

dvalente 10-14-2011 02:19 PM

sudo fsck.ext4 /dev/sda1
e2fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sda1

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>

sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 33G 25G 7.1G 78% /
none 2.0G 708K 2.0G 1% /dev
none 2.0G 1.4M 2.0G 1% /dev/shm
none 2.0G 112K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
/dev/sdc1 699G 70G 630G 10% /media/My Passport

sudo ls -l /dev/ | grep sd
lrwxrwxrwx 1 root root 4 2011-10-14 12:58 root -> sdb1
brw-rw---- 1 root disk 8, 0 2011-10-14 14:17 sda
brw-rw---- 1 root disk 8, 1 2011-10-14 14:18 sda1
brw-rw---- 1 root disk 8, 16 2011-10-14 14:17 sdb
brw-rw---- 1 root disk 8, 17 2011-10-14 12:58 sdb1
brw-rw---- 1 root disk 8, 18 2011-10-14 12:58 sdb2
brw-rw---- 1 root disk 8, 21 2011-10-14 12:58 sdb5
brw-rw---- 1 root disk 8, 32 2011-10-14 14:17 sdc
brw-rw---- 1 root disk 8, 33 2011-10-14 12:58 sdc1

T3RM1NVT0R 10-14-2011 02:27 PM

@ Reply
 
Try the following:

Code:

sudo mount.ext4 /dev/sda1 /mnt
If the above fails then paste the output of following:

Code:

sudo tail /var/log/messages

dvalente 10-14-2011 02:30 PM

Thanks for your suggestions - here are the results...

sudo mount.ext4 /dev/sda1 /mnt
sudo: mount.ext4: command not found

sudo tail /var/log/messages
tail: cannot open `/var/log/messages' for reading: No such file or directory

dvalente 10-14-2011 02:36 PM

I tried this

Code:

sudo mount -t ext4 /dev/sda1 /mnt
and got the following results:
Quote:

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
ane then tried
Code:

dmesg | tail
and got results:
Quote:


[ 29.184018] wlan0: no IPv6 routers present
[ 42.647823] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 75.728277] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 79.892552] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 93.098012] exe (1937): /proc/1937/oom_adj is deprecated, please use /proc/1937/oom_score_adj instead.
[ 598.361122] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 616.740911] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 1149.072244] CE: hpet increased min_delta_ns to 20113 nsec
[ 1210.972128] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[ 5629.184745] EXT4-fs (sda1): VFS: Can't find ext4 filesystem

T3RM1NVT0R 10-14-2011 02:40 PM

@ Reply
 
Are you sure that /dev/sda1 was formatted as ext4?

Run the following command as that might help us in finding the filesystem on /dev/sda

Code:

sudo parted -l
I am surprised that /var/log/messages file is not there. As it is there in my Ubuntu 10.04. Never tried 11.04 so not sure if they do have this file on 11.04 or not.

dvalente 10-14-2011 02:46 PM

I'm fairly sure it was ext4, although i'm not certain now that there seems to be some doubt? That is what I remember, but again that ext4 doesn't really mean anything to me, so i can't say i'm certain. Besides if it were fat32 or something, woudn't it have just worked in Windows? Sorry if that is a dumb question...

Here is the output you asked for...

sudo parted -l
Model: ATA WDC WD5000BEKT-7 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 500GB 500GB primary


Model: ATA INTEL SSDSA2M040 (scsi)
Disk /dev/sdb: 40.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 35.7GB 35.7GB primary ext4 boot
2 35.7GB 40.0GB 4291MB extended
5 35.7GB 40.0GB 4291MB logical linux-swap(v1)


Model: WD My Passport 0730 (scsi)
Disk /dev/sdc: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 750GB 750GB primary ntfs

dvalente 10-14-2011 02:47 PM

Other threads have suggested using something called testdisk. Ever heard of it?

T3RM1NVT0R 10-14-2011 02:51 PM

@ Reply
 
Thats interesting.

I would try the following commands to trying mounting the partition:

1.
Code:

mount -t vfat /dev/sda1 /mnt
2.
Code:

mount -t msdos /dev/sda1 /mnt
Not sure about the msdos command because never tried that before. As far as I know Windows 7 does not support FAT file system so that might be the case that it didnt recognize.

testdisk I guess is data recovery utility.

dvalente 10-14-2011 02:58 PM

sudo mount -t vfat /dev/sda1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


sudo mount -t msdos /dev/sda1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Thanks for your thoughts so far. Any other ideas? I really need to fix this. I've loaded testdisk and started messing around with it, but it's like a foreign language to me right now

T3RM1NVT0R 10-14-2011 03:01 PM

@ Reply
 
Wait. Do not run testdisk it might mess up with existing partition table.

T3RM1NVT0R 10-14-2011 03:05 PM

@ Reply
 
Well just tested. The file system on that particular disk is gone.

It should have showed the similar output as that of what it showed for /dev/sdb and /dev/sdc:

Code:


Model: ATA INTEL SSDSA2M040 (scsi)
Disk /dev/sdb: 40.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 35.7GB 35.7GB primary ext4 boot
2 35.7GB 40.0GB 4291MB extended
5 35.7GB 40.0GB 4291MB logical linux-swap(v1)


Model: WD My Passport 0730 (scsi)
Disk /dev/sdc: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 750GB 750GB primary ntfs

I am not aware of a way by which you can salvage the current sitution other than reformatting and putting back the data from backup.


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