Auto Mounting
Auto mounting disks
If you have multiple hard disks and multiple partitions you might want them to auto mount when
your machine starts up.
This is achieved by:
1. Creating a folder for each partition in /media naming your folder whatever you want,
2. chmod 777 the created folders
3. edit fstab by doing a sudo gedit /etc/fstab (if you're using the kde desktop you should replace
gedit with kate)
4. Now that fstab is open you can add your partitions:
Ntfs partitions: /dev/sdb2 /media/foldername ntfs-3g defaults,locale=en_ZA.UTF-8 0 0
Take note that you change the device and the mountpoint(media/YourFolderName)
Linux partitions: /dev/sdc2 /media/foldername ext3 defaults 0 0
Again change the device, mountpoint and extra here is the type of filesystem...I used ext3.
5. Save changes and close the fstab file.
Example of what my fstab file looks like:
# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
#
proc /proc proc defaults 0 0
# Entry for /dev/sdb3 :
UUID=f1dd5af9-fcc7-498a-9c46-7459fef3cd81 / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sdb5 :
UUID=a331606f-4e31-4c8b-8947-f5f94f83c231 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb2 /media/MyStuff ntfs-3g defaults,locale=en_ZA.UTF-8 0 0
/dev/sda3 /media/Backup ntfs-3g defaults,locale=en_ZA.UTF-8 0 0
/dev/sda2 /media/Data ntfs-3g defaults,locale=en_ZA.UTF-8 0 0
/dev/sda1 /media/Ent ntfs-3g defaults,locale=en_ZA.UTF-8 0 0
/dev/sdb6 /media/movies1 ext3 defaults 0 0
/dev/sdc1 /media/movies2 ext3 defaults 0 0
/dev/sdc2 /media/movies3 ext3 defaults 0 0
That should be it. Bounce the machine and your drives should be auto mounted. By doing it this
way, your mounted disks will show up on your desktop.