New HDD, how to partition and have permissions after<SOLVED>

New to SolydXK? This is the place to start.
Please check the other subforums to see if there's a more suitable place for your question.
User avatar
phazon1
Posts: 62
Joined: 19 Jan 2014 03:25
Contact:

New HDD, how to partition and have permissions after<SOLVED>

Postby phazon1 » 03 Mar 2014 04:44

I have a 60 GiB hard drive that I sucessfully created several 10 gig partitions that I installed each of several distros (SolydX, Ubuntu, Mint) and a 30 partition for storage. I have been able to use the storage partition by saving things to it etc while booted in each of the distros.

I procured a used 320 GiB hard drive which I tried to do the same thing with, which would be the partitions for distos, and then leaving a large partition for storage.

In this case, while booted in any of the distros, I have no permission to save anything to the large "storage" partition.

Since this drive has some other problems I don't plan to use it any more, but I do plan to buy a new drive and I want to know what I might have done wrong so that when I get a new healthy drive and partition it, I have full permissions.

I used gparted to create all the partitions and I don't seem to remember seeing any questions uring the process about giving permission while creating them.

in short: How should I proceed in partitioning a new drive so that I have full permission to save stuff to differing partitions when booted in a distro that resides on another partition?

Thanks for reading

User avatar
Orbmiser
Posts: 829
Joined: 24 Aug 2013 22:58
Location: Portland,Oregon

Re: New HDD, how to partition and have permissions after

Postby Orbmiser » 03 Mar 2014 05:39

For me with 3 partitions / root /home and /data I just created the partitions. Assign each partition and format root & home. Leaving /data alone and leave unformatted just assigning a mount point like /Data to it. As have Data files and want them unchanged and intact.

After installing OS to the root partition and booting up the first time root and /home should already have full permissions. I don't remember if my /Data had to be mounted originally or the OS saw and mounted it for me on first boot. But scrolling down the image you can see my Ntfs E:Data partition I have selected to automount.

Additional partitions may be needed to be mounted first or you can use gui tools depending on DE as I use KDE then I can have the partitions mounted automatically on bootup in my System settings. As well as my 2 external Ntfs usb drives auto-mounted.

Comes down to which desktop you are using Gnome,Cinnamon,Mate,KDE or Xfce.
In KDE all I have to do is go System Settings>Removable Devices to give me the options I need.
Devices.jpeg
Devices.jpeg (44.78 KiB) Viewed 3888 times
Also if wanting to do it the manual way then you will be wanting to learn to edit fstab file for adding,modifying and removing partitions,devices there.
.
Portfolio
http://500px.com/Orbmiser
Flickr
http://www.flickr.com/photos/orb9220/

SolydK - Kernel 3.16-2-amd64 - KDE 4.14.1 Update Pack: 2014.10.15

User avatar
raivac
Posts: 121
Joined: 02 Sep 2013 22:25
Location: France, Lyon

Re: New HDD, how to partition and have permissions after

Postby raivac » 03 Mar 2014 09:34

Hi Phazon1 (my native langage is not english, so ... :-) )

I didn't see anything about permissions in gparted, so you have to do this manually.
Assuming you are using ext3 or ext4 systemfile or similar (not ntfs)

On my solydX 64, automount mount my externals disks in '/media/myname/disk_label'
you can see it with this command:

Code: Select all

ls -lad /media/myname/*
this give something similar to this:

Code: Select all

drwxr-x---+ 3 root root 4096 mars   3 10:17 /media/myname/disk_label
and you can see that the permissions are very 'restrictives'

you can try to change this by giving full access to everyone with:

Code: Select all

sudo chmod 777 /media/myname/disk_label
(the partition have to be mounted first)
to finally obtain this:

Code: Select all

drwxrwxrwx 3 root root 4096 mars   3 10:05 disk_label
If your file manager let you open a directory as root (with thunar, i can do a right-click and select 'open as root'), you can use it to change permissions on the mounted partition without usind command line.

Thierry
SolydX x32

User avatar
ilu
Posts: 2712
Joined: 09 Oct 2013 12:45

Re: New HDD, how to partition and have permissions after

Postby ilu » 05 Mar 2014 12:50

As far as I understand it is best to do any permission changes in the /etc/fstab file. It's fairly straightforward. There are a lot of explanations on the web about the structure of fstab, it.s not really hard and much easier than this chmod stuff.

Attention: You have to boot the system from the livedisk or usb-stick and edit fstab. from there Just backup the file first, in case you do anything wrong.

In this post there is some information about how to find out and use UID for use in fstab: http://forums.solydxk.com/viewtopic.php ... f2f4bc99c8 although most of it might not be relevant to you.

User avatar
Orbmiser
Posts: 829
Joined: 24 Aug 2013 22:58
Location: Portland,Oregon

Re: New HDD, how to partition and have permissions after

Postby Orbmiser » 05 Mar 2014 12:56

"Attention: You have to boot the system from the livedisk or usb-stick and edit fstab."
That is not correct you can root or sudo edit the fstab anytime. It''s good idea to backup the original fstab file by renaming. You will have to reboot to have the fstab changes take effect.

Still I don't see why there is even a need to edit fstab. As have ran over a dozen distro's with a mix of windows,Linux partitions and external ntfs usb drives without ever needing to edit fstab file for general use and access to partitions or devices.
.
Portfolio
http://500px.com/Orbmiser
Flickr
http://www.flickr.com/photos/orb9220/

SolydK - Kernel 3.16-2-amd64 - KDE 4.14.1 Update Pack: 2014.10.15

User avatar
raivac
Posts: 121
Joined: 02 Sep 2013 22:25
Location: France, Lyon

Re: New HDD, how to partition and have permissions after

Postby raivac » 05 Mar 2014 14:53

be carrefull with fstab (and mount...)

To my knowledge, on ext2/ext3/etx4/..., mounting as RW don't change a RO filesystem in RW.
you still have to use chmod (or similar) to make it RW.

this is similar with networks shares (two access levels):
- 1st access: the network with a global access right (RO/RW/...)
- 2nd access: the local filesystem with its own rights.

mounting as RO meens nobody can write. So no need to manage local access rights
mounting as RW meens you can write only if local access rights permits you.

fat32 dosen't have right access, so mounting as RW is ok
ntfs don't use the same mechanism as unix systemfiles. Mounting as RW should be ok too.
SolydX x32

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: New HDD, how to partition and have permissions after

Postby ScottQuier » 05 Mar 2014 15:35

Orbmiser wrote: You will have to reboot to have the fstab changes take effect.
Ummmm .... this is, also, incorrect ;)

Code: Select all

sudo mount -a
will cause Linux to remount all partitions indicated in the /etc/fstab file. No reboot necessary.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
Orbmiser
Posts: 829
Joined: 24 Aug 2013 22:58
Location: Portland,Oregon

Re: New HDD, how to partition and have permissions after

Postby Orbmiser » 05 Mar 2014 18:59

ScottQuier wrote:
Orbmiser wrote: You will have to reboot to have the fstab changes take effect.
Ummmm .... this is, also, incorrect ;)

Code: Select all

sudo mount -a
will cause Linux to remount all partitions indicated in the /etc/fstab file. No reboot necessary.
Sorry up past my bedtime and brain was on 2 neurons and forgot about sudo mount -a. :(

But was trying to point out someone new to linux shouldn't have to edit the fstab in the first place. As pointed out can be a minefield for someone new confusing,cryptic and easy to make a mess of things.
.
Portfolio
http://500px.com/Orbmiser
Flickr
http://www.flickr.com/photos/orb9220/

SolydK - Kernel 3.16-2-amd64 - KDE 4.14.1 Update Pack: 2014.10.15

User avatar
ilu
Posts: 2712
Joined: 09 Oct 2013 12:45

Re: New HDD, how to partition and have permissions after

Postby ilu » 05 Mar 2014 20:08

I'm a linux beginner and just installed a new WD 3 TB and I have no idea how to get it to automount with the correct rights without editing fstab.

So this is what I did:
1. Start gparted, write partition table and partitions the way I want them.
2. Start Terminal and find out UUIDs with sudo blkid
3. Create mountpoints whereever I want them with sudo mkdir
4. Open fstab with sudo mousepad /etc/fstab, copy an existing line and edit mountpoints and the UUIDs I found before, save.
5. sudo mount -a

Thanks to your suggestions I didn't need any reboots and it was a matter of 5 min. to get everything up and running.
But was trying to point out someone new to linux shouldn't have to edit the fstab in the first place. As pointed out can be a minefield for someone new confusing,cryptic and easy to make a mess of things.
You didn't point out a way to do that without editing fstab - except a KDE program which isn't available on SolydX.

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: New HDD, how to partition and have permissions after

Postby ScottQuier » 05 Mar 2014 21:24

Sweet!! So, now you can edit the OP title to mark this one solved, right?? :)
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
ilu
Posts: 2712
Joined: 09 Oct 2013 12:45

Re: New HDD, how to partition and have permissions after

Postby ilu » 05 Mar 2014 21:43

Ha :-), I did not start the thread, I just tried to help ... the thread starter got lost somewhere on the way...

My own problem here http://forums.solydxk.com/viewtopic.php ... 7e6a367430 sadly didn't get any attention :cry:

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: New HDD, how to partition and have permissions after

Postby ScottQuier » 05 Mar 2014 23:47

Oooops ;)
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
phazon1
Posts: 62
Joined: 19 Jan 2014 03:25
Contact:

Re: New HDD, how to partition and have permissions after

Postby phazon1 » 06 Mar 2014 00:45

Something occurred to me. I just wanted to make sure we are on the same page. I have no trouble "mounting" the storage drive. I double click on it, and it opens up, and if there were any files in it, I am guessing that I could open them. In fact, if I had opened it prior to running gparted, I would have to choose "unmount" to do anything with it, like delete it, or resize it etc.

So, it looked like most if not all of the advice above is for "mounting" it, when that is not the problem. It just won't let me save anything to it. Is this then, still the same description of tactics to get it where I want it to be?

User avatar
phazon1
Posts: 62
Joined: 19 Jan 2014 03:25
Contact:

Re: New HDD, how to partition and have permissions after

Postby phazon1 » 06 Mar 2014 00:53

ilu -

Your description is encouraging, but you seem to be assuming some things about my understanding of linux. I must be more of a beginner than you are.

You said...
1. Start gparted, write partition table and partitions the way I want them.
right off the bat, I don't know what "the way I want them" means. what might be "the way you want them"?
2. Start Terminal and find out UUIDs with sudo blkid
what is a "UUID" and what do I do with this information once gotten?
3. Create mountpoints whereever I want them with sudo mkdir
where is "where ever I want them"? give an example
4. Open fstab with sudo mousepad /etc/fstab, copy an existing line and edit mountpoints and the UUIDs I found before, save.
Plese explain what "copy an existing line and edit mountpoints" means, please give an example
5. sudo mount -a
This much I understood, but will this "take" and remain this way for the next boot up, or do you have to take all of these steps each time I am on the computer?

Also, there is a question that everyone seems to be glossing over here, why did I NOT have to do ANY of this stuff with the 60 gig drive? I just created partitions and off I went on my merry way, I had full access to the storage partition from every distro. WHY?

Sorry for my pathetic up-take, but this would not be a solved thread at this point. IMO

User avatar
Orbmiser
Posts: 829
Joined: 24 Aug 2013 22:58
Location: Portland,Oregon

Re: New HDD, how to partition and have permissions after

Postby Orbmiser » 06 Mar 2014 01:30

phazon1 wrote:
Also, there is a question that everyone seems to be glossing over here, why did I NOT have to do ANY of this stuff with the 60 gig drive? I just created partitions and off I went on my merry way, I had full access to the storage partition from every distro. WHY?

Sorry for my pathetic up-take, but this would not be a solved thread at this point. IMO
Nope wasn't glossing over here as that was the points I was trying to make.
I didn't have to edit fstab or do all these terminal commands hurdles everyone is pointing out.

As during install create the partitions you wish to use for linux. The others are already seen by linux and left untouched. Install Linux and boot up the fresh install open file manager and browse,copy,move and delete files on any mounted partition whether it's a Linux partition a Ntfs partition or external ntfs usb drives. Or you can set them to auto-mount on boot so manually mounting isn't even necessary.

I have never had any issues with over a dozen different distro's accessing,copying,moving and deleting files from my internal partitions ext4 or ntfs or external usb drives. And all where accessible booting into a new install.

Sorry may be dense here but not getting the need to edit fstab or additional term commands.
May just be Me? Not understanding the issue?
Portfolio
http://500px.com/Orbmiser
Flickr
http://www.flickr.com/photos/orb9220/

SolydK - Kernel 3.16-2-amd64 - KDE 4.14.1 Update Pack: 2014.10.15

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: New HDD, how to partition and have permissions after

Postby ScottQuier » 06 Mar 2014 01:50

Unless I miss something, if one wants a partition to automatically mount at boot, an entry must be made in fstab. If one is happy to mount it after boot, such an entry is not necessary. The only exception I can think of is a USB HDD ... If it is connected at boot it might automatically mount.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
Orbmiser
Posts: 829
Joined: 24 Aug 2013 22:58
Location: Portland,Oregon

Re: New HDD, how to partition and have permissions after

Postby Orbmiser » 06 Mar 2014 02:24

Well in KDE there is a gui settings way to have partitions automatically mount on boot (See my Image above).
Without the need to edit fstab. I've never had to edit it in any distro I have tried.

5 internal partitions 3 windows ntfs and 2 ext4 and two separate usb drives.
.
Portfolio
http://500px.com/Orbmiser
Flickr
http://www.flickr.com/photos/orb9220/

SolydK - Kernel 3.16-2-amd64 - KDE 4.14.1 Update Pack: 2014.10.15

User avatar
phazon1
Posts: 62
Joined: 19 Jan 2014 03:25
Contact:

Re: New HDD, how to partition and have permissions after

Postby phazon1 » 06 Mar 2014 03:13

Well, this just gets odd upon odd.

so, similar to Orbmiser, I had ZERO problems with the 60 gig. I just happily created what ever partitoins I wanted, installed several distors on seperate partitions, and was able to read, write, to the large "storage" partition.

Then, similar to what ScottQuier is indicating, this drive wants me to undertake some terminal work.

So, as much as I got this machine for learning, I capitulate. So, somewhere along the line, I picked up on the fact that I had to enter somethign in fstab.

I added

Code: Select all

/dev/sda12 /media/ralph/storage ext4 defaults 0 0
as the last line in fstab (first I right clicked on fstab and chose "open as root") and saved

then ran

Code: Select all

sudo mount -a
then ran

Code: Select all

sudo chmod 777 /media/ralph/storage
and presto! I am able to read and write with this partition.

NOW.... how do I keep it this way on the next boot so I don't have to do this from the terminal every time I boot up?

Thanks again to all

User avatar
phazon1
Posts: 62
Joined: 19 Jan 2014 03:25
Contact:

Re: New HDD, how to partition and have permissions after

Postby phazon1 » 06 Mar 2014 03:34

um...actually, after re-boot, I still have access to it. I guess what ever I did at the terminal during the last session "stuck".

I might mark this as solved...

User avatar
ilu
Posts: 2712
Joined: 09 Oct 2013 12:45

Re: New HDD, how to partition and have permissions after<SOL

Postby ilu » 06 Mar 2014 08:55

Phazon, even if your problem is solved I will come back to your questions later to help you understand.


Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 20 guests