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 12-09-2008, 06:27 PM   #1
Jon N.
LQ Newbie
 
Registered: Dec 2008
Location: Fresno, CA
Distribution: I do it with Ubuntu!
Posts: 20

Rep: Reputation: Disabled
I want my TB Drive to auto-mount


I've got a 300GB WD that I use for my UBUNTU OS, and my TB Drive for storage. I have to manually mount the drive every time I boot up. It's considered as removable media by my system. What's the easiest way to have this drive auto-mount and show on my desktop at boot up? (I'm such a greenhorn newbie!)
Thanks in advance for any help, or solutions.
 
Old 12-09-2008, 06:36 PM   #2
nyle
Member
 
Registered: Feb 2008
Location: Atlanta
Distribution: Ubuntu 9.10
Posts: 42

Rep: Reputation: 17
add it as an entry to your /etc/fstab file. it will automatically mount if you did it right.
 
Old 12-09-2008, 07:05 PM   #3
Jon N.
LQ Newbie
 
Registered: Dec 2008
Location: Fresno, CA
Distribution: I do it with Ubuntu!
Posts: 20

Original Poster
Rep: Reputation: Disabled
Please give me instructions.

Please give me a HOWTO. My Linux Toolbox doesn't cover any of it.
Thanks.
Jon N.
 
Old 12-09-2008, 07:40 PM   #4
yzhong
Member
 
Registered: Jun 2007
Location: sydney
Distribution: redhat , ubuntu, centos
Posts: 56

Rep: Reputation: 16
As you said can manually mount that device, after doing that.
Just type in "more /etc/mtab" to find the line for your device.
such as
...
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
...
And then copy paste that line to file /etc/fstab (using vi or other tools)
save and reboot

(if you don't know how to manually mount that device, need to use fdisk -l or view /var/log/messages or /var/log/dmesg to find the device name, like sdb1,sdc1)
 
Old 12-09-2008, 11:31 PM   #5
Jon N.
LQ Newbie
 
Registered: Dec 2008
Location: Fresno, CA
Distribution: I do it with Ubuntu!
Posts: 20

Original Poster
Rep: Reputation: Disabled
Sorry, didn't work...

When I did this, it caused my TB drive to lock me out! Reversed the process and I am back where I started.

This is my line for the drive in sdb1:

/dev/sdb1 /media/1TB\040Hard\040Drive fuseblk rw,nosuid,nodev,allow_other,blksiz
e=4096 0 0

What's wrong?

Thanks in advance. Let's see microshaft handle this without charging an arm & a leg!
 
Old 12-10-2008, 12:24 AM   #6
Jon N.
LQ Newbie
 
Registered: Dec 2008
Location: Fresno, CA
Distribution: I do it with Ubuntu!
Posts: 20

Original Poster
Rep: Reputation: Disabled
Here is some more info...

My mtab file looks like this:

/dev/sda1 / ext3 rw,relatime,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
/proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,nosuid,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
lrm /lib/modules/2.6.27-9-generic/volatile tmpfs rw,mode=755 0 0
securityfs /sys/kernel/security securityfs rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/jonathan/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user
=jonathan 0 0
/dev/sdb1 /media/1TB\040Hard\040Drive fuseblk rw,nosuid,nodev,allow_other,blksiz
e=4096 0 0

My fstab file looks like this:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=9d07bdb6-35b1-44ae-8485-7d32c8ddceb0 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=735e1391-1d9d-4676-9c95-5562adca6806 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

When I cut & paste the /dev/sdb1 from mtab into the fstab, save and reboot, it locks me out of the TB drive, and tells me I don't have permission. I needed to reverse to what you see now.

Can you assist, please?
 
Old 12-10-2008, 12:54 AM   #7
Jon N.
LQ Newbie
 
Registered: Dec 2008
Location: Fresno, CA
Distribution: I do it with Ubuntu!
Posts: 20

Original Poster
Rep: Reputation: Disabled
I found it! Yes!

Here is the link:

http://helpforlinux.blogspot.com/200...on-ubuntu.html

I stumbled on it when googling "mounting drives in Ubuntu"

The program is called "pysdm". I configured it, and now my TB drive pops up on boot.

Problem solved.

Thanks to everyone. Now I need to get to know how to do things like this in command line, solomente`!

Have a great night!

Jon N.
 
Old 12-10-2008, 10:00 AM   #8
nyle
Member
 
Registered: Feb 2008
Location: Atlanta
Distribution: Ubuntu 9.10
Posts: 42

Rep: Reputation: 17
well using third-party solutions is certainly an option, but getting this done did not require more than just an additional line in your fstab file. when i posted my initial tip i was at work and did not have time to elaborate (figured someone else would), but all you had to add to fstab was something like:

Code:
/dev/hdd1 /media/hd ext3 defaults 0 0
where /dev/hdd1 is the physical drive partition i am mounting and /media/hd is the folder i want to access this drive partition through. ext3 is of course the filesystem, defaults covers all the extraneous stuff and 0 0 only comes into play if i want the drive backed up and fsck-ed.

a line like that is all it should have taken to do what your program did there.

Last edited by nyle; 12-10-2008 at 10:02 AM.
 
Old 12-11-2008, 12:29 AM   #9
Jon N.
LQ Newbie
 
Registered: Dec 2008
Location: Fresno, CA
Distribution: I do it with Ubuntu!
Posts: 20

Original Poster
Rep: Reputation: Disabled
Question Thanks, Nyle!

Yeah, when I checked what the program had entered into my fstab, I was shocked at the ease of it all. All I needed to do was to enter this simple line:

/dev/sdb1 /media/sdb1 ntfs defaults 0 0

What I still don't understand though, is why linux needs theses incredibly long spaces between the commands & definitions. When I posted this, the servers word processor took out most of the spaces. I was told that just two to three spaces were all that were needed for the system to differentiate between source & target command protocols, like the way it looks in this post. In my fstab file, there are at least 15-20 spaces between /dev/sdb1 & /media/sdb1, and at least 5 spaces between ntfs, defaults, and the first 0. My books never explain why it's done that way, they just say this is the way it should be done. You live and you learn. Please explain why command line does it like this, if you can.

Thanks for your response, Nyle.

Jon N.
 
  


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
auto mount network drive baba Linux - Networking 1 06-14-2007 11:23 AM
got my ntfs sata drive to mount but cat get to auto mount Jack Daniels Linux - Hardware 3 04-15-2007 11:42 AM
auto mount usb drive jag Slackware 3 07-28-2006 04:09 AM
Auto Mount a Network Drive thebutler4 Linux - Newbie 3 06-23-2004 10:56 PM
Auto-mount a network drive agarnier Linux - Networking 4 10-29-2003 08:09 AM


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