0

My SSD has Windows installed and my HDD has Ubuntu. When I first installed Ubuntu, the files from the Windows SSD were always available automatically. Gradually I would find more and more that the files on the SSD would be unavailable, but I could fix this by restarting the computer. Soon this stopped working too, and some articles said that this was because Windows didn't shut down properly or was hibernated rather than shut down, so if restarting Ubuntu didn't make the SSD files available, I would reboot into Windows, shut down properly, and restart reboot into Ubuntu.

But now it's become so bad that I can't access the SSD files from Ubuntu no matter what I try.

What is a safe way to make the files of my Windows SSD accessible to my Ubuntu HDD in the same computer, by default?

I've searched for similar questions.

I'm using:

  • Ubuntu 16.04.2 LTS
  • Windows 10
8
  • 2
    Have you tried disabling Windows' "Fast Startup" Feature? Also, which versions of Windows and Ubuntu are you using? Apr 18, 2017 at 19:42
  • 1
    You should avoid that anyway. Windows doesn't like it at all. If you need to access user files from both OSes then the best practice is to have a separated NFTS data partition.
    – user589808
    Apr 18, 2017 at 20:44
  • I agree that a separate data partition is the best approach; however, if the shared files don't need to be too big, I recommend FAT rather than NTFS. The reason is that Linux's tools for repairing FAT are better than Linux's tools for repairing NTFS, so you'll have some possibility of fixing shared-partition problems in Linux if FAT is used. OTOH, FAT is limited to files of 2 GiB and smaller, which can be unacceptably small if you want to share big multimedia files, DVD images, etc.
    – Rod Smith
    Apr 18, 2017 at 20:55
  • @CelticWarrior. When you say "Windows doesn't like it at all", do you mean Philipp Ludwig's suggestion, or the idea of having Ubuntu installed on my HDD? Apr 18, 2017 at 22:30
  • @CelticWarrior: Can you please explain to me what you mean by a "separated NFTS data paratition" ? Nothing on my SSD is Ubuntu and nothing on my HDD is Windows. Are you suggesting that I install Ubuntu on the SSD (just on a separate partition)? Is it not safer to have the two OS's on different physical drives? A friend recently wiped out her entire Windows partition from Ubuntu somehow. Apr 18, 2017 at 22:31

2 Answers 2

0

This answer doesn't directly address the main point of the question, but rather, a question in a comment; specifically:

Can you please explain to me what you mean by a "separated NFTS data paratition" ? Nothing on my SSD is Ubuntu and nothing on my HDD is Windows. Are you suggesting that I install Ubuntu on the SSD (just on a separate partition)? Is it not safer to have the two OS's on different physical drives? A friend recently wiped out her entire Windows partition from Ubuntu somehow.

Some users like to isolate two OSes in a dual-boot environment, as you've done, each to its own hard disk. The idea is that by doing so, one OS is less likely to cause damage to the other; however, in your case, you're accessing the main Windows installation (the C: drive in Windows) from Ubuntu. This means that Ubuntu can modify that disk; indeed, the very act of mounting the Windows disk modifies it (in a small way). This access isn't just access to the files themselves, but to the data structures that define what the files are. This is particularly problematic for NTFS, because that's a proprietary filesystem for which a public specification does not exist, AFAIK; the Linux drivers are based on reverse engineering. In practice, the Linux drivers work pretty well, but there's always a chance that they're doing something subtly wrong, which could trash the entire filesystem.

There's also the fact that Linux and Windows have very different security models. Thus, files that Windows protects from damage via its security system are freely available to ordinary users in Ubuntu; you can easily, and even accidentally, delete critical drivers, configuration files, etc., from Ubuntu.

Thus, putting the OS installations on separate physical disks does very little to protect them from one another unless you physically swap disks in order to boot each OS -- and that poses its own risks. (A static charge could fry a disk when you swap them out, for instance.) Physically swapping disks will also make it impossible to share data between OSes, except via a third disk, network share, etc. Where putting the OSes on separate disks might help (a little) is in the initial setup; you're less likely to accidentally wipe OS A when installing OS B if each one has its own disk and you therefore don't need to resize OS A's partitions.

If you don't need to share access to the same files, you can restrict each OS's access to the others' files, no matter where each OS is installed. Restricting Windows' access to Ubuntu is easy; Windows lacks support for Linux filesystems, so Windows won't access Ubuntu partitions unless you explicitly install Linux filesystem drivers in Windows. (An exception is if you set the wrong partition type codes, as was once common on GPT disks; but that's unlikely with any modern installation. See this page of mine if you think you might be running into this problem.) To restrict Ubuntu's access to Windows, I recommend creating an /etc/fstab entry for the Windows C: partition that does not automatically mount it, or that mounts it read-only at most. See here for more on how to do this.

If you want to share data between OSes, then, it's best to create a separate partition for that purpose. This will enable you to read and write to that partition from both OSes without endangering the main OSes' files. You can either create a separate /etc/fstab entry for each partition (the Windows C: partition and the shared-data partition) or rely on auto-mounting to access the shared-data partition.

In your two-disk setup, it doesn't matter, from a logical perspective, which disk holds the shared-data partition. You should make that decision based on available space and disk speed. How much data you put on the shared-data partition is also an open question. It might be a small partition in which you store just a handful of files; or you might choose to put most of your user data on the shared partition.

A big caveat to this is that converting from your existing setup to one with a shared data partition will require resizing at least one other partition. You might also end up wanting or needing to move at least one other partition. These operations can be time-consuming and carry some risk. Thus, if you can fix the main problem of your question, you might prefer to just leave your partition layout as-is for a while and keep this in mind for your next installation. OTOH, if you want to rearrange your system in a major way, this can be another reason to do so sooner rather than later.

0

I faced a similar problem and landed here 6 years after the question was asked. For whoever is reading this, this is how I solved it.

I have installed my Ubuntu on an external SSD and I have my Windows installed on an internal SSD and I also have an HDD. At first when using my Ubuntu, I could access the HDD without any problems. After several Ubuntu updates and also accidents which resulted in installing ubuntu-desktop (and trying to fix boot problems without deleting everything), I couldn't access the HDD from Ubuntu.

I faced this error:

Error mounting /dev/sda2 at /media/path/... : wrong fs type, bad option,
bad superblock on /dev/sda2, missing codepage or helper program
or other error

The solution for me was to use sudo mount. For example:

sudo mount /dev/sda1 ~/mountpoint

You can create any directory you want and then mount the partition to it, however this is not a primary solution. In order to primarily mount the partition, you have to edit the fstab file. You can check this link: Mounting Drives Permanently using fstab about how to do it.

You must log in to answer this question.

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