Author Topic: Automount hard drive at startup (resolved)  (Read 2846 times)

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: Automount hard drive at startup
« Reply #15 on: August 07, 2011, 04:37:31 AM »
Hi,

I suggest you copy your files to a folder where the partition format is Linux ext4, and not Ntfs. It is more secure to keep the integrity of the datas. Later you could format that hard drive to ext4 and copy the personal datas back there.

Ok the line that I had in fstab that didn't work was:
UUID=8634B7F034B7E0FB /media/  ntfs  defaults,errors=remount-ro 0       1



There are a few problems with this line.

First, as melodie pointed out, the file type shoud be ntfs-3g, not plain ntfs (or you won't be able ti write to the partition).

Then the mountpoint is given as /media/. Now, the mountpoint doesn't need a trailing slash, and actually mounting an ntfs partition directly on /media is not a good idea as the system uses this directory for removable media. So, create a mountpoint and use the path to that mountpoint instead. (A mountpoint is just an ordinary preferably empty, directory.) You can create it under /media but as we are talking about a permanent mount it would be better to create it somwhere under your home directory.

Also, the final number "1" should probably be "0". "1" is, sort of, reserved for the root partition (/), and I wouldn't use "2" for an ntfs partition.

And finally, while the option errors=remount-ro is useful for filesystems that understand it, I don't think ntfs (or ntfs-3g) does. But I may be wrong.



I think you are right.

Insamity, I said to use PCC users section to add yourself to the group storage, not to setup the mount points. Have you used the program ntfs-config which is apart, somewhere in the menus ? (probably in Applications > more > configuration or something like that).

« Last Edit: August 07, 2011, 04:40:13 AM by melodie »
melodie at #lpic-fr on irc.freenode.net

Online Vorteggs

  • Hero Member
  • *****
  • Posts: 2468
Re: Automount hard drive at startup
« Reply #16 on: August 07, 2011, 04:38:02 AM »
I now know that I set the wrong defaults when I typed it in myself.
Yes wrong.
For example here
Quote
Ok the line that I had in fstab that didn't work was:
UUID=8634B7F034B7E0FB /media/?  ntfs  defaults,errors=remount-ro 0      1
You have to have some directory in /media, lets say /media/Documents.

Online Vorteggs

  • Hero Member
  • *****
  • Posts: 2468
Re: Automount hard drive at startup
« Reply #17 on: August 07, 2011, 04:47:46 AM »
As this partition is all my files and I have a documents, videos, downloads etc is there an easy way to set my default home folder that has all those same folders to that path?
If you want to make this partition to be your /home it's easily done but I can't remember exactly how. Recently there was a solved thread about this in the present section. Just search.
But beware I am not sure if this operation won't erase all already existing files on the partition. :-\

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #18 on: August 07, 2011, 04:59:57 AM »
Thank you bald brick. That helps me understand where I went wrong and I do want to know how to add these type of things manually. thank you to all. I will be adding resolved to the subject line shortly I am just still hoping someone can help me with the whole moving my default folders to this partition. (See last reply I posted)
If you don't take the time to do it right, When will you have the time to do it over?

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: Automount hard drive at startup
« Reply #19 on: August 07, 2011, 05:01:27 AM »
As this partition is all my files and I have a documents, videos, downloads etc is there an easy way to set my default home folder that has all those same folders to that path?
If you want to make this partition to be your /home it's easily done but I can't remember exactly how. Recently there was a solved thread about this in the present section. Just search.
But beware I am not sure if this operation won't erase all already existing files on the partition. :-\

I does not erase the files but make them not accessible (hidden by the mounted partition). The method I suggested above is more logical, because of the difference in the quality of the file systems. And also the mount of an external drive should always be in /mnt/a_directory or in /media/a_directory to avoid confusion in the file system.

melodie at #lpic-fr on irc.freenode.net

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: Automount hard drive at startup
« Reply #20 on: August 07, 2011, 05:05:43 AM »
Thank you bald brick. That helps me understand where I went wrong and I do want to know how to add these type of things manually. thank you to all. I will be adding resolved to the subject line shortly I am just still hoping someone can help me with the whole moving my default folders to this partition. (See last reply I posted)

Hi, this is much more simple than you can figure out. Once mounted to /media/windows for example, you will go into the main directories and open a console, type "mc" and there you will have a text mode file manager where you can select all files and directories from one side panel and copy to the other side panel.

At the beginning it seams tricky, to see how to move in it, but with the tab key to change side panel, the F commands (use only the copy command, not the move command... it's safer) and the Inser or * key to select files and folders, or lists of folders, you will fast have done the whole copy, in a very safe way, and easy to follow what happens.

Later, I can provide you commands to give the right permissions to all theses files... in one command line for all the files and same for the directories.(Ntfs file systems doesn't use the same attributes as in Linux file systems).




melodie at #lpic-fr on irc.freenode.net

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #21 on: August 07, 2011, 05:26:41 AM »
OK I guess I forgot to mention that I am running dual boot with windows (unfortunately) that is why I want to put all my documents in one place and also why it is an ntfs format. sorry I should have said that from the start. again bare with me I am new trying to switch to linux
If you don't take the time to do it right, When will you have the time to do it over?

Offline melodie

  • Hero Member
  • *****
  • Posts: 5945
  • Internet Relay Chat sur Freenode
    • PCLinuxOS Fr
Re: Automount hard drive at startup
« Reply #22 on: August 07, 2011, 05:41:40 AM »
OK I guess I forgot to mention that I am running dual boot with windows (unfortunately) that is why I want to put all my documents in one place and also why it is an ntfs format. sorry I should have said that from the start. again bare with me I am new trying to switch to linux


For the poor dual-booters. ;)

http://www.diskinternals.com/linux-reader/

melodie at #lpic-fr on irc.freenode.net

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #23 on: August 07, 2011, 03:17:05 PM »
thanks again to all and to Melodie I went and found ntfs config and set up all my drives in the media folder. my fstab looks much better now too. thank you for the help.
If you don't take the time to do it right, When will you have the time to do it over?