F12: Mount hard disk at startup
I have two 2 hard disk (hdd) with ntfs file system and most of my home files are placed at one of the hdd which differ from my linux ext3 file system. So What I used to do is every time I logged in, I would click on the hdd icon after opening my Dolphin file manager. One thing i dislike about it is that sometime to wait for dolphin is quite slow after start up. Plus, sometimes I forgot that I got to mount my hdd. Especially my 1T hdd. So this is what I have done.
Locate the hard disk u want to mount. At console insert as root:-
fdisk -l | grep NTFSThe output is something like this
[root@localhost ahmyi]# fdisk -l | grep NTFSLike I know my files are located at the hard disk that is in 1TB. So it must be the sdc5.
/dev/sdb1 * 1 9963 80027766 7 HPFS/NTFS
/dev/sdc5 2 121601 976751968+ 7 HPFS/NTFS
Open up a txt editor, like kwrite etc.
Type the following script
#!/bin/bash
mkdir /media/zizu1000
mount -t ntfs-3g /dev/sdc5 /media/zizu1000
Save it to any file you prefered. By the way, I mount it at /media/ is due to that is where dolphin mounted it before. I saved my file to zizu1000. Now lets copy it to bin. In terminal, as root type in:-
[ahmyi@localhost ~]$ su
Password:
[root@localhost ahmyi]# cp zizu1000 /bin
[root@localhost ahmyi]# chmod +x zizu1000
Now u have your an executable software in linux, a mounter. If you run your application through terminal you can't unmount it using the dolphin. You got to script in "umount /dev/sdc5 /" without the ". The next step is inserting it in your menu.
In the menu editor, create a new item.
Name it to what ever you like. Like I did was Mounter 1TB.
Now edit in the command form the file name you used. Like i previously saved it as zizu1000.
Then, in the advanced tab click the Use as different user and usename as root. Save your menu.
cpNow still in root change directory to bin by typing "cd /bin" without the ". Make it executable "chmod +x zizu1000". So now in your terminal you should have something like this:-/bin
[ahmyi@localhost ~]$ su
Password:
[root@localhost ahmyi]# cp zizu1000 /bin
[root@localhost ahmyi]# chmod +x zizu1000
Now u have your an executable software in linux, a mounter. If you run your application through terminal you can't unmount it using the dolphin. You got to script in "umount /dev/sdc5 /" without the ". The next step is inserting it in your menu.
In the menu editor, create a new item.
Name it to what ever you like. Like I did was Mounter 1TB.
Now edit in the command form the file name you used. Like i previously saved it as zizu1000.
Then, in the advanced tab click the Use as different user and usename as root. Save your menu.
The finale is to set it as startup application. At
sytem setting>advanced> autostart
Comments
Post a Comment