.

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

English   English (change)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

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.

the_guv's sistasite: Setup The Ultimate VPS

"Blank box to top-notch web server"

  • plain English copy/paste tutorials with video
  • written for VPS beginners and Linux newbies
  • perfect for multiple sites, blogs & more
  • Fast. Secure. Future-proofed. Cheap-as-chips!
  • "Wow!!" "godsend!!" "GREAT!!!" "awesome"

Ubuntu & Debian, Nginx (beats Apache), MySQL, PHP-FPM, Xcache, WordPress, WP MU, Drupal etccccc

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 ...
  • Easy-as-you-like! Adapt Square Boxes with Hassle-Free Curves

    Give your site a design lift with this simple CSS code snippet. Simply choose a radius and drop it in a div for a real easy way to add curves without any images or javascript. This is super-fast to do and works for [...]
  • Adding Old /home Docs to a New System

    This is pretty obvious for many, but just to be clear for noobs, or those migrating from a previous Ubuntu system to a new one for the first time. If you're migrating from a previous Ubuntu OS such as Jaunty [...]
  • Add Windows & Other Systems with VirtualBox

    Here is how to use VirtualBox to install & emulate virtual operating systems to run in Linux. Launch Windows, for example, rather like any other application, with no reboot requirement. Hey, Windows even loads [...]
  • A User-Friendly Command Line Shell .. (Yup, For Real!)

    This guide & cheatsheet - using simple memorable commands, not complex syntax - will make you not only faster at the Linux shell, but enjoy it too. Copying over my old bashrc file to a new install (it lives in [...]
  • Set Up Previous VirtualBox Machines in Minutes

    Problem: After a fresh install of VirtualBox, perhaps in a new Linux installation, how can you seamlessly restore previous virtual operating systems, working as before? Here is how .. This works for VirtualBox [...]
  • Dividing the Hard Drive: Food for Thought

    Pre-OS-install, mapping out data/system demands for optimal disk segmentation saves headaches down the road. Here's a heads-up to help. You don't have to, but it is a mighty good idea to put pen to paper, [...]
... maybe you'll like these?

.