2

I'm quite new on Ubuntu and I'm still learning how Linux works.

My question is simple. But first, I'll give you my context.

I just got a new laptop and added Ubuntu 18.04 LTS to it, alongside Windows 10. I also made a third partition in NTFS, so both OS can share files to each other as needed. I correctly mounted it in my Ubuntu, and I can access it with Windows 10 as well.

However, I cannot see files in Windows 10 I made with Ubuntu. Same thing when I boot with Ubuntu, I cannot see files I created with Windows 10.

The files I created with both OS are .txt files, just to test my shared partition.

How can I see my Ubuntu files on my shared partition when I'm using Windows 10 ? And how can I see my Windows 10 files with Ubuntu in the same shared partition ?

Edit (answer to Mr Shunz):

Output of $ sudo fdisk -l :

/dev/loop0: 14.5 MiB, 15208448 bytes, 29704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 3.7 MiB, 3878912 bytes, 7576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 34.6 MiB, 36216832 bytes, 70736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 456.4 MiB, 478527488 bytes, 934624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 184.8 MiB, 193806336 bytes, 378528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 13 MiB, 13619200 bytes, 26600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 140.7 MiB, 147496960 bytes, 288080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 2.3 MiB, 2355200 bytes, 4600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E9EA0CA7-17E8-4BDB-9892-D6D1E154E090

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     534527    532480   260M EFI System
/dev/nvme0n1p2    534528     567295     32768    16M Microsoft reserved
/dev/nvme0n1p3    567296  499080587 498513292 237.7G Microsoft basic data
/dev/nvme0n1p4 793366528  998164479 204797952  97.7G Microsoft basic data
/dev/nvme0n1p5 998166528 1000214527   2048000  1000M Windows recovery environmen
/dev/nvme0n1p6 499081216  793366527 294285312 140.3G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/loop8: 91 MiB, 95408128 bytes, 186344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 104.2 MiB, 109252608 bytes, 213384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 3.7 MiB, 3854336 bytes, 7528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 53.7 MiB, 56315904 bytes, 109992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Output of $ ls -laR /dev/nvme0n1p4 :

brw-rw---- 1 root disk 259, 4 May 10 18:18 /dev/nvme0n1p4

SOLUTION FOUND : I have found what the issue was. Wasn't easy to find but I finally did and it solved my problem. See it here if you have the same problem: Read-only partition, dual boot WIn10

5
  • 1
    Hello and welcome to AskUbuntu! Can you please edit your question and post the output (from your Ubuntu OS) of sudo fdisk -l and ls -laR YOUR_SHARED_MOUNT_POINT? May 9, 2019 at 13:44
  • 2
    I suspect it's not the same partition...
    – user880592
    May 9, 2019 at 16:17
  • 2
    Agree with @GabrielaGarcia :)
    – swift
    May 9, 2019 at 16:57
  • Is Windows fast start up off? askubuntu.com/questions/843153/…
    – oldfred
    May 9, 2019 at 18:57
  • @MrShunz: It's done. :) By the way, I just saw (on Ubuntu) the file.txt I made with Windows 10. It's on the partition but I cannot edit it. I cannot even create a new file alongside it. Even as superuser. The file system seems to be Read-Only. I checked the permissions and I'm the owner of both of them. The partition repository and file.txt made on Windows 10. Do someone know how to fix it? To make me able to write on the partition with Ubuntu? Thank you everyone for your help by the way. I didn't expect to get answers so fast. :)
    – Bravo2bad
    May 10, 2019 at 17:09

3 Answers 3

1

Questioner @Bravo2bad, you have your sample file.txt file lodged into NTFS partitioned disk in Windows 10. Before accessing that file in read-write mode from Ubuntu, you should mark the partition as rw.

Normally, every one will attempt to make an entry in /etc/fstab directly which is considered as normal practice. Nevertheless, for a change, let us do it through GUI to make an entry in to /etc/fstab file and in this process make this GUI method popular!

Open up bash and Search for Disks as shown below:

enter image description here

Click Disks to open up the Software and you select the NTFS partitioned disk of interest. Suppose your target disk is 1 TB having three partitions all with NTFS filesystems.

enter image description here

Assume that it is Warehouse Partition to be made as read-write.

Click the cog icon shown in small redbox and soon after you will face a drop-down menu. Click Edit Mount Options... which will take you to another window where you should enter ,rw as shown in the below screenshot:

enter image description here

Press OK and exit.

Next, create a symlink in /mnt directory as follows:

$ cd /mnt
$ sudo ln -s F6A4656DA46530F3 Warehouse

To issue the following command to verify that the symlink Warehouse was created correctly:

$ ls -l /mnt
drwxrwxrwx 1 root root 4096 May  8 02:31 F6A4656DA46530F3
lrwxrwxrwx 1 root root   16 May  6 11:22 Warehouse -> F6A4656DA46530F3

Now run the following command to make sure that an entry has been made in /etc/fstab file successfully by GUI method:

$ cat /etc/fstab | grep F6A4656DA46530F3
/dev/disk/by-uuid/F6A4656DA46530F3 /mnt/F6A4656DA46530F3 auto nosuid,nodev,nofail,x-gvfs-show,rw 0 0

Now you can access or create any file on this partition from Ubuntu. The created files from Ubuntu on this NTFS partition can be accessed from Windows 10 too.

1
  • Even if this is the accepted answer, but adding rw to the fstab options doesn't change anything, rw is default, see man fstab.
    – mook765
    May 24, 2019 at 18:41
0

List your current setup

Your setup is similar to mine:

$ lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL |egrep -v "^loop"

NAME         FSTYPE LABEL            MOUNTPOINT   SIZE MODEL
nvme0n1                                           477G Samsung SSD 960 PRO 512GB               
├─nvme0n1p9  swap                    [SWAP]       7.9G 
├─nvme0n1p7  ext4   Old_Ubuntu_16.04 /mnt/old    23.1G 
├─nvme0n1p5  ntfs                                 859M 
├─nvme0n1p3                                        16M 
├─nvme0n1p1  ntfs                                 450M 
├─nvme0n1p8  ntfs   Shared_WSL+Linux /mnt/e         9G 
├─nvme0n1p10 ext4   Ubuntu_18.04     /mnt/clone  27.2G 
├─nvme0n1p6  ext4   New_Ubuntu_16.04 /           45.1G 
├─nvme0n1p4  ntfs   NVMe_Win10       /mnt/c     363.2G 
└─nvme0n1p2  vfat                    /boot/efi     99M 
sr0                                              1024M DVD+/-RW DW316  
sda                                             931.5G HGST HTS721010A9
├─sda4       ntfs   WINRETOOLS                    450M 
├─sda2                                            128M 
├─sda5       ntfs   Image                        11.4G 
├─sda3       ntfs   HGST_Win10       /mnt/d       919G 
└─sda1       vfat   ESP                           500M 

Notice the Ubuntu+Windows 10 shared partition:

nvme0n1p8  ntfs   Shared_WSL+Linux /mnt/e         9G 

Get your UUID

To get your UUID use:

$ lsblk -o NAME,LABEL,TYPE,UUID |egrep -v "^loop"

NAME         LABEL            TYPE UUID
nvme0n1                       disk 
├─nvme0n1p9                   part b4512bc6-0ec8-4b17-9edd-88db0f031332
├─nvme0n1p7  Old_Ubuntu_16.04 part f3f8e7bc-b337-4194-88b8-3a513f6be55b
├─nvme0n1p5                   part C0C65F23C65F18CC
├─nvme0n1p3                   part 
├─nvme0n1p1                   part 7040FA5240FA1F12
├─nvme0n1p8  Shared_WSL+Linux part F2C2ACE4C2ACADF3
├─nvme0n1p10 Ubuntu_18.04     part 8337e8c8-6461-44f2-b5fe-dfd5b6b05883
├─nvme0n1p6  New_Ubuntu_16.04 part b40b3925-70ef-447f-923e-1b05467c00e7
├─nvme0n1p4  NVMe_Win10       part 5CCC5867CC583E08
└─nvme0n1p2                   part D656-F2A8
sr0                           rom  
sda                           disk 
├─sda4       WINRETOOLS       part 221A463E1A460F6B
├─sda2                        part 
├─sda5       Image            part 38D4470BD446CB38
├─sda3       HGST_Win10       part F03ED48E3ED44F6A
└─sda1       ESP              part 9478-B6E2

Notice my UUID, you need to get yours for your shared partition:

├─nvme0n1p8  Shared_WSL+Linux part F2C2ACE4C2ACADF3

Change your /etc/fstab file in Ubuntu

Your Ubuntu+Windows 10 shared partition needs to be setup in Ubuntu's /etc/fstab file so it mounts properly with write permissions:

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p6 during installation
UUID=b40b3925-70ef-447f-923e-1b05467c00e7 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=D656-F2A8  /boot/efi       vfat    umask=0077      0       1
# Windows drives C, D & E
UUID=F2C2ACE4C2ACADF3 /mnt/e    ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show   0       0
UUID=F03ED48E3ED44F6A /mnt/d    ntfs-3g permissions,locale=en_US.utf8               0       0
UUID=5CCC5867CC583E08 /mnt/c    ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show   0       0
# Broken Ubuntu 16.04
UUID=f3f8e7bc-b337-4194-88b8-3a513f6be55b /mnt/old        ext4    x-gvfs-show       0       0
# Clone Ubuntu 18.04
UUID=8337e8c8-6461-44f2-b5fe-dfd5b6b05883 /mnt/clone      ext4    x-gvfs-show       0       0
# swap was on /dev/nvme0n1p9 during installation
UUID=b4512bc6-0ec8-4b17-9edd-88db0f031332 none            swap    sw                0       0

Notice the line:

UUID=F2C2ACE4C2ACADF3 /mnt/e    ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show   0       0
  • Add (or change) this entry from my UUID to your UUID
  • /mnt/e is the artificial location given to Ubuntu when my partition is mounted. You might be more comfortable with /mnt/d if "D:\" is the name Windows 10 gives your shared partition.
  • Copy the rest of the line as mine is and hopefully it works ok like mine does.
1
  • It works finally. I just did a full update and upgrade. Ubuntu asked to reboot by the way and now I can finally access and write on my partition with both OS. Maybe I did something wrong before. Anyway, thank you very much @Marmayogi, and you all for your help. I'm already fan of Ubuntu and I barely use Windows now.
    – Bravo2bad
    May 15, 2019 at 17:21
0

@Marmayogi Thank you for your answer. You explain me how to do proceed quite well.

But I followed your explainations step by step and here are my results:

512 BG Disk window Mount Options sub-window

Output for $ sudo ln -s F8D42178D4213A70 SharedPartition and ls -l /mnt/ :

total 4
drwxrwxrwx 1 root root 4096 May  9 20:17 F8D42178D4213A70
lrwxrwxrwx 1 root root   16 May 12 22:14 SharedPartition -> F8D42178D4213A70

Output for $ cat /etc/fstab | grep F8D42178D4213A70 :

/dev/disk/by-uuid/F8D42178D4213A70 /mnt/F8D42178D4213A70 auto nosuid,nodev,nofail,x-gvfs-show,rw 0 0

Then I tried to create a new file.txt on the partition.

Output for $ touch /mnt/SharedPartition/fileUbuntu.txt :

touch: cannot touch '/mnt/SharedPartition/fileUbuntu.txt': Read-only file system

So, this didn't solve my issue but thanks for trying anyway. :)

Update : I have found what the issue was. Wasn't easy to find but I finally did and it solved my problem. See it here if you have the same problem: Read-only partition, dual boot WIn10

1
  • Be forewarned that this isn't an answer and the information should have been edited into your question. Eventually this answer will be deleted... May 12, 2019 at 22:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .