LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-16-2009, 03:56 PM   #1
drkhelmt
LQ Newbie
 
Registered: Apr 2008
Location: In The Cornfield, Iowa
Distribution: openSuSE 12.1
Posts: 12

Rep: Reputation: 0
fstab, mtab, and Gnome


Greetings,

I'm having a little trouble understanding and how to fix this quagmire. I'm simply trying to change the default mount point of a USB drive.

I am working with SuSE Enterprise Dektop (SLED) 10.2. I have one harde drive (sda) in the laptop with 3 partiticions (one ntfs for windows, one fat for data, and one reiserfs for Linux). I also have one more hard drive and internal laptop drive (sdb) with 1 partition (one reiserfs for data) in a vantec sx enclosure connecting to my laptop by way of USB2.0.

If I leave my fstab file alone
Code:
/dev/sda6            /                    reiserfs   acl,user_xattr        1 1
/dev/sda3            /DataStore           vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/sda1            /windows             ntfs       ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/sda5            swap                 swap       defaults              0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
Sdb1 is mounted to /media/disk, the disk shows up in nautilus in gnome as one drive. /etc/mtab is as follows
Code:
/dev/sda6 / reiserfs rw,acl,user_xattr 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
/dev/sda3 /DataStore vfat rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true 0 0
/dev/sda1 /windows ntfs ro,noexec,nosuid,nodev,gid=100,umask=0002,nls=utf8 0 0
/dev/sdb1 /media/disk reiserfs rw,nosuid,nodev 0 0
Now, if I add this to fstab
Code:
/dev/sdb1	     /media/MoreStuff	  reiserfs   auto,user,rw  	   0 0
Sdb1 is mounted to /media/MoreStuff which is where I want it. Unfortunately, Nautilus shows 2 drives instead of one and one. Clicking on one will take me to the drive, clicking ont he other will give me an error that sdb1 is already mounted.

Can someone please explain the difference between fstab and mtab and where the default mount points of USB devices are stored?

Thanks in advance.
 
Old 02-16-2009, 04:10 PM   #2
digerati1338
Member
 
Registered: May 2007
Location: CO
Distribution: Ubuntu
Posts: 152
Blog Entries: 1

Rep: Reputation: 18
fstab is the filesystem table. mtab is the mount table, listing only mounted devices. You can edit fstab to change mount points, but you shouldn't mess with mtab. I don't know how to change the default mount point of a usb device off hand, but I think it is usually mounted as /media/<volume label>. If it's getting mounted as /media/disk it might mean it has no label. Changing the label may be one way to solve your problem.

My other thought is that I think use drives are represented in fstab by this line:
Code:
usbfs                /proc/bus/usb        usbfs      noauto                0 0
And if that is the case, you are creating two mount points for one device by adding /dev/sdb1. You might try googling for usbfs mount points if you want to try to change the mount point a different way.
 
Old 02-16-2009, 04:12 PM   #3
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
Hi,

/etc/fstab stands for FileSystemTABle. All information about mount points, filesystems of volumes are stored in here, like default mountpoints.

/etc/mtab stands for MountTABle. The only job of /etc/mtab is to record the filesystems that are currently mounted. !Never edit /etc/mtab directly!

So to change the default mountpoint of your USB disk, find out what device it is. It's probably going to be /dev/sdb1 for you. Your system will automount it in /media if there is no entry.

It appears you entry was correct, but try taking the 'auto' part out. It may be trying to mount it twice.

good luck,
rabbit2345

Last edited by rabbit2345; 02-16-2009 at 04:17 PM.
 
Old 02-16-2009, 04:16 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
/etc/fstab records how the devices should be mounted. It is populated by the system administrator.
/etc/mtab tells which devices are actually mounted, and on which mountpoint.

When you issue the command 'mount' with no arguments, it parse /etc/mtab to answer you.

When you issue it with arguments it mounts some device according to either /etc/fstab or the mount point you indicate.

To know more: 'man fstab' and 'man mount'

Last edited by Didier Spaier; 02-16-2009 at 04:17 PM.
 
  


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
diference between /etc/fstab and /etc/mtab cnm Linux - Newbie 4 11-21-2006 05:54 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
/etc/fstab or /etc/mtab praveenv Linux - Newbie 1 08-17-2004 04:03 AM
use mtab as fstab?hi rgiggs Mandriva 5 06-08-2004 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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