Need to mount second internal hard drive to specific location

5,047

This should work

Look at the output of df. It will tell you the device for your external drive:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             446G   36G  388G   9% /
udev                  1.9G  4.0K  1.9G   1% /dev
tmpfs                 750M  888K  750M   1% /run
none                  5.0M  8.0K  5.0M   1% /run/lock
none                  1.9G  4.7M  1.9G   1% /run/shm
/dev/sdb1              58G   17G   39G  30% /media/external

Then add an entry to /etc/fstab (use sudo pico /etc/fstab for instance):

/dev/sdb1    /mount-point/you-want  ext4  defaults   0   0

"ext4" should reflect the actual filesystem on your drive. Don't know it? look at output from "mount" to see the "type".

Once all this is done, as long as the drive is connected to the system when it boots, it should appear under the mount point you specified.

Share:
5,047

Related videos on Youtube

bennettwrite
Author by

bennettwrite

Updated on September 18, 2022

Comments

  • bennettwrite
    bennettwrite over 1 year

    I'm running Ubuntu 11.10 Desktop on an old server. The Ubuntu OS is running on a 250Gb hard drive and the files I want to share on on a second 1Tb hard drive mounted in the server.

    The 1Tb drive auto mounted to /media/New Volume in Ubuntu. But because it is mounted under /media my Windows Vista machines can't see the correct file path since it seems I can't share /media...

    Is there anyway to direct/force Ubuntu to mount the secondary hard drive under /home/public?

    Any advice?

  • bennettwrite
    bennettwrite over 12 years
    I've tried to mount by editing /etc/fstab and adding the UUID and when I go to mount it says that only root can mount to /home. Do I need to restart for it to auto mount to that location?
  • petermolnar
    petermolnar about 12 years
    yes, you do need to restart...
  • BlitZz
    BlitZz about 12 years
    Not necessarily, you can do sudo mount -a, this will (as root) mount all partitions defined in fstab.