LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-25-2009, 02:37 PM   #1
Rockgod1969
Member
 
Registered: Jan 2007
Posts: 54

Rep: Reputation: 15
External Harddive changes mount point


Hi I have an HP DV9000 running the latest version of ubuntu, and I have a large western digital external harddrive. I Am able to access it, and it works, but everytime I boot up, it switches between mounting at sdc1 and sdd1. This makes it difficult for programs I use like amarok and f-spot to locate the files in their collections. Is there a way to set it so the harddrive will mount in the same place every time?
 
Old 04-25-2009, 02:44 PM   #2
hurry_hui
Member
 
Registered: Oct 2008
Location: Near Jakarta
Distribution: Slackware, Arch, Slax, Porteus, Tiny Core, Slitaz
Posts: 355
Blog Entries: 1

Rep: Reputation: 52
Quote:
but everytime I boot up, it switches between mounting at sdc1 and sdd1.
IMO, it has something to do with your BIOS boot sequence, grub and/or udev (i.e., which drive is detected first). You need to use label or UUID to address drive you'll mount.
 
Old 04-25-2009, 02: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
Yes. If you use an fstab entry for it, but use the UUID number or the LABEL in place of the device.

You can determine the UUID by using the `udevinfo' program or by following the /dev/disk/by-id/<device-name> to the physical device.

Code:
D_VENDOR=ATA
ID_MODEL=ST31000333AS
ID_REVISION=SD15
ID_SERIAL=SATA_ST31000333AS_9TE05DW6
ID_SERIAL_SHORT=9TE05DW6
ID_TYPE=disk
ID_BUS=scsi
ID_ATA_COMPAT=ST31000333AS_9TE05DW6
ID_PATH=pci-0000:00:1f.2-scsi-5:0:0:0
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=61b27e9c-572d-4706-9d03-1fb49fefd53b
ID_FS_UUID_ENC=61b27e9c-572d-4706-9d03-1fb49fefd53b
ID_FS_LABEL=
ID_FS_LABEL_ENC=
ID_FS_LABEL_SAFE=
FSTAB_NAME=/dev/sdb1
FSTAB_DIR=/mnt/tera
FSTAB_TYPE=ext3
FSTAB_OPTS=user,noauto,acl,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0
FSTAB_FREQ=0
FSTAB_PASSNO=0
The highlighted part is what you would put in the first column of the fstab entry.

What kind of filesystem does the drive use? You might want to either use your GUI partioning program or let it auto mount once and then use the same options. I doubt I would have come up with the options like user_xattr, and the others in the example above if I had written an fstab entry from scratch.

For an external drive, I would recommend the user and the noauto options. The user or users option allows a regular user to mount the drive without needing to use sudo. You could even put it in your ~/.profile login script. The `noauto' option will prevent a booting failure if the disk isn't plugged in then you boot up.

If it uses VFAT or NTFS, then use the "uid=<yourusername>" and "gid=<yourprimarygroup>" options, as well as the "fmask" and "dmask" options to determine the permissions of files and directories respectively.

Here is an example of an fstab entry for an external drive & an internal ntfs partition.
Code:
UUID=5783d30e-8dc4-447a-80f4-8952129e9d9e       /mnt/mybook     ext3    user,defaults,noauto 0 0

/dev/sda2       /mnt/vista      ntfs    rw,user,fmask=117,dmask=007,uid=jschiwal,gid=jschiwal 0 0

Last edited by jschiwal; 04-25-2009 at 03:00 PM.
 
  


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
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 10:03 AM
puppy+grub saves ram installed mount point as HD install mount point agualust Linux - Newbie 0 04-10-2009 11:23 AM
Formatting external HDD - what mount point? Chriswaterguy Linux - Hardware 16 08-14-2008 09:55 PM
mount NFS to mount point then share out the mount point ionic_slim Linux - Networking 2 04-20-2008 12:17 PM

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

All times are GMT -5. The time now is 04:48 AM.

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