Choose style:

Author Topic: How To: Use symlinks to a DATA partition  (Read 11215 times)

0 Members and 1 Guest are viewing this topic.

Offline unclebaldie

  • nOOb
  • *
  • Posts: 8
  • Karma: 2
  • New Forum User
    • View Profile
  • Peppermint version(s): 7 64-bit
Re: How To: Use symlinks to a DATA partition
« Reply #15 on: August 02, 2016, 10:23:12 am »
Hi all,

Many thanks for that very useful tutorial. Just another example of how brilliant PM7 is.
Could I just clarify (sorry if I am being a bit thick here!): :-\
If I have, say, PM7 on sda1, another distro on sda2, and a DATA partition on sda3,
then providing I use the same username on both distros, I would be able to read/write to this DATA on both distros ?
And all the hidden files, configs, etc, would remain on the respective distros HOME folder.
Sorry for asking, but I just want to be clear before I set this up !

Many thanks,
Phil

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1573
  • Karma: 429
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 9 - 64bit
Re: How To: Use symlinks to a DATA partition
« Reply #16 on: August 02, 2016, 11:40:06 am »
Hi unclebaldie,

Yes, that should work just fine. I do that now (accessing the same DATA partition when using different Linux distros). And you are correct: the config files and hidden files and hidden directories remain on the respective distro home folders.

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, awesome, Openbox, i3, JWM

Offline unclebaldie

  • nOOb
  • *
  • Posts: 8
  • Karma: 2
  • New Forum User
    • View Profile
  • Peppermint version(s): 7 64-bit
Re: How To: Use symlinks to a DATA partition
« Reply #17 on: August 02, 2016, 01:42:26 pm »
Whoohoo,
Thanks, Slim ! ;D
I am currently running PM7, Sparky4.3 and Linux Mint Rosa 17.3. (My favourite is, obviously, PM7 !).
And it was a pain in the proverbial to keep the home folders in sync.
Your tutorial has solved my problem.

Many thanks,
Phil

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1573
  • Karma: 429
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 9 - 64bit
Re: How To: Use symlinks to a DATA partition
« Reply #18 on: August 02, 2016, 02:49:02 pm »
Hi unclebaldie,

You are very welcome! And I'm very happy to hear that this is working for you and makes your work easier!  8)

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, awesome, Openbox, i3, JWM

Offline unclebaldie

  • nOOb
  • *
  • Posts: 8
  • Karma: 2
  • New Forum User
    • View Profile
  • Peppermint version(s): 7 64-bit
Re: How To: Use symlinks to a DATA partition
« Reply #19 on: August 07, 2016, 06:19:29 pm »
Hi Slim,

I have encountered an issue that I think needs mentioning (if no-one has already).

My harddisk has 4 distros installed, plus the DATA partition:
sda1 - Peppermint 7
sda2 - Sparky Linux
sda3 - DATA partition
sda5 - swap
sda6 - AntiX MX15
sda7 - PCLinuxOS

When I first setup the DATA partition, I changed ownership to my login name - phil
Fine, I have read/write access to DATA on Peppermint7, Sparky and Antix.
However I setup the PCLOS distro with access to DATA., and rebooted.
I find that I now have only read access to DATA.

It seems that when you create your user in PM7, Sparky and Antix (and I guess many other distros), the username (in my case phil) is allocated a UserID/GroupID of 1000. So I have full access on those distros (because the same UserID/GroupID number).

But PCLOS allocates a UserID/GroupID of 500, so not full access. So I had to change the UserID/GroupID on PCLOS to 1000. Once that is done, it gives me full access..

I don't whether any of this makes sense to you.  :-\
But just thought that I would mention this as a caveat. Make sure that your user has the same User/GroupID on the distros that you want to access DATA.

Hope that this helps,

Phil

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22947
  • Karma: 2561
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: How To: Use symlinks to a DATA partition
« Reply #20 on: August 07, 2016, 09:21:29 pm »
Makes perfect sense to me .. most distros now use GUID 1000 for the first account but there are a few that don't (usually 500).

Your options are to

a) change GUID in PCLOS (as you did)

b) mount the DATA partition with a user/group permission mask in PCLOS
« Last Edit: August 07, 2016, 09:23:20 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4807
  • Karma: 1011
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: How To: Use symlinks to a DATA partition
« Reply #21 on: August 07, 2016, 09:32:47 pm »
That's well spotted  ;).  I also have a multiboot system.  Fortunately, all my distros allocate a UserID/GroupID of 1000.  This UserID/GroupID variance with some distros, does need to be mentioned in the tutorial as a footnote.  Along with the solutions.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1573
  • Karma: 429
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 9 - 64bit
Re: How To: Use symlinks to a DATA partition
« Reply #22 on: August 08, 2016, 12:43:56 pm »
Hi everyone,

I have made a few additions at the end of the Concluding Remarks part of the tutorial that address the issue (described in this forum posting) brought up by unclebaldie (and solved by him and PCNetSpec) that can, in certain constellations of multiboot systems where all installed distros are trying to use the DATA partition, result in access permission trouble -- fortunately this problem is rather rare and can be solved.

Thank you, unclebaldie and PCNetSpec8)

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, awesome, Openbox, i3, JWM

Offline unclebaldie

  • nOOb
  • *
  • Posts: 8
  • Karma: 2
  • New Forum User
    • View Profile
  • Peppermint version(s): 7 64-bit
Re: How To: Use symlinks to a DATA partition
« Reply #23 on: August 08, 2016, 01:22:37 pm »
Thanks, Slim, for adding the warning to your excellent tutorial.
I had to search for how to change the userid - it involves a bit more than just changing the number.
You have to recursively change ownership of all your files.
The following links explain a quick way to do it:
https://muffinresearch.co.uk/linux-changing-uids-and-gids-for-user/
or here:
http://www.cyberciti.biz/faq/linux-change-user-group-uid-gid-for-all-owned-files/
Watch your spacing !

Anyway, my shared DATA is working fine on all my distros now - sweet! Thank you, Slim and Peppermint !!!!! :)

Phil

Offline alynur

  • Trusted User
  • Member
  • *****
  • Posts: 781
  • Karma: 38
  • Habitual Forum Browser
    • View Profile
  • Peppermint version(s): P 9 (64bit), P 9 R
Re: How To: Use symlinks to a DATA partition
« Reply #24 on: August 17, 2016, 02:20:49 pm »
Hi Slim.Fatz, There is something I just don't understand. If I shrink my current root partition and create a DATA partition out of all the available space created, would I make the mount point /mnt or /DATA? And then label it DATA?
What was I thinking?

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22947
  • Karma: 2561
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: How To: Use symlinks to a DATA partition
« Reply #25 on: August 17, 2016, 04:30:00 pm »
You don't have to mount it at all as you create the partition.

You'll mount it later at say /mnt/DATA or /media/DATA via an entry you'll add to /etc/fstab (after first creating that directory)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline alynur

  • Trusted User
  • Member
  • *****
  • Posts: 781
  • Karma: 38
  • Habitual Forum Browser
    • View Profile
  • Peppermint version(s): P 9 (64bit), P 9 R
Re: How To: Use symlinks to a DATA partition
« Reply #26 on: August 17, 2016, 05:07:22 pm »
You don't have to mount it at all as you create the partition.

You'll mount it later at say /mnt/DATA or /media/DATA via an entry you'll add to /etc/fstab (after first creating that directory)

Hi PCNetSpec, so I just create the partion, format it to ext4 and apply changes, do I label it here? Then go to
CREATE THE MOUNT POINT of the tutorial and continue?
What was I thinking?

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22947
  • Karma: 2561
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: How To: Use symlinks to a DATA partition
« Reply #27 on: August 17, 2016, 05:18:23 pm »
Egg Zactly  (and yes set the label in gparted whilst you're there (though the label is only for your info, it's not necessary) ;D
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline alynur

  • Trusted User
  • Member
  • *****
  • Posts: 781
  • Karma: 38
  • Habitual Forum Browser
    • View Profile
  • Peppermint version(s): P 9 (64bit), P 9 R
Re: How To: Use symlinks to a DATA partition
« Reply #28 on: August 17, 2016, 08:22:06 pm »
Egg Zactly  (and yes set the label in gparted whilst you're there (though the label is only for your info, it's not necessary) ;D

Got it, thanks again.
What was I thinking?

Offline alynur

  • Trusted User
  • Member
  • *****
  • Posts: 781
  • Karma: 38
  • Habitual Forum Browser
    • View Profile
  • Peppermint version(s): P 9 (64bit), P 9 R
Re: How To: Use symlinks to a DATA partition
« Reply #29 on: August 19, 2016, 12:35:36 pm »
Hi Slim.Fatz, I don't know why, but for some reason this just didn't want to work. After following the tutorial step for step, when I openned DATA And tried to make a new folder, that option was shaded. I had to create another directory and finally I was able to make new documents. My link command looked like this ln -s /mnt/DATA/DATA/DATA/. I was finally able to make the links and it all works but what the heck? Basically that's what I had to do in my computer as well and hence I was asking about the mount point of the DATA partition. But it's working.  :-\
What was I thinking?