LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Basic Hard Drive Mounting (http://www.linuxquestions.org/questions/linux-software-2/basic-hard-drive-mounting-874163/)

wmeler 04-10-2011 04:35 PM

Basic Hard Drive Mounting
 
1 Attachment(s)
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

TobiSGD 04-10-2011 04:43 PM

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.

stress_junkie 04-10-2011 04:44 PM

Ooooops. I didn't get all the facts in the first take.

wmeler 04-10-2011 05:17 PM

Quote:

Originally Posted by TobiSGD (Post 4320289)
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.

TobiSGD 04-10-2011 05:26 PM

Quote:

Originally Posted by wmeler (Post 4320315)
(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

wmeler 04-10-2011 05:46 PM

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?

TobiSGD 04-10-2011 05:51 PM

Sorry, I don't understand, what do you mean with "view non-block devices"?

wmeler 04-10-2011 06:28 PM

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...?


All times are GMT -5. The time now is 02:52 AM.