LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-10-2011, 03:35 PM   #1
wmeler
Member
 
Registered: Dec 2003
Distribution: Linux Mint 21 (Cinnamon)
Posts: 234

Rep: Reputation: 20
Basic Hard Drive Mounting


How do I get my 200 GB hard drive (with reiserfs) to automatically mount on boot up?

Two things I hope may help.

(1) Below, I have attached part of the window I see when I right click on the Hard Drive as it appears in Ubuntu 10.04 LTS. Note it is currently manually mounted already at the time the image was taken.

(2) Here is my /etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda1 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=feec79f8-4df7-4667-a650-11d58cc5f32b none swap sw
0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
Attached Thumbnails
Click image for larger version

Name:	hard_drive.png
Views:	25
Size:	16.3 KB
ID:	6668  

Last edited by wmeler; 04-10-2011 at 03:37 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-10-2011, 03:43 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Just create a new entry to your /etc/fstab. It should look like this:
Code:
UUID=4f9500d8-6d01-491b-9f92-532bf3d613dc /MOUNTPOINT auto defaults 0 0
Of course you have to replace the mountpoint with the folder you want the partition to be mounted at. Because you haven't said which file-system is in use, I have set the file-system to auto in this example, you can replace it with the name of the actual file-system.
 
2 members found this post helpful.
Old 04-10-2011, 03:44 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Ooooops. I didn't get all the facts in the first take.

Last edited by stress_junkie; 04-10-2011 at 03:46 PM.
 
0 members found this post helpful.
Old 04-10-2011, 04:17 PM   #4
wmeler
Member
 
Registered: Dec 2003
Distribution: Linux Mint 21 (Cinnamon)
Posts: 234

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by TobiSGD View Post
Just create a new entry to your /etc/fstab. It should look like this:
Code:
UUID=4f9500d8-6d01-491b-9f92-532bf3d613dc /MOUNTPOINT auto defaults 0 0
Of course you have to replace the mountpoint with the folder you want the partition to be mounted at. Because you haven't said which file-system is in use, I have set the file-system to auto in this example, you can replace it with the name of the actual file-system.

Fantastic. Thanks!

A couple of notes for noobs out there.

(1) I recommend the following line instead in order for more seemless integration for you if you're in Ubuntu like me:
Code:
UUID=4f9500d8-6d01-491b-9f92-532bf3d613dc /media/mydrive auto defaults 0 0
(Copy and paste the entire line--you may have to scroll right--by selecting whole line, right clicking, and then copy.)

More advanced users...scoff away. At *all* of the above. Heh.

(2) To edit your /etc/fstab file, you will need to have administrative/root privileges. There are a billion posts out about this. Or just ask. Then you'll do the following in a terminal:
sudo gedit /etc/fstab

(3) Be sure to save when you edit that file.

(4) Easiest way for changes to /etc/fstab to occur: Restart.

(5) After restart, your hard drive will be mounted and the files for your hard drive will be at:
/media/mydrive

(6) If you're in Ubuntu, you can find the drive under Places (VERY top). It will be one of the listings.

Hope that helps some noobs out there.

Last edited by wmeler; 04-10-2011 at 04:20 PM.
 
1 members found this post helpful.
Old 04-10-2011, 04:26 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by wmeler View Post
(1) I recommend the following line instead in order for more seemless integration for you if you're in Ubuntu like me:
Code:
UUID=4f9500d8-6d01-491b-9f92-532bf3d613dc /media/mydrive auto defaults 0 0
(Copy and paste the entire line--you may have to scroll right--by selecting whole line, right clicking, and then copy.)

More advanced users...scoff away. At *all* of the above. Heh.
This will only work for you, nobody else in the world should have a partition with the same UUID. To see your own UUIDs, if needed, just type
Code:
sudo blkid
into a terminal.

Quote:
(4) Easiest way for changes to /etc/fstab to occur: Restart.
Easier way: Type this into a terminal:
Code:
sudo mount -a
 
2 members found this post helpful.
Old 04-10-2011, 04:46 PM   #6
wmeler
Member
 
Registered: Dec 2003
Distribution: Linux Mint 21 (Cinnamon)
Posts: 234

Original Poster
Rep: Reputation: 20
Excellent. Should have mentioned the UUID bit.
Gave a YES to both excellent responses, TobiSGD.

While I'm at it, how do I view non-block devices?
 
Old 04-10-2011, 04:51 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Sorry, I don't understand, what do you mean with "view non-block devices"?
 
Old 04-10-2011, 05:28 PM   #8
wmeler
Member
 
Registered: Dec 2003
Distribution: Linux Mint 21 (Cinnamon)
Posts: 234

Original Poster
Rep: Reputation: 20
According to "man blkid", the "blkid" command lists out block devices.
Looking for a similar command that lists out char devices, if such a command exists...?
 
  


Reply

Tags
blkid, fstab, mount, uuid


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
grub basic video command to boot a external SATA hard drive james2b Linux - General 2 08-22-2009 04:45 PM
Help on mounting Hard Disk Drive and CD-ROM drive in Dapper. ussr_1991 Ubuntu 2 08-18-2007 11:33 PM
mounting other hard drive? lilili Linux - Newbie 6 01-07-2006 01:25 PM
mounting hard drive thug_poet22 Linux - Hardware 14 01-04-2005 02:11 AM
Very basic hard drive question downinthemine Linux - Newbie 6 07-29-2003 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:00 PM.

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