Re: Automatically mounting USB storage devices under their correct mount points
- From: Dances With Crows <danceswithcrows@xxxxxxx>
- Date: 2 May 2008 22:44:11 GMT
Ignoramus23760 staggered into the Black Sun and said:
On 2008-05-02, K. Jennings wrote:
I have two USB sticks and two USB hard drives connected. How can
things be configured so that each of those drives gets mounted under
its correct mount point at boot time?
In general, if something can be unplugged easily, you shouldn't mount it
at boot time. If these things are going to stay attached to one machine
permanently, why didn't you use faster and cheaper SATA disks? Or is
this an ad hoc solution?
Let's say that your stick's partition shows as
/dev/disk/by-id/usb-USB_USB_2.0_Flash_13DFA16D-0:0-part1
Then you can add a line to /etc/fstab like this:
/dev/disk/by-id/usb-USB_USB_2.0_Flash_13DFA16D-0:0-part1 /mnt/4gb \
auto noauto,user 0 0
This is overly verbose. Use e2label and whatever labeling conventions
that JFS uses (jfstune?) to give each filesystem a unique label. That
reduces the fstab line to:
LABEL=label1 /mnt/label1 auto noatime 0 0
....which is easier to deal with.
and then it will be automounted the next time you insert the thumb
drive.
No, it won't, not unless you're running an automounter. The "noauto"
option you wrote in your fourth fstab field also makes it so that device
will not be mounted automatically at boot time.
If I understand it correctly, the actual SCSI device associated to
each piece of hardware will be selected at boot time, but I do not
understand how that is done, or whether one has any control over it.
First SCSI disk detected = /dev/sda. Second = /dev/sdb. Detection
order is at least partially controlled by the BIOS if you have a Real
SCSI controller. USB devices usually have higher letters than SCSI or
SATA devices, unless the machine boots from a USB device. This is why
many people use labels and/or the LV names that LVM provides.
--
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect. --Linus Torvalds
My blog and resume: http://crow202.dyndns.org:8080/wordpress/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.
- Follow-Ups:
- Re: Automatically mounting USB storage devices under their correct mount points
- From: Maurice Batey
- Re: Automatically mounting USB storage devices under their correct mount points
- References:
- Automatically mounting USB storage devices under their correct mount points
- From: K. Jennings
- Re: Automatically mounting USB storage devices under their correct mount points
- From: Ignoramus23760
- Automatically mounting USB storage devices under their correct mount points
- Prev by Date: Re: redirect output to different pts?
- Next by Date: Re: dict not piping through less/pager
- Previous by thread: Re: Automatically mounting USB storage devices under their correct mount points
- Next by thread: Re: Automatically mounting USB storage devices under their correct mount points
- Index(es):
Relevant Pages
|