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

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Automount hard drive at startup (resolved)
« on: August 06, 2011, 05:13:31 PM »
Hello all I am a newb so please bare with me.
I just installed PCLOS KDE FM 2011.6 on my Alienware laptop. With the previous version I had before I could go into the PCC and choose auto mount all partitions but there does not seem to be that function on this version. I have gone into fstab and added my hard drive that way (by UUID) but it only shows up for the root user. I store all my data on this separate hard drive so although after start up I can click on it and it opens, the programs I have running on start up need access to it before then. can anybody help please? Thanks in advance.
« Last Edit: August 07, 2011, 03:27:49 PM by Insamity »
If you don't take the time to do it right, When will you have the time to do it over?

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11577
  • ----IOFLU----
Re: Automount hard drive at startup
« Reply #1 on: August 06, 2011, 05:17:25 PM »
Hello all I am a newb so please bare with me.
I just installed PCLOS KDE FM 2011.6 on my Alienware laptop. With the previous version I had before I could go into the PCC and choose auto mount all partitions but there does not seem to be that function on this version. I have gone into fstab and added my hard drive that way (by UUID) but it only shows up for the root user. I store all my data on this separate hard drive so although after start up I can click on it and it opens, the programs I have running on start up need access to it before then. can anybody help please? Thanks in advance.

Show us the contents of your /etc/fstab so we can see what options you used.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Automount hard drive at startup
« Reply #2 on: August 06, 2011, 05:18:13 PM »
Hi,

Your user login might need to be in the storage group. If you type the command "id" (without the quotes) in konsole, what does it return ? Could you paste the result here ?

Some members knowing KDE much better than I do will certainly come for more help (I'm an Lxde and Openbox standalone user). By the time the KDE experts come for you, I wish you welcome to the forums and to PCLinuxOS !
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #3 on: August 06, 2011, 07:43:29 PM »
Thanks for both of the quick responses
I removed the line I had in fstab but here is what is in there now:
# Entry for /dev/sda4 :
UUID=342b22c1-cd35-43b7-a850-8be207a0e14a / ext3 defaults 1 1
none /proc proc defaults 0 0
# Entry for /dev/sda3 :
UUID=1d7bceb3-45d0-498e-a921-1e210ec08ca4 swap swap defaults 0 0
none /dev/pts devpts defaults 0 0

the the uuid of the partition I wanted to add to this is:
/dev/sda2: LABEL="Documents" UUID="8634B7F034B7E0FB" TYPE="ntfs"

[sam@localhost ~]$ id
uid=500(sam) gid=500(sam) groups=500(sam),7(lp),19(floppy),22(cdrom),43(usb),80(cdwriter),81(audio),82(video),83(dialout),100(users),490(polkituser),502(vboxusers)
If you don't take the time to do it right, When will you have the time to do it over?

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #4 on: August 06, 2011, 07:46:33 PM »
Also just a note I was told to go into pcc and set a mount point there and it would ask if I want to save so I went there and typed /mnt for the mount point and got the message that mount should stay in root??? I also tried to set /media and got the same message.
If you don't take the time to do it right, When will you have the time to do it over?

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11577
  • ----IOFLU----
Re: Automount hard drive at startup
« Reply #5 on: August 06, 2011, 11:06:00 PM »
Thanks for both of the quick responses
I removed the line I had in fstab but here is what is in there now:
# Entry for /dev/sda4 :
UUID=342b22c1-cd35-43b7-a850-8be207a0e14a / ext3 defaults 1 1
none /proc proc defaults 0 0
# Entry for /dev/sda3 :
UUID=1d7bceb3-45d0-498e-a921-1e210ec08ca4 swap swap defaults 0 0
none /dev/pts devpts defaults 0 0

the the uuid of the partition I wanted to add to this is:
/dev/sda2: LABEL="Documents" UUID="8634B7F034B7E0FB" TYPE="ntfs"

[sam@localhost ~]$ id
uid=500(sam) gid=500(sam) groups=500(sam),7(lp),19(floppy),22(cdrom),43(usb),80(cdwriter),81(audio),82(video),83(dialout),100(users),490(polkituser),502(vboxusers)


In your first post you said you had already added the partition(s) to fstab, but there's no evidence of that, yet you also say only root can access the partition.   ???

I think you need to better describe the actual condition of the system as it now is, because what you say and what fstab says are conflicting.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #6 on: August 07, 2011, 12:30:44 AM »
as I said it didn't work so I removed the lines from fstab
If you don't take the time to do it right, When will you have the time to do it over?

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Automount hard drive at startup
« Reply #7 on: August 07, 2011, 01:19:13 AM »
Also just a note I was told to go into pcc and set a mount point there and it would ask if I want to save so I went there and typed /mnt for the mount point and got the message that mount should stay in root??? I also tried to set /media and got the same message.

That could be because both /mnt and /media are already within the / directory
« Last Edit: August 07, 2011, 01:24:25 AM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5331
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Automount hard drive at startup
« Reply #8 on: August 07, 2011, 01:23:44 AM »
as I said it didn't work so I removed the lines from fstab

How exactly do you expect one to help you if you don't post it the way it was?   It is hard to help out if one doesn't have the information that you were using to begin with. Old-Polack is the smartest person when it comes to these types of issues. If given the correct information, he will figure out the problem.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Automount hard drive at startup
« Reply #9 on: August 07, 2011, 02:42:23 AM »
as I said it didn't work so I removed the lines from fstab

And those lines were ... ?

as I said it didn't work so I removed the lines from fstab

How exactly do you expect one to help you if you don't post it the way it was?   It is hard to help out if one doesn't have the information that you were using to begin with. Old-Polack is the smartest person when it comes to these types of issues. If given the correct information, he will figure out the problem.

+1
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2408
Re: Automount hard drive at startup
« Reply #10 on: August 07, 2011, 03:50:22 AM »
Thanks for both of the quick responses
I removed the line I had in fstab but here is what is in there now:
# Entry for /dev/sda4 :
UUID=342b22c1-cd35-43b7-a850-8be207a0e14a / ext3 defaults 1 1
none /proc proc defaults 0 0
# Entry for /dev/sda3 :
UUID=1d7bceb3-45d0-498e-a921-1e210ec08ca4 swap swap defaults 0 0
none /dev/pts devpts defaults 0 0

the the uuid of the partition I wanted to add to this is:
/dev/sda2: LABEL="Documents" UUID="8634B7F034B7E0FB" TYPE="ntfs"

[sam@localhost ~]$ id
uid=500(sam) gid=500(sam) groups=500(sam),7(lp),19(floppy),22(cdrom),43(usb),80(cdwriter),81(audio),82(video),83(dialout),100(users),490(polkituser),502(vboxusers)

Here's how it looks in my fstab:
Quote
# Entry for /dev/sda1 :
UUID=5D9876EA42830A06 /mnt/Store ntfs-3g defaults,umask=000 0 0
I did it via PCC/Local disks/Manage disk partitions, clicking on a partition (unmount if needed), clicking Mount point and manually entering /mnt/Store as a mount address. Prior to this I created a directory "Store" in /mnt/.

By the way I don't see a mount point in your string...
« Last Edit: August 07, 2011, 03:52:58 AM by Vorteks »

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #11 on: August 07, 2011, 04:02:54 AM »
Ok the line that I had in fstab that didn't work was:
UUID=8634B7F034B7E0FB /media/  ntfs  defaults,errors=remount-ro 0       1

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: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Automount hard drive at startup
« Reply #12 on: August 07, 2011, 04:13:20 AM »
Ok the line that I had in fstab that didn't work was:
UUID=8634B7F034B7E0FB /media/  ntfs  defaults,errors=remount-ro 0       1

Hi,
1) you are missing ownership in group storage // add yourself to group storage, in PCC>system>users and groups - if the group storage would not exist, create it
2) if the drive is formatted to ntfs, just install 2 packages : ntfs-3g and ntfs-config and if they are already installed all you have to do is start ntfs-config with the hard drive connected.  (I don't know where in the menus you will have it, I use another desktop where it's not necessary). Then ntfs-config will write the correct entry in fstab and provide the way to setup the mount point, while ntfs-3g will take care of allowing read/write into the hard drive.

« Last Edit: August 07, 2011, 04:15:44 AM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Insamity

  • Jr. Member
  • **
  • Posts: 24
  • I fear no BSOD
Re: Automount hard drive at startup
« Reply #13 on: August 07, 2011, 04:27:28 AM »
OK thank you so much for the help I went to pcc as instructed and set mount point as /Documents and it did ask if I wanted to save. It now works beautifully.
Here is my current fstab:
# Entry for /dev/sda4 :
UUID=342b22c1-cd35-43b7-a850-8be207a0e14a / ext3 defaults 1 1
# Entry for /dev/sda2 :
UUID=8634B7F034B7E0FB /Documents ntfs-3g defaults 0 0
none /dev/pts devpts defaults 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda3 :
UUID=1d7bceb3-45d0-498e-a921-1e210ec08ca4 swap swap defaults 0 0

I now know that I set the wrong defaults when I typed it in myself.


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 don't take the time to do it right, When will you have the time to do it over?

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6379
  • I'm going South
Re: Automount hard drive at startup
« Reply #14 on: August 07, 2011, 04:36:21 AM »
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 filesystem type should be ntfs-3g, not plain ntfs (or you won't be able to 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 else -- perhaps 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.

Edit: You posted back while I was typing, but I'll leave this post as it may be of use to somebody else with a similar problem. I'm glad your setup is working.
« Last Edit: August 07, 2011, 04:47:51 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D