Force External Drives To Mount To the Same Point

By Randy Jensen | Feb 20, 2009

Ubuntu LogoI recently rebooted my computer and normally I have my 2 internal drives and 2 external drives all mounted manually through the fstab file. If you don’t know how to do this, I wrote about mounting NTFS drives a while back. If you need help, just leave me a comment below.

Anyway, what happened was one of my external drives mounted, but to the wrong point. It is suppose to mount as /dev/sdg1 and instead mounted as /dev/sdh1. This probably isn’t a big problem for most people, but I have playlists that reference audio and video files from the external drive. Since Ubuntu mounted it to a different location, the playlist thinks the files don’t exist. The fix is fairly simple, here’s how to do it.

  1. Open a terminal window and type ’sudo fdisk -l’ to find the location of the drive
    Ubuntu Drive Location
  2. Now type ‘udevinfo -q env -n /dev/sdc1′ (of course, replace /dev/sdc1 with your drive location you got above)
  3. You’re looking for the line that has UUID=
    UUID In Ubuntu
  4. Right click this and choose ‘Copy’ in the terminal window
    Copy UUID
  5. Now type ’sudo gedit /etc/fstab’ in your terminal window and look for the line where you are mounting your external drive
    Paste UUID

If you want to test it out, simple type ’sudo umount -a’ in the terminal and then type ’sudo mount -a’. All your drives should mount correctly from now on.


  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Design Float
  • DZone
  • Ping.fm
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yahoo! Buzz
Copy the code below to your web site.
x 

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

  • You can also go by volume name, but UUID is best :)

    Nice writeup
  • Hey Mark,

    Thanks for the tip!
  • Hey, this is awesome help - thanks for sharing it!

    So I had to cave and put Vista back on my wife's laptop (no more 7) - but I left a partition for Ubuntu :) so on the weekend I'll put it on with a Vista theme and Gnomenu - set it all up and see if she likes it!
  • NP!

    You'll have to report back and let me know how it works out for her!
  • Will do! I'll probably give it a go tonight and see how it turns out (I bet that it will look almost exactly the same too).
blog comments powered by Disqus
© 2009 Randy Jensen Online, - PassionDuo WordPress Theme