You are not logged in.

#1 2015-10-15 05:40:12

remn
Member
Registered: 2015-10-01
Posts: 37

Unable to mount usb flash drive after trying to change directory name

I tried to change the name of the mount directory on a flash drive so i could copy files to it from the command line. (I wasn't able to write to the drive in the graphical file explorer). I couldn't copy to it in the terminal because it had a space in the name (apparently directory names with spaces in them aren't recognized in terminal.)

Anyway now when I insert the usb drive it doesn't mount. When I run "lsblk -f" all my devices have UUID's, but for the flash drive the UUID field is blank. I tried a couple other drives that I hadn't messed with and they mount fine/have UUIDs. So my question is, how can I get this flash drive to mount again? Do I need to edite my fstab file, or something else?

Last edited by remn (2015-10-15 05:57:04)

Offline

#2 2015-10-15 05:59:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Unable to mount usb flash drive after trying to change directory name

What command did you run on the drive? What filesystem is/was on the drive?

Also, spaces don't prevent commands being parsed; but they do need to be either quoted or escaped. See http://mywiki.wooledge.org/FullBashGuide


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-10-15 06:17:52

remn
Member
Registered: 2015-10-01
Posts: 37

Re: Unable to mount usb flash drive after trying to change directory name

If I remember correctly, I ran rmdir to delete the directory after unmounting the flash drive. Then I used mkdir to make a new directory and tried mounting both the device (sdb) and the partition (sdb1) to the new directory, but it didn't work. The filesystem on the drive is ext4 (I'm pretty sure it's still there, don't think I removed any data from the drive or messed up the partition table).

Thanks for the link to the BASH guide, I'll definitely be reading through it as I want to learn my way around the command line.

Last edited by remn (2015-10-15 06:18:50)

Offline

#4 2015-10-16 15:36:34

remn
Member
Registered: 2015-10-01
Posts: 37

Re: Unable to mount usb flash drive after trying to change directory name

Some more info on this issue: When I try to mount this USB drive, I get this error message: "wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error." I tried accessing the drive from Windows and it said it needs to be formatted. The weird thing it, I didn't try to format it or mess with the partition table, so I don't get why the file system isn't showing up. Anything I can do to try to retrieve the data on this drive? Maybe with gparted or something?

Offline

Board footer

Powered by FluxBB