Announcement

Collapse
No announcement yet.

How to automatically mount an USB drive to the same point every time?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to automatically mount an USB drive to the same point every time?

    Hi, how do I mount an USB hard drive automatically to the same point each time I plug it in?

    Now when I plug it in I can mount it manually after Kubuntu detects it, it but it seems like it is mounted to "different" places every time. When I download a torrent to my USB drive and exit Ktorrent and have my USB drive unplugged - then when restarting the downlad Ktorrent cannot find the "place" where I am downloading the torrent.

    Any ideas? Much appreciated!

    #2
    Re: How to automatically mount an USB drive to the same point every time?

    Basically, you can either (a) leave it plugged in permanently, and set it up to mount in /etc/fstab, or (b) accept the random choice that happens when you plug it in and let HAL and udev pick an ID assignment. The USB bus is designed to allow all kinds of devices to be plugged in and connect, but it isn't designed to have pre-existing "assignments" for their device ID.

    Here's more -- check out Chapter 9 "device enumeration":

    http://www.beyondlogic.org/usbnutshell/usb1.htm

    Comment


      #3
      Re: How to automatically mount an USB drive to the same point every time?

      The following works for me. It is not "ubuntically correct," and therefore may break in future versions.

      I have an internal hard drive (sda) with windows which I do not touch.
      I run linux (several linux versions) on an external usb (sdb) and have another external drive used for backups (sdc).
      I boot the system with only the sda and sdb drives attached. To do backups, I plug in the sdc drive. The entries for the backup drive are set up in fstab the "old" way:

      /dev/sdc2 /media/dbnback ext3 defaults,errors=remount-ro 0 0
      /dev/sdc4 /media/kuback ext3 defaults,errors=remount-ro 0 0

      Just ignore the complaining when it boots.
      When you need the drive, plug it in, and do (for example)

      sudo mount /media/kuback

      It mounts correctly, at least in my installation.

      Of course if one were to plug in the wrong drive, and do the above command, it would happily mount sdc4 to the kubuntu backup location. That could cause a mess, so be careful.

      We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

      Comment


        #4
        Re: How to automatically mount an USB drive to the same point every time?

        Yep, that's a workable method, especially if you don't plug in other USB thingys when you want to use your external drive.

        In my earlier post I said "permanently" -- I problem should have said "when the Kubuntu system is booted".

        Comment

        Working...
        X