You are not logged in.

#1 2013-03-11 22:21:08

hayjude99
Member
Registered: 2012-09-10
Posts: 8

/media broken

When I was transferring files to a flash drive, I think I may have broken my /media...

I accidentally tried to unmount the device while I was still in the device's directory (/media/usbstick).  When I tried the umount command on the usb drive, terminal said that it was busy and the activity light was on.  By this time, my cp command was not running and I didn't think of any reason the stick was busy, so I pulled it out.  Even though unlikely, I worried that this might have corrupted the file I was sending and wanted to redo the transfer.  I plugged it back in, reformatted (using mkdosfs) and tried to re-initiate the transfer, but it took way less time than I thought it should and when inspecting /media/usbstick, there wasn't anything inside.  Upon running the umount command, it froze up again. 

I don't know if this was caused by my sloppy umounting, but at this point I suspected something was wrong with the folder I was using, so I tried to make a new one, /media/newusb which even as root returned a permissions error.  I tried moving into the /media/usbstick folder with the drive unmounted and it told me that the directory did not exist.  I tried deleting it with the same error.  All other folders in /media return similar errors.

I checked the permissions on /media and for some reason, the permissions were dr-xr-xr-x.  To reset these permissions, I ran sudo chmod 755 /media without errors; however, with the recursive flag, it tells me that the files do not exist and the problem persists.

What is going on, and how can I fix it?

Last edited by hayjude99 (2013-03-11 22:24:17)

Offline

#2 2013-03-13 21:23:23

hayjude99
Member
Registered: 2012-09-10
Posts: 8

Re: /media broken

bump?

Offline

#3 2013-03-13 21:33:19

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: /media broken

Maybe try to recreate the whole /media folder.
rm -rf /media
mkdir -m 0755 /media


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#4 2013-03-13 22:19:22

hayjude99
Member
Registered: 2012-09-10
Posts: 8

Re: /media broken

Even as root, the first command gives me "Permission denied"

Offline

#5 2013-03-13 22:25:45

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: /media broken

hayjude99 wrote:

bump?

Please read the Forum Etiquette before posting.

On a related note, chmod'ing anything in / or rm'ing anything in / is almost always a terrible idea; you should probably not do that. Like, ever.

All the best,

-HG

Offline

#6 2013-03-13 22:31:08

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: /media broken

I have noticed that with larger files, they are not synced right away when transferred to a USB flash drive. So when you are trying to unmount, it is probably then starting to write the data.

Edit: also I want to reiterate that bumping is not an accapted practice around here.

Last edited by WonderWoofy (2013-03-13 22:32:10)

Offline

#7 2013-03-13 23:26:12

hayjude99
Member
Registered: 2012-09-10
Posts: 8

Re: /media broken

HalosGhost wrote:
hayjude99 wrote:

bump?

Please read the Forum Etiquette before posting.

On a related note, chmod'ing anything in / or rm'ing anything in / is almost always a terrible idea; you should probably not do that. Like, ever.

All the best,

-HG


You're right, I'm very sorry about that.

Offline

Board footer

Powered by FluxBB