.

SAVE TIME! Permanent Partition Mount [KARMIC KOALA BIBLE #15]

Stop Having to Mount Partitions Manually

ubuntu karmic koala

Here's how to stop password requests every time you need to mount media. Automate access of any media: partitions, internal/external drives, etc.

One problem with having separate partitions or hard drives - for example for your backup, music collection or website development - is that, every time you boot up, you have to mount those when required, providing a password.

The time-saving solution is to mount such media permanently.

Set Up & Enhance Ubuntu 9.10 .. KARMIC KOALA BIBLE

In simple copy/paste steps .. from zero to hero.

Scroll down for the full series index.

Wake up and smell the Ubuntu! Hope it helps. the_guv

There are two steps in this process. Firstly to tell Karmic Koala where to find the mount, externally of the system's automatically recognised partitions, and where you want that mounted. Secondly, to create the folder within Koala's recognised file structure to house the mounted media. When setup, for example, your backup folder on a secondary disk can be accessed from within your /home/username folder. Handy, huh?

Tell Karmic Mount & Local Associated Folder Locations

Open the file that controls your mounts:-

sudo nano /etc/fstab

At the bottom of the file, for each partition or drive you wish to mount for ever, paste:-

/dev/sdb1  /mnt/backupBox  ext3  users,noatime,auto,rw,nodev,exec,nosuid 0 0
  • /dev/sdb1 - media to mount
  • /mnt/backupBox - location to mount to with a friendly name
  • ext3 - filesystem
  • users - allow all users, alternatively use user
  • noatime - don't waste resources recording last access time or, if you want this info, change to atime
  • auto - mount on boot, alternatively noauto allows you to mount when needed
  • rw - read write access, alternatively ro would be read only
  • nodev - prevents unauthorized device mounts
  • exec - execute programmes from disk, alternatively noexec prohibits this
  • nosuid - do not allow set-user-identifier
  • 0 - dunno, probably should, someone clue me in please
  • 0 - ditto

.. read man mount for more details or Google it.

Save the file.

Create the Local Folder to House Mounted Media

Now create the folder location for the mount so, in this example:-

sudo mkdir /mnt/backupBox

Reboot.

In Nautilus, look for /mnt/backupBox. You can create a launcher for easier access if needed.

Two Handy Commands when Planning Media to Mount

  • df -h report file system disk space usage
  • sudo fdisk -l list recognized partition tables

Symbolic Link to Permanent Mounted Partition

Here's an optional third step.

Rather than having to navigate each time to your /mnt folder to find your media, you can shortcut to there from, say, your /home/username folder. An easy way to do this is to open nautilus twice, once navigating to your /mnt folder and, with the other, to your /home folder.

Now, holding down the Ctrl and Shift keys, simply drag the newly mounted media file accross to your /home/username folder which you can see in your /home folder. From now on, when you navigate to your /home/username folder, click on the symlink and the contents of the mounted partition are revealed right there, as though they resided directly in your home directory. But beware, this is not like a shortcut in windows; files and folders contained in a symbolically linked destination behave as though they were wherever you have created the link so, say you delete a file from a symlink in your /home/username folder, you really really do delete the original file.

Alternatively, if you prefer to use syntax to create the symbolic link, here's the deal:-

ln -s <destination> <linkname>

So, for this example:-

ln -s /mnt/backupBox /home/username/backup

.. where the first destination is the folder to link to, and the second the place to add the link, with it's new name, in this case, being 'backup'.


If you liked that ...
... maybe you'll like these?

.