« previous   next »

How to get /media/disk back?


By Patrick   Follow   Sat, 26 Jan 2013, 8:14am PST   724 views   12 comments
Watch (0)   Share   Quote   Permalink   Like   Dislike  

Ubuntu keeps doing me favors that I really wish it would not.

The latest one is that when I plug in a USB drive, it mounts it as:

/media/7419-EA6C

Or whatever other unique label that particular USB drive has. Bad Ubuntu! I don't want that. My backup script expects /media/disk and that's what I want, no matter which USB drive is inserted. I have lots of them that I use in round-robin fashion for backups.

How do I get any USB drive that I insert to mount as /media/disk like it use to be? Half an hour of searching did not turn up any way to revert to the old behavior.

Comments 1-12 of 12     Last »

HEY YOU   Sat, 26 Jan 2013, 11:07am PST   Share   Quote   Permalink   Like   Dislike     Comment 1

I know enough to turn this machine on & make foolish comments.This just popped into my head from the ether. Do you recall someone saying years ago that the computer should be as easy to use as a TV remote?

Which button do I hit to turn on the TV?lol

mell   Sat, 26 Jan 2013, 12:21pm PST   Share   Quote   Permalink   Like   Dislike     Comment 2

This doesn't work?

http://askubuntu.com/questions/1644/mounting-a-usb-disk-in-a-permanent-location
Or this (there is a reference to another thread as well):
http://superuser.com/questions/53978/ubuntu-automatically-mount-external-drives-to-media-label-on-boot-without-a-u

Hysteresis   Sat, 26 Jan 2013, 12:27pm PST   Share   Quote   Permalink   Like   Dislike     Comment 3

Patrick says

Or whatever other unique label that particular USB drive has. Bad Ubuntu!

why do you keep blaming ubuntu for things it has no control over?

7419-ea6c is name of the volume. stick that usb drive in any machine and it will show the same name.

Patrick   Sat, 26 Jan 2013, 2:17pm PST   Share   Quote   Permalink   Like   Dislike     Comment 4

I blame Ubuntu because it changed behavior, and has no obvious way to revert to the way it used to be.

It was much better when a USB drive appeared as /media/disk. Who cares about the name of the specific USB drive? It's completely useless and simply makes all scripts that reference USB drives completely unportable. It's like you're in a workshop and you need a hammer, and you can see it and point to it, but you can't have it unless you ask for the serial number of that specific hammer and you are not allowed to say "just get me the fucking hammer".

mell says

This doesn't work?

http://askubuntu.com/questions/1644/mounting-a-usb-disk-in-a-permanent-location

That does not work.

I just need to figure out which silly script assumed I would want some random useless volume name like 7419-EA6C instead of a consistent sensible name like "disk". Then I will destroy that silly script.

StillLooking   Sat, 26 Jan 2013, 2:45pm PST   Share   Quote   Permalink   Like   Dislike     Comment 5

What about this:

https://help.ubuntu.com/community/RenameUSBDrive

Patrick   Sat, 26 Jan 2013, 2:50pm PST   Share   Quote   Permalink   Like   Dislike     Comment 6

It doesn't say how to get the old behavior back, where it would mount any USB drive as /media/disk

That's all I want to do.

Patrick   Sun, 27 Jan 2013, 3:40am PST   Share   Quote   Permalink   Like   Dislike     Comment 7

Here's another example of what I mean:

When you insert a DVD in a Linux computer, it shows up as /media/dvd or some other perfectly logical general name.

You don't have to figure out the exact name of that one particular DVD and type it in so that your DVD-playing software can know where the DVD is mounted in the filesystem. That would be stupid.

And yet the new Ubuntu USB mounting scheme is actually that stupid. It requires that you know the unique and unguessable name of that one particular USB drive before you can know where to look for it in the filesystem.

curious2   Sun, 27 Jan 2013, 3:56am PST   Share   Quote   Permalink   Like   Dislike     Comment 8

What about network mapping or a RAID approach? If you can create a virtual "drive" with maybe a batch file to associate each of your USB drives with it, then use the virtual drive address. It's imperfect but converts the daily annoyance of an unwanted "feature" into a one-time problem-solving puzzle. You might think of it as a security feature, since you wouldn't want a hacker substituting a strange USB drive to run away with your scripted backup.

Hysteresis   Sun, 27 Jan 2013, 4:09am PST   Share   Quote   Permalink   Like   Dislike     Comment 9

Patrick says

And yet the new Ubuntu USB mounting scheme is actually that stupid. It requires that you know the unique and unguessable name of that one particular USB drive before you can know where to look for it in the filesystem.

you should know your device configuration; this includes the name of the volume.
ubuntu should not make up a random name to name devices which is what you're asking for.

you're completely wrong on this. i could give many scenarios where this scheme you love so much is completely broken.

you're asking ubuntu to allow you to be lazy (even though it's wrong), instead of doing the right thing.

StillLooking   Sun, 27 Jan 2013, 5:31am PST   Share   Quote   Permalink   Like   Dislike     Comment 10

Patrick says

Here's another example of what I mean:

When you insert a DVD in a Linux computer, it shows up as /media/dvd or some other perfectly logical general name.

You don't have to figure out the exact name of that one particular DVD and type it in so that your DVD-playing software can know where the DVD is mounted in the filesystem. That would be stupid.

And yet the new Ubuntu USB mounting scheme is actually that stupid. It requires that you know the unique and unguessable name of that one particular USB drive before you can know where to look for it in the filesystem.

What did you do to cause Ubuntu to change behavior?

Also, you can make a symlink from /media/disk to your new name. I would think the new system should be better anyway as now less chance of getting your back up media confused.

Patrick   Sun, 27 Jan 2013, 6:05am PST   Share   Quote   Permalink   Like (1)   Dislike     Comment 11

StillLooking says

What did you do to cause Ubuntu to change behavior?

I installed the latest Ubuntu OS on my new laptop. I regret that. I should have stuck with the old Ubuntu.

StillLooking says

you can make a symlink from /media/disk to your new name

I would still have to type in the new name each time I use a new flash drive.

Before, the USB was always at /media/disk and that is how it should be.

curious2 says

If you can create a virtual "drive" with maybe a batch file to associate each of your USB drives with it, then use the virtual drive address. It's imperfect but converts the daily annoyance of an unwanted "feature" into a one-time problem-solving puzzle. You might think of it as a security feature, since you wouldn't want a hacker substituting a strange USB drive to run away with your scripted backup.

Yes, I could make some script that figures out which newly created path corresponds to the USB drive I just inserted, and I'll probably have to do that, but it's just pointless work because the Ubuntu people decided not to allow the old easy and intuitive naming.

Hysteresis says

you're asking ubuntu to allow you to be lazy (even though it's wrong), instead of doing the right thing.

Screw the "right thing". Laziness is one of the three virtues of a great programmer:

http://threevirtues.com/

The computer exists to do my work. Not to make me do work.

zzyzzx   Fri, 8 Feb 2013, 4:24am PST   Share   Quote   Permalink   Like   Dislike     Comment 12

Yet still another reason to use Fedora.

Patrick is moderator of this thread.

Email

Username

Watch comments by email

home   top   share   link sharer   users   register   best of   about   questions or suggestions? write p@patrick.net