0

I have migrated from Windows to Ubuntu very recently. In Windows I had 3 drives and I am using the same here. I have installed my OS in one. I can't read/write or remove files/directories from either of the other two drives.

root@vishnu-desktop:~# sudo fdisk -l
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa3e0317f
Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048     206847     204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2           206848  314572799  314365952 149.9G 83 Linux
/dev/sda3        314572800 1363148799 1048576000   500G  7 HPFS/NTFS/exFAT
/dev/sda4       1363148800 3907026943 2543878144   1.2T  7 HPFS/NTFS/exFAT

In the above /dev/sda2 is where I have installed Ubuntu.

In /dev/sda3 and /dev/sda4 I am unable to do anything.

Zanna
  • 70,465
  • do you have duel boot machine? –  Jun 04 '17 at 10:06
  • Even when you have ntfs-3g installed, there might be problems due to permissions. You can fix the permissions problems, if you mount with a command line (run in a terminal window). See the following link, https://askubuntu.com/questions/895733/copying-files-to-a-usb-drive/895782#895782 – sudodus Jun 04 '17 at 10:16
  • why do you want to use NTFS for these partitions? It seems like you are using a single boot system. – Zanna Jun 04 '17 at 10:53
  • @Zanna: How did you reach that conclusion. There are 3 FAT or NTFS partitions on that drive that could hold a Windows installation. – David Foerster Jun 04 '17 at 12:34
  • Could you please add a little more detail? What exactly did you do, what did you want to achieve and what happened instead? Did you encounter any warning or error messages? Please reproduce them in their entirety in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. (see How do I ask a good question?) – David Foerster Jun 04 '17 at 12:34
  • @DavidFoerster Obviously I'm assuming, but it's the way the drive setup was spoken about "migrated from Windows to Ubuntu" – Zanna Jun 04 '17 at 12:39
  • @David : Yes. Since, i have migrated from windows it is the way that is been setup. Now i can't remove/rename/copy/ any thing from one drive to another. Below is the error i am getting.

    FYI... I have tried this as SUDO user.

    vishnu@vishnu-desktop:~$ sudo -i root@vishnu-desktop:~# cp /media/vishnu/DATA/Turbo\ C++\ 3.2.2.0 Turbo C++ 3.2.2.0/ Turbo C++ 3.2.2.0.zip
    root@vishnu-desktop:~# cp "/media/vishnu/DATA/Turbo C++ 3.2.2.0.zip" "/media/vishnu/LAB" cp: cannot create regular file '/media/vishnu/LAB/Turbo C++ 3.2.2.0.zip': Read-only file system

    – Vishnuvardhan Ch Jun 04 '17 at 14:17
  • 1
    It seems you have mounted the partition read-only. Please unmount it and mount it read-write (should be possible with the ntfs driver, that you have installed). – sudodus Jun 04 '17 at 14:33
  • 1
    Could you please [edit] your post, when you want to add information? Especially file or program output listings (with the help of the {} button in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall it’s best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks. – David Foerster Jun 04 '17 at 14:45
  • @sudodus: I guess i am a bit closure to the problem now. When it tried to remount it it says below.

    root@vishnu-desktop:~# mount -o rw /dev/sda3 /dev/sda3 The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Falling back to read-only mount because the NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting.) root@vishnu-desktop:~#

    This is not a dual boot system. I have completely formated the drive where Windows OS is installed. So, can any one suggested me on what to do now?

    – Vishnuvardhan Ch Jun 04 '17 at 14:54
  • After you formated the partitions, that 'belonged to Windows' (formatted in Ubuntu with a linux tool, for example gparted), they should be clean. If you used Windows, and Windows was hibernated or 'shut down for fast restart', you might still have the same problem. So try again, and you will find if the linux mount command will let you mount the partitions with read and write access. The mount command may bark, but it does not bite ;-) – sudodus Jun 04 '17 at 16:53

1 Answers1

-1

It seems you have mounted the partition read-only. Please unmount it and mount it read-write (should be possible with the ntfs-3g driver, that you have installed).

  • Unmount

    sudo umount /dev/sda3 /dev/sda4
    
  • Create mountpoints (only once)

    sudo mkdir -p /mnt/sda3
    sudo mkdir -p /mnt/sda4
    
  • Mount the partitions

    sudo mount -o rw,users,umask=022 /dev/sda3 /mnt/sda3
    sudo mount -o rw,users,umask=022 /dev/sda4 /mnt/sda4
    
  • Now you should have read and write access. Change directory to /mnt/sda3 and /mnt/sda4 and try to write something to the partition(s).

  • See also this link,

    askubuntu.com/questions/886701/how-do-i-get-permission-to-edit-in-my-usb/886735#886735

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • 2
    The partition may be mounted read-only as fall-back because of hibernation/fast-boot. In that case mount -o rw won't work and result in an error message. – David Foerster Jun 04 '17 at 14:46
  • @DavidFoerster, This is correct. – sudodus Jun 04 '17 at 14:49
  • @VishnuvardhanCh, The way to fix it is to boot into Windows and reboot instead of shutdown (or turn off hibernate/fast boot in Windows). – sudodus Jun 04 '17 at 14:50
  • I'd rather wait for OP to tell us how they mounted the NTFS partition and investigate potential errors before I give a recommendation. – David Foerster Jun 04 '17 at 14:55
  • This doesn't solve my issue. – Owl Aug 16 '19 at 16:28
  • @Owl, I think this method solved the problem of the original poster, because the answer was accepted. I think your issue is different. I suggest that you create a new question and describe your issue with as many details as possible. Then it will be possible for many people to suggest a solution that solves your issue. – sudodus Aug 16 '19 at 19:11