LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2007, 06:39 AM   #1
Georgina Everingham
LQ Newbie
 
Registered: Oct 2006
Posts: 21

Rep: Reputation: 0
mounting


Hi!
I would like some input on mounting external devices like usb hard drives.
I find that booting up mepis6 it will only enter in fstab and mtab in the etc folder the partitions on my internal hard drive.
I have edited fstab and mtab to include my three external devices (all USB connections), then I can mount these devices in konsole.
What I can't understand is why these edited versions of fstab and mtab return to their original form when I reboot mepis, and leave out the edited items.
What I have to do at the moment is to make copies of the edited version, saved as fstabcopy and mtabcopy, and then overwrite fstab and mtab after booting with these copies.
How can I get mepis to leave the edited files alone?
Is there any way I can have these devices and hda4 on my computer mounted automatically?
Any help her would be appreciated.
 
Old 07-12-2007, 06:37 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
I have edited fstab and mtab to include my three external devices (all USB connections), then I can mount these devices in konsole.
I never touch /etc/mtab. The thing with USB devices is that they are dynamic. I have a SATA hard drive which is /dev/sda, when the OS is up and running, if I plug in my USB pen drive it will be /dev/sdb and because it only has one partition it is /dev/sdb1. Then after that I plug in my USB external drive with two partitions, they will be /dev/sdc1 and /dev/sdc2. But then the next day when the OS is running I plug in the external drive first, now it is /dev/sdb1 and /dev/sdb2, not /dev/sdc(x) like the day before. It's hard to define which is which when you have three USB devices powered on before booting up the OS.
I don't have Mepis, but I do have Debian, if I boot up the OS with my pen drive plugged in and the external drive powered on, neither will be auto-mounted as there is no entry in /etc/fstab, all I do is hit the "System" icon on the desktop and click on the appropriate device to mount it and view the contents in a file browser, it's that simple. And the device I mount first will be /dev/sdb and the next will be /dev/sdc.
Let's say for example, you have two external drives, one has ext3 file system, the other has Fat32, if one one of them is not powered on, how should the system react if the fstab entry for /dev/sdb is Fat 32 but the device is not present and it tries to mount /dev/sdc as /dev/sdb which has a different file system than what is defined in /etc/fstab, the OS will designate the device name based on the order in which it was mounted.
According to the quote I included at the top of this post, it appears even though there is an entry in /etc/fstab, you still end up mounting it manually via CLI, why don't you just hit the "System" icon and mount it with a mouse or mount it via CLI and forget about what's in /etc/fstab. The entries in /etc/fstab are there to have the OS auto-mount at boot-up, what's the sense having an entry in /etc/fstab if you're content with mounting them manually anyways?, which is what you say you're doing, and which is the way it is done with modern systems because of the vast array of USB devices available nowadays, which vary in file system structures greatly.
 
Old 07-13-2007, 03:25 AM   #3
Georgina Everingham
LQ Newbie
 
Registered: Oct 2006
Posts: 21

Original Poster
Rep: Reputation: 0
Mounting

Hi!

Much appreciated your quick response to my query about mounting, and you helpful comments on the way Linux works with external devices.

However there seems to be a difference between Mepis and Debian. When I commenced with Linux Mepis, the first thing I tried was what you suggest, and it does no mount the device in Mepis. This is the reason that I have been struggling for so long. Even my partition hda4 which is noted in fstab is not mounted on bootup, and is not mounted automatically when clicked on in the mount directory. With Mepis6 which I am using, if the device is turned off and then on, then the system will recognise it and it can be opened in a new window. However with Mepis6.5 this does not work.

I would still like to find a way whereby my editing of fstab can be remain permanent, and a way that the devices connected to my computer can be mounted at bootup.

Thank you so much for your kind response to my cry for help.
 
Old 07-13-2007, 03:39 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Udev+hal might have their fingers in this. Some modern distributions like Ubuntu, and Mepis which is an Ubuntu-rip-off, use those to be able to detect devices when they're plugged and do whatever is configured; usually mount the plugged device. To have a device automatically mount during boot process the device must be present and in fstab there needs to be the "auto" option mentioned in the appropriate device line. I'm not sure but like I said, it's possible that udev and hal (or something else) rewrites fstab during boot.
 
  


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
mounting a mount (recursive mounting?) fudam Linux - General 6 10-16-2006 05:50 PM
mounting digital camera, mounting in general? lugoteehalt Linux - Hardware 6 08-29-2006 12:52 PM
Gnome 2.6 Right click mounting and the mounting system Acetylcholine Linux - Hardware 0 07-25-2004 07:34 AM
Mounting HDD vs. Mounting Filesystem snailophone Linux - Hardware 4 08-12-2003 11:00 AM
Mounting mounting extended partition and its Logical drives desbyleo Linux - Newbie 10 02-18-2002 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration