LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-30-2007, 03:10 PM   #1
gjblackford
Member
 
Registered: Jul 2006
Location: Reading, UK
Distribution: Ubuntu
Posts: 68

Rep: Reputation: 15
Mounting External Drive


Hi,

I am trying to setup an FStab entry to mount a drive to a particular mount point and I dont want to use /dev/ as the sdbx no can change depending if another device is attached to the machine, so I have been looking at SSID, and have so far done the following

List of devices attached to machine sdb1 is the device I want to attach by SSID

Code:
lrwxrwxrwx 1 root root 10 2007-09-30 10:26 0E4E-05D0 -> ../../sda1
lrwxrwxrwx 1 root root 10 2007-09-30 10:26 10b3cbf0-3504-4060-ac5a-ee077fc05f55 -> ../../sda3
lrwxrwxrwx 1 root root 10 2007-09-30 10:26 1f563aca-3504-4e15-ae4a-94f763b14395 -> ../../sda4
lrwxrwxrwx 1 root root 10 2007-09-30 10:26 50a05161-b06f-4d12-88a1-101731b18a9e -> ../../sda2
lrwxrwxrwx 1 root root 10 2007-09-30 10:07 511bf33e-cf5d-4110-a6f3-8f9157d582de -> ../../sdb1
FStab Entry
Code:
UUID=511bf33e-cf5d-4110-a6f3-8f9157d582de /media/Fomalhaut auto users,atime,noauto,rw,dev,exec,suid 0 0
Only problem is that when I try to mount the drive a normal user gets a "Permission Denied" error message, if I use the System Settings/Disk & File Systems (Administrator) to Enable the drive it works fine, so it looks like the entry is correct only problem is for some reason a normal user cant mount the drive.

Does anyone have any ideas what I can change or an alternatives to mount the drive without using /dev/sdb1.

Thanks,


Gavin,
 
Old 09-30-2007, 03:17 PM   #2
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Are you using udev? If so change your udev rules to account for the information on the drive you want, and give it a secondary name that you know will not change upon a reconnect of the drive. Then use that name to do all your mounting.

Regards,

Alunduil
 
Old 09-30-2007, 03:36 PM   #3
gjblackford
Member
 
Registered: Jul 2006
Location: Reading, UK
Distribution: Ubuntu
Posts: 68

Original Poster
Rep: Reputation: 15
I don't know all I know is that I formatted the drive as Ext3
 
Old 09-30-2007, 03:50 PM   #4
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Do you know the version of your kernel? If not the following will let you know:
Code:
uname -a
If it is 2.6 you are using udev, and then it's a matter of modifying the rules to do what you want. A good how to on this is located at: http://gentoo-wiki.com/HOWTO_Install...Configure_UDEV. Just adapt this to your needs, and it should work.

Regards,

Alunduil
 
Old 09-30-2007, 04:21 PM   #5
gjblackford
Member
 
Registered: Jul 2006
Location: Reading, UK
Distribution: Ubuntu
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks, I am running kernel 2.6.20-16-generic. I have looked at the link you sent, but it seems to be aimed at setting up a Digital Camera and not a HD, and I think I need to change a few more entries in the line to be added to 10-local.rules, I have included below the output I get from entering udevinfo -a -p /block/sdb/sdb1

Code:
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/block/sdb/sdb1':
    KERNEL=="sdb1"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{stat}=="     393     2094  5835355 46682840"
    ATTR{size}=="781417602"
    ATTR{start}=="63"
    ATTR{dev}=="8:17"

  looking at parent device '/block/sdb':
    KERNELS=="sdb"
    SUBSYSTEMS=="block"
    DRIVERS==""
    ATTRS{stat}=="     263      163     2358     2708  1565315  4270039 46682776  1811936        1  1793904  1814260"
    ATTRS{size}=="781422768"
    ATTRS{removable}=="0"
    ATTRS{range}=="16"
    ATTRS{dev}=="8:16"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3.1/5-3.1:1.0/host4/target4:0:0/4:0:0:0':
    KERNELS=="4:0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS=="sd"
    ATTRS{ioerr_cnt}=="0x0"
    ATTRS{iodone_cnt}=="0x17e391"
    ATTRS{iorequest_cnt}=="0x17e392"
    ATTRS{iocounterbits}=="32"
    ATTRS{timeout}=="30"
    ATTRS{state}=="running"
    ATTRS{rev}=="WQ10"
    ATTRS{model}=="HD400LD         "
    ATTRS{vendor}=="SAMSUNG "
    ATTRS{scsi_level}=="3"
    ATTRS{type}=="0"
    ATTRS{queue_type}=="none"
    ATTRS{queue_depth}=="1"
    ATTRS{device_blocked}=="0"
    ATTRS{max_sectors}=="240"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3.1/5-3.1:1.0/host4/target4:0:0':
    KERNELS=="target4:0:0"
    SUBSYSTEMS==""
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3.1/5-3.1:1.0/host4':
    KERNELS=="host4"
    SUBSYSTEMS==""
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3.1/5-3.1:1.0':
    KERNELS=="5-3.1:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb-storage"
    ATTRS{modalias}=="usb:v07ABpFCFEd0001dc00dsc00dp00ic08isc06ip50"
    ATTRS{bInterfaceProtocol}=="50"
    ATTRS{bInterfaceSubClass}=="06"
    ATTRS{bInterfaceClass}=="08"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-3/5-3.1':
    KERNELS=="5-3.1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="01BC0E47003A"
    ATTRS{product}=="Freecom Hard Drive"
    ATTRS{manufacturer}=="Freecom"
    ATTRS{maxchild}=="0"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="15"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bcdDevice}=="0001"
    ATTRS{idProduct}=="fcfe"
    ATTRS{idVendor}=="07ab"
    ATTRS{bMaxPower}=="500mA"
    ATTRS{bmAttributes}=="c0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-3':
    KERNELS=="5-3"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{product}=="USB2.0 Hub"
    ATTRS{maxchild}=="4"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="13"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0702"
    ATTRS{idProduct}=="0606"
    ATTRS{idVendor}=="05e3"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""

  looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5':
    KERNELS=="usb5"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="0000:00:1d.7"
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{manufacturer}=="Linux 2.6.20-16-generic ehci_hcd"
    ATTRS{maxchild}=="8"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="1"
    ATTRS{speed}=="480"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0206"
    ATTRS{idProduct}=="0000"
    ATTRS{idVendor}=="0000"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""

  looking at parent device '/devices/pci0000:00/0000:00:1d.7':
    KERNELS=="0000:00:1d.7"
    SUBSYSTEMS=="pci"
    DRIVERS=="ehci_hcd"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{modalias}=="pci:v00008086d000027CCsv00001025sd00000094bc0Csc03i20"
    ATTRS{local_cpus}=="ff"
    ATTRS{irq}=="21"
    ATTRS{class}=="0x0c0320"
    ATTRS{subsystem_device}=="0x0094"
    ATTRS{subsystem_vendor}=="0x1025"
    ATTRS{device}=="0x27cc"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
Thanks,


Gavin,
 
  


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
Mounting External Drive gjblackford Ubuntu 6 09-06-2007 02:13 PM
help mounting an external firewire drive Stevetgn Linux - Newbie 0 10-16-2005 02:46 PM
Mounting my external hard drive... Azzath Linux - Hardware 8 02-26-2005 03:27 AM
mounting an external hard drive adin Linux - Hardware 1 01-04-2005 04:18 AM
Mounting external hard drive gadgetboy Linux - Newbie 3 02-02-2003 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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