Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 08-13-2006, 11:28 PM   #1
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Duplicate entries in fstab

Is it possible to have multiple entries in /etc/fstab with the same device name? I have an external usb hard drive formatted as ReiserFS as well as various other usb devices with other filesystems, and it would be nice to have an entry for each (e.g. /mnt/hd would do ReiserFS, /mnt/camera would do vfat, etc. but all for /dev/sda1).
Old 08-13-2006, 11:58 PM   #2
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,849

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
If I'm following you, you mean you have multiple usb devices that when plugged in all show up as the same /dev/sda1 device, right?

I don't think it's possible to have multiple fstab entries for the same device entry. I tried that once and only got errors. But if your system is using udev, then it should be pretty easy to set it up to detect the individual devices when they are plugged in and create different device aliases for each one. That is, you can have a /dev/harddrive, a /dev/camera, /dev/flashdrive and so on. Then you can create different fstab entries for each of those devices.

Look here for info on creating udev device rules:
Old 08-14-2006, 12:06 AM   #3
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I don't have a 2.6 kernel, so no udev at this point. I don't mean multiple ones plugged it at the same time, but just various usb devices that I own with different filesystems. Since no one fstab entry will cover all of them, I thought it would be nice to have different mount points and use a different filesystem depending on which I use. Any way to do that without udev, or am I going to have to do manual mount commands all the time?
Old 08-14-2006, 01:08 AM   #4
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
i think by default 'mount' will determine what file system you have, just make 1 script like:-
sudo mount /dev/sda /home/user1/Desktop/usbdisk

*don't care who's usb hdd u use, this script will mount the partition.
Then later on you can create a custom menu at kde to mount the disk.
So, next time when you plugin the usb disk, you can use the menu to mount the disk to ~/Desktop/usbdisk


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
Duplicate desktop entries - gnome and kde fyanardi Debian 0 02-23-2006 09:51 PM
duplicate entries in grub d_GeNeRiT Fedora 5 01-26-2006 07:22 AM
Duplicate entries in RPM database -- different architectures fiservguy Red Hat 3 01-19-2006 07:17 PM
Duplicate Entries OpenSuSE 10.0 TMan459 SUSE / openSUSE 3 10-19-2005 04:43 AM
need help booting the system - duplicate /etc/inittab entries? ksgill Linux - Newbie 1 05-10-2004 07:47 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration