LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2012, 05:14 AM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 430
Blog Entries: 30

Rep: Reputation: 2
udev changed from sdh1 to sdb1


Hi, I have an usb flash disk that is usually mounted at /dev/sdf1 when plugged in (cause b-e are used up by internal card reader). But if the flash disk is plugged in before boot, it is mounted at /dev/sdb1. How do I use udev rules to force the internal card reader at b even when other stuff are plugged in before boot.

Code:
server://root
ted:$ udevadm info -q path -n /dev/sdc
/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/target7:0:0/7:0:0:0/block/sdc
server://root
ted:$ udevadm info -q path -n /dev/sdd
/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/target7:0:0/7:0:0:1/block/sdd
server://root
ted:$ udevadm info -q path -n /dev/sde
/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/target7:0:0/7:0:0:2/block/sde
server://root
ted:$ udevadm info -q path -n /dev/sdf
/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0/host7/target7:0:0/7:0:0:3/block/sdf
Thanks,
Ted

Last edited by ted_chou12; 10-09-2012 at 05:21 AM.
 
Old 10-10-2012, 02:13 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,218

Rep: Reputation: Disabled
As I am a bit lazy I would simply insert a line for it in /etc/fstab, identifying it by UUID. The "blkid" command will tell you its UUID. According to "man fstab":
Code:
Instead  of  giving  the device explicitly, one may indicate the
              (ext2 or xfs) filesystem that is to be mounted by  its  UUID  or
              volume   label   (cf.    e2label(8)  or  xfs_admin(8)),  writing
              LABEL=<label>   or   UUID=<uuid>,    e.g.,    `LABEL=Boot'    or
              `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.  This will make the
              system more robust: adding or removing a SCSI disk  changes  the
              disk device name but not the filesystem volume label.

              Note that mount(8) uses UUIDs as strings. The string representa‐
              tion of the UUID should be based on lower case characters.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
My pendrive suddenly changed from /dev/sda1 to /dev/sdb1! stf92 Slackware 10 08-08-2012 06:02 PM
UDEV: Unable to run a command line interface script after USB automount using udev mohamr2 Linux - Embedded & Single-board computer 8 08-16-2011 11:39 AM
UDEV - SBLive(emu10k) - Mandriva hangs at UDEV during boot.....still! Grrr. peterlowrie Linux - Hardware 2 05-23-2010 07:37 PM
Can't mount sdb1 Fixed_it Linux - Newbie 38 04-15-2007 04:27 PM
sdb but no sdb1? Moebius Linux - Hardware 3 02-15-2004 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration