I do not know how many times I will ever receive requests such as “ Hello, how can I automatically mount a hard disk boot Ubuntu? ”. Finally I managed to find some ‘time to write this article I will show you the steps necessary to ensure that, in a completely automatic, power up your Ubuntu are also mounted hard drive or hard drive you need . Let’s start with a first method , longer and more cumbersome, but you will have full control of what you are doing. Open the terminal and type:
sudo mkdir / media / namepersonaldetails
Of course replace “ namepersonaldetails ” with a name to your liking. With this command we are not doing is create a directory under / media where we will mount our hard drive.Now comes the slightly more difficult to know the name of your HD (/ dev/sda2 / dev/sda3, etc.). You can do this from a terminal type the command:
sudo fdisk-l
or the command:
df-h
Now we have to edit the fstab file is a configuration file used to indicate which and how many drives loaded at boot time, with their options. Enter, therefore, the following command:
sudo nano / etc / fstab
and, at the end of the file, add:
/ Dev/sda3 / media / namepersonaldetails ntfs auto, rw, exec, users, dmask = 000, fmask = 111, nls = utf8 0 0
As you can see it, in this case, a HD with NTFS file system. To check that the HD is really mounted, type:
sudo mount-a
Another effective method , and very fast, is to create a small startup script. Type:
gedit ~ / mount.sh
and paste the following code:
# / Bin / sh
gvfs-mount-d / dev / sdaX
Where, of course, instead of sdaX you need to put the id of your HD. Now granted execute permissions to this script:
chmod + x ~ / mount.sh
And add it to “ boot applications ”in Ubuntu. All very simple, do not you think?
No comments:
Post a Comment