[SOLVED] Sharing a data partion between OS in a multi-boot system
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sharing a data partion between OS in a multi-boot system
In this computer with Windows 8, Debian 9 and Debian 10, I created a FAT32 data partition with the Gnome Disk utility, set the mount points, set the mount options to "defaults" and mount at startup.
The partition is recognize at startup by all 3 operating systems.
Windows 8 can read and write files correctly.
Both Debian 9 an 10 can read but cannot write files (unable to create file).
You are probably missing permissions. FAT doesn't have the notion of file ownership. By default, when you mount a FAT filesystem on Linux, all files are owned by whoever mounted it, which is often root. You can, however, provide mount options that give files a different owner. I believe it's also possible to change files' default permissions by mount options.
As which user are you attempting to write files? What are the precise error messages? What are the filesystem's mount options on Debian?
Last edited by berndbausch; 01-07-2021 at 05:26 PM.
Reason: added explanation
berndbausch,
using GNOME Disk utility the ownership of the mounted partition is root:root by default for a FAT32 or NTFS file system, and changing the ownership is not possible:
"chown <user> /mnt/SHDATA" gives the error "chown: changing ownership of 'SHDATA': Operation not permitted"
However if the partition is formatted as ext4, the default ownership is <user>:<user>.
See below the partition layout and the fstab.
What I really would like to have is a partition that behaves like an external USB drive. Is it at all possible?
Brains,
the initial user is also the sole user. The options you suggested
"defaults,windows_names,uid=1000,gid=1000,umask=022" don't fix it, and at reboot the system is forced into recovery mode with the error message that the option "windows_names" is not recognized. Typo error?
windows_names is a ntfs-3g (NTFS) mount option and does not work for FAT32. What happens when you try to manually mount the filesystem. Must be root or use sudo if enabled.
Code:
mount -o uid=1000,gid=1000,umask=022 /dev/sda12 /mnt/SHDATA
I have an ntfs partition I use for data so I don't run into the file size limit of fat32.
This is what is in my fstab and the user writes to it with out any issues from linux and windows
Code:
UUID=4A080DEC667A53DC /data ntfs-3g defaults 0 0
It may be because you don't have the file sysem type in the fstab.
Last edited by colorpurple21859; 01-08-2021 at 08:10 PM.
michaelk #8,
your "mount" suggestion does change the ownership and the files can be read and written, but at restart the ownership return automatically to root. All the various attempts at changing the mount options with the disk utility have been unsuccessful. Could it be that the utility forces the ownership to root because the size of the partition (10GB) is larger that the maximum allowed file size (4GB) for a FAT32 format?
I ended up reformatting the partition as NTFS and using the mount options suggested by Brains #3. The easy way is to use the disk utility. Below are the screenshots for the mount options, Debian 9 and Debian 10 respectively.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.