Logic of Mount using Gparted

I created two new partitions. When I boot the system one partition (Mint01) is mounted r/w. The other partition (Mint02) is mounted r/o.
Mint01 was created using GUI ‘Disks’ and was formatted ext4.
Mint02 area was in the extended area of the disk and could not be seem by Disks. Mint02 was created using Gparted and formatted to ext4.
So using Chmod & Chown, I pretty sure I can correct this and have Mint02 mounted r/w when the system is booted.
? But why? Why is Mint02 mounted r/o?

1 Like

what’s on the partitions? are they filesystems, data or blank?

1 Like

You might find this link can help : https://forums.linuxmint.com/viewtopic.php?f=50&t=293973

New partitions. The only thing I did to them was format them to ext4. they are blank.

that is what i figured. i just wanted to make sure :slight_smile: i created a few partitions with disks and gparted (on my ssd and a usb) as well in regards to this question and our discussion earlier. looks like disks (bodhi doesn’t have a disks utility. luckily i spent part of today installing mint on a different partition) creates partitions with the user as owner and 700 permissions:

drwx------ 4 cordx cordx 4096 Jun 29 23:17 disks

whereas gparted makes them with root as owner and 744 permissions:

drwxr-xr-x 3 root root 4096 Jun 29 23:18 gpart

they both mount rw in mtab

/disks ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/gpart ext4 rw,nosuid,nodev,relatime,data=ordered 0 0

1 Like

/etc/fstab is a list of filesystems to be mounted at boot time. If you want your Windows or file-storage partitions mounted once your computer boots, you’ll need to put appropriate entries into /etc/fstab .

/etc/mtab is a list of currently mounted filesystems. If you have a disk connected but not mounted, it won’t show up in the /etc/mtab file. Once you mount it, it will show up there.

Note also, that with systemd (to which Ubuntu switched beginning from 15.04 release) it is possible to declare filesystems that need to be mounted at boot via *.mount files. See James Oguya’s tutorial on the topic.

For more info, read mount manual.

3 Likes

Yes, after they were mounted, I saw them listed r/w in mtab. Are you saying all I have to do is a chown on the partition to get it r/w to me?

But I’m still don’t understand.
Mint01
easyt50@8300 /media/easyt50/Mint01 $ ls -ls
total 16
16 drwx------ 2 root root 16384 Jun 29 23:28 lost+found
Mint02
easyt50@8300 /media/easyt50/Mint02 $ ls -ls
total 16
16 drwx------ 2 root root 16384 Jun 29 23:30 lost+found
They look the same to me. (?) But I can r/w to Mint01 and not Mint02.

Yes, I read that you can do that, but I do not have to. I don’t know about other distro, but in Mint when I click on the Home folder, my Windows disks and my new partitions are listed on the left under Devices in the Nemo window… I can mount and unmount those partitions without having to edit fstab just by clicking on them.

1 Like

i think that is one of the options. when i chowned the /gpart partition that i created with gparted, the permissions stayed 755 (drwxr-xr-x) and i was able to write to it. the other option i can think of is to chmod them to 777. that’s what i did with my externals so i could have access to them in addition to timeshift and clonezilla.

this command from this location lists the properties of the files inside the Mint01 directory. if you want to see the properties of the directory itself, you need to cd .. to go up one level.

1 Like

Ahhh, yes. Beginner mistake.
20 drwxrwxrwx 1 easyt50 easyt50 20480 Jun 30 00:18 Data
4 drwxr-xr-x 2 root root 4096 Apr 27 13:34 E51
4 drwx------ 4 easyt50 easyt50 4096 Jun 30 21:55 Mint01
4 drwxr-xr-x 3 root root 4096 Jun 29 23:30 Mint02
4 drwxr-xr-x 2 root root 4096 Apr 30 13:17 ‘WD Unlocker’
4 drwxrwxrwx 1 easyt50 easyt50 4096 Oct 22 2018 Z240
Mint02 is owned by root.
So is that the answer? Gparted is running as root so any partition work might (will for new partition) make the partition owned by root.

1 Like

the answer to this particular question is beyond the edge of anything i have read so far unfortunately :slight_smile: if i recall correctly disks also asked for sudo authorization to write to my ssd so i’m not sure it has to deal with what mode the partition creator is in as much as that is just how it does what it does and permissions are up to the end user to figure out/adjust.

to perhaps try and get a better idea of the inner workings, i started looking at how parted works but haven’t got the hang of how to use it yet.

When you mount a partition like
sudo mount /dev/sdc /mnt/Mint2
Then you need a folder already created at
/mnt/Mint2
which means, if you created the folder as root user, the folder will have corresponding ownership. Simple as that.

1 Like

one of the things that had me scratching my head for a while was the fact that i could write to my mint and ubuntu mate partitions from bodhi without sudo even though both are mounted the same as gpart in mtab (ext4 rw,nosuid,nodev,relatime,data=ordered 0 0) and have the same 755 permissions. it took me a little while to figure out that i could only specifically write to my home folder (not / or /home themselves) which has the same username or folders like /tmp with 777 permissions.

so you don’t necessarily have to chown the whole partition if you want write access. as long as you create a directory with sudo and either give that directory 777 permissions or chown it to your user.

3 Likes

It was a new partition created by gparted. No folders, no data.
I did not do the mount. The system mounted it for me when I clicked on the name Mint02.
Mint02 was owned by root. I could not r/w to the new partition until I did a chown.

On the other hand, Mint01 was created by ‘disks’ and was owned by me.

Your name categorizes this issue quite correctly.