Re: Automatically mounting USB storage devices under their correct mount points



On 2008-05-02, K. Jennings <kjennings@xxxxxxxxxxxxxx> wrote:
I have two USB sticks and two USB hard drives connected to a PC.
The USB sticks have been formatted as ext2, whereas the drives have been
formatted as jfs. My question is, how can things be configured so that
each of those drives gets mounted under its correct mount point at boot
time?

Very easy.

Look under /dev/disk/by-id/

ls -l /dev/disk/by-id/

Let's say that your stick's partition shows as

/dev/disk/by-id/usb-USB_USB_2.0_Flash_13DFA16D-0:0-part1

(my actual example)

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

and create directory

mkdir /mnt/4gb

and then it will be automounted the next time you insert the thumb
drive.

I do it all the time;

i

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. For
example, USB stick #1 might be associated with /dev/sda in one occasion,
but with /dev/sdb on another. How can one then make sure that USB stick
#1 will always be mounted under (say) /Stick1, stick #2 under /Stick2,
etc.? (For simplicity, I am assuming a single partition in each of the
USB storage devices.)



--
Due to extreme spam originating from Google Groups, and their inattention
to spammers, I and many others block all articles originating
from Google Groups. If you want your postings to be seen by
more readers you will need to find a different means of
posting on Usenet.
http://improve-usenet.org/
.



Relevant Pages

  • Re: Largest External HDD I Can Use With a Dimension 8200?
    ... Got the problem with the external Maxtor OneTouch II drive resolved. ... I totally uninstalled and reinstalled the Maxtor software, and used a different USB port on the back of my D-8300. ... These problems with ALL THE USB DEVICES started about 6 months ago, and increased with frequency until recently they became intolerable. ... I use the two front USB ports to connect my PNY Flash Drives, and get errors when plugging in to forward connector, but not the back one. ...
    (alt.sys.pc-clone.dell)
  • Re: Installing Fedora without a CDROM: my HOWTO
    ... Here is my HOWTO on installing Linux from a USB drive, ... disk or USB key rather than a CDROM boot disk. ... Put auxillary files (special drivers, post setup install config, ... This way I can mount any number of hard drives in the ...
    (Fedora)
  • Re: Booting Vista from external drive violate MS EULA?
    ... of OS install to diff drives. ... Meaning this boots off usb vista, if there is another hard drive ...
    (microsoft.public.windows.vista.general)
  • Re: XP recognising an external USB drive
    ... It's running on Windows XP. ... for external hard drives that causes this problem (WinXP whilst operating ... to blame as the USB standard. ... itself won't recognise the drive on cold start, ...
    (microsoft.public.windowsxp.hardware)
  • Re: SATA HDD in external USB2 case no longer recognised after 1st reboot
    ... only to find that the SATA drive was no longer ... is it normal that I have 5 USB controllers in my device ... manager, ... both my external drives are Maxtor, but I know the "Maxtor 6 Y160P0 USB ...
    (microsoft.public.windowsxp.hardware)