[SOLVED] unable to mount a usb flash drive and an SD card after changing mount directory name
Linux - NewbieThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
unable to mount a usb flash drive and an SD card after changing mount directory name
I'm not sure exactly what I did, but after messing with some directory names I'm unable to mount both a usb drive and an SD card. When I try to mount them I get this error:
* wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
*
I tried mounting them in Windows and it said the drive needs to be formatted. I didn't mess with the partition table or try to format these devices. I think what I did was change the name of the directory it was mounted to while it was mounted, then I started having this problem. One more thing: when I run *lsblk -f* I notice that these devices no longer have UUIDs. All the other devices have UUIDs listed but the field is blank on these devices. I have some data on these drives I don't want to loose so I'd appreciate any help getting these devices to mount without having to re-format.
You haven't told us which file system was in use, but since you mentioned windows, are we to assume vfat or ntfs?
How is it reported by the following?
Code:
fdisk -l
Report back with the output so that others can offer advice.
Before attempting any further possible corruption during any data recovery exercise, it is a good idea to back the devicde up completely using 'dd' to low-level (bit-by-bit) copy eg
I'm not sure exactly what I did, but after messing with some directory names I'm unable to mount both a usb drive and an SD card. When I try to mount them I get this error:
looks like you changed a directory name in /mnt and now fstab doesn't know where to mount a mass storage device. my fstab says:
if I were to change the name of /mnt/cdrom into /mnt/dvd, fstab would have no mountpoint anymore for /dev/cdrom so either change back the directory names to the default ones or change fstab and that should do the trick.
if you insert a usb stick that is formatted in ext4 in a windows machine, windows will reformat the disk to help you.
I looked at my fstab file and it doesn't have an entry for sdb1. But when I plug in another usb drive it shows as sdb1 and it mounts without issues. Do I need to add a line to fstab?
I may have mispoke when I said it was ntfs. Maybe I re-formatted it to ext4 awhile ago and forgot.
I was trying to mount it from terminal, using the mount command.
No, you don't need an en entry in /etc/fstab. Typically, removable media with a valid system are handled by udev and UDisks2. The fact that a bad super block is reported suggests an ext3/ext4 file system. You could execute following (eg assuming ext3) to get a bit more info about
Code:
sudo fsck.ext3 -v /dev/sdb1
or maybe
Code:
sudo fsck-v /dev/sb1
I assuming this will confirm a bad/corrupted superblock. There are additional superblock copies kept thankfully. Locate them with
Code:
sudo mke2fs -n /dev/sb1
and report back with the output.
Hopefully, it should be possible to use a superblock copy to repair using something like
If you can't recover the file system, all hope is not lost. You can work with the device or backup you created to try to recover the files using a utility like foremost.
ext2fs_open2: Bad magic number in super-block
fsck.ext3: Superblock invalid, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/sdb1
Ran *sudo fsck.ext3 -v /dev/sdb1*, here's the output:
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
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>
or
e2fsck -b 32768 <device>
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
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>
or
e2fsck -b 32768 <device>
I tried each command with a a few different blocks from those listed in the output from *sudo mke2fs -n /dev/sdb1*, none of them worked. I'm looking over the data recover tutorial you linked to. I'll try some of those methods.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.