0

I have a dual boot with one ubuntu distro on each (18 and 20). Each ubuntu boots on a different partition, and are not related in any way. Now I have created an empty small ext4 partition outside of the 2 distros. I would like to share this partition between my distros. What is the best way to do it?

Here is what I tried:

mount the shared disk onto each distro. However, the folder seems to be locked, as I cannot create a folder. I tried unlocking using sudo chmod 777 to unlock it from Ubuntu18. Then I log onto my Ubuntu20 and do the same. However, if I log back onto Ubuntu18, it seems to be locked. This is understandable since chmod provides access to one user alone.

  • By Ubuntu 18 & Ubuntu 20 (no such release) do you mean Ubuntu Core 18 & Ubuntu Core 20? as the year based releases are different products to the far more common year.month products, ie. 18 is not 18.04, and 20 is not 20.04 (the 18 & 20 represent snap only products, where as the 18.04 & 20.04 signify products that have aren't limited to confined apps & can use deb packages as well). Provide specific details of your releases, what file-system is involved & how it's mounted (ie. your /etc/fstab entry or other..) – guiverc Jan 21 '22 at 05:46
  • I don't see how version affects the answer to this question at all. – user10489 Jan 21 '22 at 06:08
  • Are you trying to run both distros at the same time or are you rebooting in between? What "folder" is locked and what command are you using to determine this is a problem? Does your user in each operating system have the same or different user IDs? – user10489 Jan 21 '22 at 06:08
  • @user10489 Ubuntu Core 18 & 20 both use snap apps which run confined and can only read specific directories on the real root file-system (with apps seeing a fake a squashfs only file-system instead) thus it's different to 18.04 & 20.04 systems where most apps can read the real file-system & aren't restricted to running confined. – guiverc Jan 21 '22 at 06:15
  • I am not running both distros at the same time. They are 18.04 and 20.04 Ubuntu desktops (apologies for being fairly vague, did not think this was important). How do I check if they have the same user ID? I presume they would be different? Also, I am willing to mount it any way. All I have done so far was format an unallocated space as an ex4 file system, that is all. I can clear the contents easily, they do not have any data yet. – OlorinIstari Jan 21 '22 at 07:29
  • Please correct your question then, as Ubuntu uses the year format (18 & 20) to differentiate specialist products/releases that differ to the far more common 18.04 & 20.04; there are key differences between them that can make it more complex in the area you're asking about due to confinement that exists in 18 & 20 (but not 18.04 & 20.04). I would mount via fstab (file-system table) entries which should mean you have NO issues at all (I do it myself! ; it's a little more complex on one box due to partition encryption, but without encryption it's easy which I use on other boxes) – guiverc Jan 21 '22 at 07:35
  • If your user is the first user on both systems, it's probably user id 1000 on both systems. You can check in /etc/passwd or with the id command. Also, please add to your question a better description of what "locked" means to you, including the error or other evidence that leads you to this conclusion. – user10489 Jan 21 '22 at 12:32
  • 1
    I have multiple Ubuntu installs and keep /home inside / as it is tiny with only mostly hidden user settings. And then all data folders normally in /home are in a data partition which I mount in every install. I had so many installs over time, I ended up scripting the fstab edit as UUID is always the same. https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting & https://askubuntu.com/questions/1058756/installing-all-applications-on-a-ssd-disk-and-putting-all-files-on-hdd-disk – oldfred Jan 21 '22 at 19:02

0 Answers0