ComTech: IT Support Stirling
TwitterFacebookGoogle

Mounting your hard drive in fstab

This tutorial will show you how to mount your hard drives in the fstab file used on all Linux systems.  The following commands were run on Linux Mint 11 but should still work on other systems.

Open up a terminal and type su.  When prompted enter your root password.

Next type gedit /etc/fstab.  This will open up the fstab file which is located in /etc using the text editor gedit.  You should get something which looks like the following:

# /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
# / was on /dev/sda1 during installation

/dev/fd0   /media/floppy0 auto rw,user,noauto,exec,utf8 00      0
/dev/sdb1       /media/dev/sdb       auto       defaults           0             2
/dev/sdc1       /media/dev/sdc        auto       defaults           0             2


Now the entries that interest us are the final two for sdc1 and sdb1.  These are two internal hard drives that have been added to the system.

Before adding any entries you must first know what the hard drive is called.  Chances are if you are adding a second drive then it will be called sdb1 but to check type fdisk -l (as root).  Once you know you will then need to decide where to mount it.  Linux usually uses the /media directory to mount file systems but the choice is yours.

Once you have the required information copy the entry above for either sdb1 or sdc1 and replace /media/dev with your mount point and sdc1 / sdb1 with the name of your hard disk.  That’s it.  Reboot and your hard drive should now be recognised and mounted at boot.

About the Author

P1020114

Hi I’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.

Follow @Comtech247 on Twitter

 

 

Hard drives in Linux keep switching names


I had a problem recently on Linux Mint 10 where my two hard drives, 40Gb and 500Gb, kept switching names.  My 500Gb drive is designated sdb but for some reason keeps changing to sda and none of the applications that require the drive can find it!!  After some investigation work I found that the problem disappears if instead of using sda, sdb etc to identify the drive you use the UUID.  The UUID can be found by right clicking the hard drive and selecting properties.

So to rectify the problem open up fstab and change the hard disk ID.  For example in my fstab file I changed dev/sdb1 to UUID=4955cac1-e8dc-43fb-82a9-867a4518edc4 .  It is still mounted in the same place and it now longer switches its name.

About the Author

Hi I am Chris the owner of ComTech. I provide IT Support, Laptop repairs and Computer repairs to both personal and business clients in and around Stirling. For a list of what I can offer you why not visit my website www.comtech247.net where you will find my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

 

 

CyberChimps
Follow

Get every new post delivered to your Inbox

Join other followers

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera
WP Like Button Plugin by Free WordPress Templates