LinuxQuestions.org
Help answer threads with 0 replies.
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 05-03-2007, 04:33 PM   #1
entropy
LQ Newbie
 
Registered: Dec 2006
Distribution: Kubuntu
Posts: 4

Rep: Reputation: 0
Always assigning the same /dev location to USB drives (a keychain always to /dev/sdh)


Hi,

I'm just a couple of weeks born Kubuntu user, and there's one small annoyance I'd love to get some help on.

I have many USB external hard drives, a memory card reader, and a couple of flash drives. Whenever I plug one in, it shows on /dev/sd*, but it's not fixed, sometimes a hard drive will get assigned to /dev/sdg, sometimes /dev/sdi, etc.

How does one assign a fixed location (i.e., a specific drive always on /dev/sdh)?

I searched endlessly for a solution, but I haven't found anything since I don't really know what to search for.

I'm on Kubuntu Feisty Fawn x64.

Thanks in advance!

Last edited by entropy; 05-03-2007 at 04:37 PM.
 
Old 05-03-2007, 06:00 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The assigned device would probably be a function of which usb/firewire port is connected and the order you connect them.

It may be better to use something other than the device to mount it, such as the label or the UUID number.

You can use the udevinfo program to get information about the device. The information will include the label, if there is one and the UUID number of the device.

Code:
udevinfo -q env -n /dev/sdb1
Now use cut and paste, to replace the device field in /etc/fstab with "UUID=<paste uuid number here>"

In a recent message I posted an actual example from my laptop: http://www.linuxquestions.org/questi...14#post2734314
It is in message #6.

This example is for an externel firewire drive formatted using the EXT3 filesystem.
I used the "user" and "noauto" options. This allows me to mount the drive without using sudo: "mount /media/lbigdisk"

My system (SuSE 10.2) uses udev and hal to automount devices. The hal helper program respects the /etc/fstab entry. Hopefully yours will do the same.

You might want to make a backup of /etc/fstab before and after the edit. I guess some systems dynamically edit the /etc/fstab file. I don't know about Ubuntu.
 
Old 05-03-2007, 06:10 PM   #3
entropy
LQ Newbie
 
Registered: Dec 2006
Distribution: Kubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
Hey thanks a lot, I'm gonna try this tomorrow, but it seems like the solution to my problem.
 
  


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
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 12:52 AM
Static /dev nodes for USB drives - Solution Ruler2112 Linux - General 3 04-25-2007 10:32 AM
Assigning MySQL databases to certain hard drives benrose111488 Linux - Software 5 11-23-2004 11:42 AM
Give user permission to mount/use cdrom drives or usb drives zwyrbla Linux - Newbie 2 08-23-2004 04:30 PM
How can I boot either one of my hard drives /dev/hda or /dev/hdb, I have RH9 and FC2 omogunkristi Linux - General 1 06-21-2004 05:11 AM

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

All times are GMT -5. The time now is 01:56 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