This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

Automount Hard Disks

pp4mnklinux

Sun Jan 05, 2014 12:15:01 am

Hello everybody and HAPPY NEW YEAR:

I need your help, because I cant find the solution to this problem, a really important problem for me.

I have got 6 Hard disks in my CPU with different partitions, in order to use them the most organiced way I can, I have now problem when using Windows, Linux Zorin Core Edition (7).. but when using Zorin Lite (7.1) I dont know how to forget the necessity to write my password when trying to acces those HD.


I love Zorin Core because I can access the disks without the necessity to write passwords but My favourite system is Zorin Lite (speed) but I hate It when mounting volumes. Please, Can you explain me the method, software, programmas... that I need to automatically mount the other hard disks and partitions when booting.

Thanks a lot (please, try to extend your explication as much as you can so I can follow the method) HAVE A NICE DAY :arrow:

Swarfendor437

Sun Jan 05, 2014 12:22:43 pm

Having searched with the term 'Lubuntu' on which Lite is based I found nothing but did get top search for 'kubuntu'!

Here is the best solution offered:

http://pysdm.sourceforge.net/

Original referred post here:

http://askubuntu.com/questions/20572/ho ... d-at-login

to give you an idea how it looks. :D

pp4mnklinux

Sun Jan 05, 2014 6:44:04 pm

Thanks a lot Swarfendor437 I'll try it as soon as I can , now I'm with the tree wishes men ;)

HAVE A NICE DAY

Swarfendor437

Sun Jan 05, 2014 6:57:30 pm

Hi pp4mnklinux, You have a nice day too! Keep us posted! :D

Linx

Thu Jan 09, 2014 1:08:40 pm

Hey, I know exactly what you need. Now I'll be honest It has been a long time since I have done this with the Light Version of any OS, but I have done it recently on my CentOS server (and it should be mostly the same with any OS.

To "Automount" what you have to do is edit the /etc/fstab file with the information you need.

First thing is first, you need to get a list of the devices and your going to need a place to mount them.
Step one, find out what needs mounting. This can be done using the following command.
dmesg | grep -P "(sd[a-z]): \1[0-1]"
What this is going to do is going to run the command "dmesg" and then it is going to use a regular expression to filter the output for any lines containing "sda: sda1" and "sdb: sdb1" etc. That should be a good list of Devices and Partitions that you are going to need.

Second, Create mount locations.
this is a really easy part. I would suggest mounting in one of 2 locations, /mnt or /media/$(whoami) To be able to do this you are going to need root access so type
sudo su root
cd /media/$(whoami)
Next we are going to create the directories are are going to bind the mount location to. (this is going to vary based on your drives and personal preference. I like to name mydirectories after what they are actually going to be, ex I'm going to make one called sda1 which will be for mounting sda1, and one for sdb1 for sdb1 .... cause I like the KISS method. you can do this by typing the following command.
mkdir sda1 sdb1 sdc1 sdc2 sdc3
after this you are going to want to actually mount the locations this would be done as follows.
mount /dev/sda1 /media/$(whoami)/sda1
mount /dev/sdb1 /media/$(whoami)/sdb1
mount /dev/sdc1 /media/$(whoami)/sdc1
mount /dev/sdc2 /media/$(whoami)/sdc2
mount /dev/sdc3 /media/$(whoami)/sdc3
Please note the /dev/ will be followed by the device name, the /mnt/ (or /media/$(whoami)/) will be followed by the folders you created.
At this point the drives should be accessible to you (but that isn't what you wanted, so were not done yet). Now normally when I'm doing this there is some trial and error, so it is common for not all of them to work, keep note of any of them that say it didn't work, delete the directories that didn't mount using the following command.
>>>>>(WARNING: If you run this on a file that is actually mounted, it will erase everything on the partition that the directory is bound to. WARNING)<<<<<
rm -r sdc1 sdc2
Now what you should be left with are the directories that properly mounted

Our Final Step is actually making the changes to the fstab file.
First if you created the directories in the /media/$(whoami)/ you are actually going to need the username now, to get this simply type
whoami
and off we go to edit the fstab
sudo nano /etc/fstab
and you are going to add each mount to the fstab in the following format
/dev/sda1 /media/<yourusername>/sda1 auto defaults 0 0
Normally this is going to be more than enough, you should be able to reboot (sudo shutdown -r 00) and see if the devices are mounted as you would like. If it is not quite how you want then you are likely also wanting shortcuts to the mounted locations (which may or may not be automatically generated, I don't know for the light version of zorin) you are able to create symbolic links to the bound directories using the "ln" command as follows.
ln -s /media/$(whoami)/sda1 /home/$(whoami)/Desktop/
ln -s /media/$(whoami)/sdb1 /home/$(whoami)/Desktop/
ln -s /media/$(whoami)/sdc1 /home/$(whoami)/Desktop/
ln -s /media/$(whoami)/sdc2 /home/$(whoami)/Desktop/
ln -s /media/$(whoami)/sdc3 /home/$(whoami)/Desktop/

And should about do it .... at least, it works for me. It is possible that you might need to actually specify the type instead of using "auto" when adding the entry in the fstab folder, however normally if they mount without an issue, then auto is going to work fine.

If you need more assistance, please paste the results of all the commands here, and then I can take a look at it. =]


Let me know if this helps ... or if I need to clear something up.

Linx

Thu Jan 09, 2014 1:11:24 pm

Actually, I just read the links that >>>>Swarfendor437<<<<< provided .... that is a gui way of doing the same thing. I suggest you use that method ... due to the KISS method.

I don't know how to gui. =[