• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

troubleshooting sdb1/ext3 that fails to mount

d.p

New Member
I've got a disc drive mounted in a caddy that uses linux to communicate with the (home, Windows) network. The drive has been failing to mount, usually returning a message like "wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error".

The drive contains recent work, so I want to recover data rather than simply reformat.

I've run fsck and done the automatic repair of inodes and blocks. I'm supposing the superblocks have been repaired, and that the issue is somewhere else.

Beyond that I'm wondering what course of action to take, and am looking for general guidance on dealing with this sort of issue. A basic troubleshooting guide would make sense here, to get an overview of options and possible courses of action. Do I go for a further repair, or is it better to do some data recovery and wipe the disc?
 


d.p

New Member
Hey there d.p - welcome to the site!

What command are you using to mount the drive? Do you also have it set up in /etc/fstab? Did fsck say it found bad things and fixed them?
Thanks, Rob, glad to be here!
Initially, I'm letting the OS try to connect. When that doesn't work I'm doing things like using the Preferences|Disks utility, or going into a terminal and trying things like mnt.

I don't know enough about stab to try anything there.

fsck did find lots of things: errors reading blocks, unused and unattached inodes, inodes with wrong counts, inode bitmap difference, block bitmap differences.
 

Rob

Administrator
Staff member
Ok - try mounting manually on the terminal.. you'll need to be the root user or use sudo in front of the commands.

First, make a mount point:
Code:
mkdir /drive
(name /drive whatever you want)

Then, try mounting w/o specifying the filesystem type:
Code:
mount /dev/sdb1 /drive
If it complains, copy down that error for later.. and try specifying the filesystem type:
Code:
mount -t ext3 /dev/sdb1 /drive
Let me know what happens and what the errors are that you might get..
 

d.p

New Member
I had similar results with each mount command.
Here's the response to the latter: Unable to mount usb-ASMT_2105_00000000000000000000-0:0-part1

mount: according to mtab, /dev/sdb1 is mounted on /drive
mount failed

Looking in the home/desktop folder, and clicking on the icon there produces the same message.

But... !
When I go into the Preferences | Disks utility (Linux Mint), and click on the hyperlink saying "contents are ext3 (v1.0) mounted at /drive", I get a new window showing the partitions/folders as expected. (Edit: screenshots added)
Tonido_Linux-PartitionRepair_00.png Tonido_Linux-PartitionRepair_01.png Tonido_Linux-PartitionRepair_02B.jpg Tonido_Linux-PartitionRepair_04.png Tonido_Linux-PartitionRepair_05.png

That counts as major progress.

What next?
 
Last edited:

d.p

New Member
Yes, it does.

So what's the distinction between seeing the device mounted as /drive, and seeing it on the Computer list where it's not accessible?
 

Rob

Administrator
Staff member
I'm not sure - perhaps the file explorer window might be showing its old mount point?

What i'd do is maybe make a backup of what you have on there, then if that drive has errors, replace it with a new one or try running fsck on it again after it's unmounted again.

To back up your things from sdb1 to somewhere on your computer you can do something like this (as root or using sudo)
Code:
mkdir /home/backups
rsync -avz --progress /drive/ /home/backups/
Now, you should have everything in a new folder under /home/backups/ once it finishes.

To unmount it you can type:
Code:
umount /drive
(Yep, that's umount, not unmount)

Then, you can fun fsck on it again. The -y says 'yes' to all prompts to repair:
Code:
fsck -y /dev/sdb1
 

d.p

New Member
Thanks for all that. The local drive isn't big enough to do a backup - but I've ordered another drive for Monday, so will do a backup to that once I have it connected.

As for the file explorer showing the old mount, perhaps that's the case, though I think what I meant to ask was whether this /drive mount will be persistent, and more importantly, will it show up when I move the HDD to another machine? Have I done anything on the drive itself to rectify the discrepancy?

Up to now I've been imagining that the partition info had got corrupted somehow, and needed to be rewritten. Rewriting the superblocks didn't do it (I tried that one yesterday), so the fault lies somewhere else.

Very glad the files are accessible, and that you've saved me hours of headscratching!
 

Rob

Administrator
Staff member
Sounds like a good plan..

As far as being persistent, you could add a line to your /etc/fstab file like:
Code:
/dev/sdb1  /drive  ext3  defaults  0 0
More on /etc/fstab here:
https://www.linux.org/threads/etc-fstab-explained.10901/

Each system will treat the drive differently, so moving the drive to another machine will come up under a different mountpoint.
 



Latest posts

Top