LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-21-2009, 06:26 PM   #1
rjensen
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
External Drive Mounting to Wrong Point Even Though It's In fstab Ubuntu 8.10


I've searched everywhere I could and I can't seem to find this specific problem. I have two external drives and one internal drive (in addition to my main drive). The three drives are all setup to be mounted in fstab.

However, I just restarted my computer and one of the drives that used to be at /dev/sdg1 is now at /dev/sdc1. How do I get it to mount to the correct point everytime I reboot?

Side note, I've been using the computer for a couple months and haven't had this problem until now.

Here's my fstab:

proc /proc proc defaults 0 0
# Entry for /dev/sda1 :
UUID=3f29a4e8-a3c2-400d-96b9-65bbf86ebdd2 / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sda5 :
UUID=6a3abef8-442f-4ea8-8882-41520e801c58 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb1 /media/music ext3 defaults,user 0 0
/dev/sdg1 /media/disk ext3 defaults,user 0 0
/dev/sdh1 /media/myBook ntfs-3g defaults,locale=en_US.UTF-8 0 0
none /proc/bus/usb usbfs devgid=46,devmode=664 0 0


---
/dev/sdg1 /media/disk ext3 defaults,user 0 0 <--this is the drive that is mounting at /dev/sdc1

Last edited by rjensen; 01-21-2009 at 06:28 PM.
 
Old 01-21-2009, 06:38 PM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Welcome to LQ!

external drives will get automounted. You may want to disable that.

#man automount
 
Old 01-21-2009, 06:54 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Having external drives mount automatically when you boot may not be a good idea. If the drive isn't connected, the "mount -a" will fail and the boot process will abort. You can use the "noauto" mount option in the /etc/fstab entry to prevent this.

For external drives, use "UUID=<filesystem UUID#>" instead of the device node in the first field of /etc/fstab. You can find this out by using the "udevinfo" command. For example, to find the UUID of the filesystem mounted on /dev/sdb1, use "udevinfo -q env -n /dev/sdb1". The entry will look like your entry for /dev/sda1 that you posted. Then you can mount the external drive even if it has been assigned a different device node.

On my system (openSUSE), if there is an entry in /etc/stab, then HAL & friends will not automount the drive. If you manually mount an external drive, don't mount under /media. Leave that for the automount system. I think that Ubuntu is configured differently and may modify /etc/fstab, but this may be an earlier version.

Also check if you have a program called "halmount". It is a very convenient program (script actually) that you run as a normal user. You can use it to trigger the automount system to mount a partition by giving its node or its label. You can use it to mount a dvd or cdrom or to eject. You may not have it however. ( may only be on certain rpm based systems ) I'm just bringing it up, because if you do have it, using it to mount, unmount or eject media is very handy.
 
Old 01-21-2009, 06:54 PM   #4
rjensen
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 0
So there's no way to force it to mount to the same point everytime? Or if I remove both of my external drives from the fstab they will mount to the same spot?

The reason it's a problem is I have playlists on my main drive that reference files from these drives. If the drive doesn't mount to the same spot everytime, my playlists break.

Thanks for the help!
 
Old 01-21-2009, 07:01 PM   #5
rjensen
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks @jschiwal! That worked perfectly! Very Much Appreciated.
 
Old 01-21-2009, 07:03 PM   #6
rjensen
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Just for anyone else who may have this problem, here is my final fstab file per @jschiwal's instructions

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda1 :
UUID=3f29a4e8-a3c2-400d-96b9-65bbf86ebdd2 / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sda5 :
UUID=6a3abef8-442f-4ea8-8882-41520e801c58 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb1 /media/music ext3 defaults,user 0 0
UUID=3785dff1-425b-4c59-a998-9d7408f726c6 /media/disk ext3 defaults,user 0 0
UUID=486CF04F6CF03970 /media/myBook ntfs-3g defaults,locale=en_US.UTF-8 0 0
none /proc/bus/usb usbfs devgid=46,devmode=664 0 0
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem mounting a drive via mount point under home CelticBlues Linux - Newbie 8 06-18-2008 10:30 AM
UUID: wrong values in Ubuntu /etc/fstab files grautu Ubuntu 7 05-05-2007 04:28 PM
mounting external hard drive in /etc/fstab Micro420 Linux - Newbie 1 11-07-2006 05:12 AM
/etc/fstab and mounting a Pen drive caps_phisto Linux - Newbie 1 09-02-2004 01:10 PM
What am I doing wrong in my Fstab? Mounting for Users jimdaworm Slackware 4 11-07-2003 01:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration