2

I've installed dual boot Windows 10 and Linux Ubuntu, each on it's own SSD drive; two physically separate SSD discs.

When I log into Ubuntu, in the file explorer, I still can mount and access the Windows drive. I'd like to prevent this, to disable any chance of Linux modifying any Windows drive files. How can I achieve that?

Danijel
  • 431
  • 2
    You can control whether or not it mounts automatically using /etc/fstab but it seems like you're asking if you can make Ubuntu not realize that the drive exists. The only way I know how to do that is to physically disconnect the disk. But this should not be necessary. Ubuntu won't alter anything on an unrelated disk unless you tell it to – Nmath Nov 12 '20 at 16:59
  • @Nmath OK. I'm being a bit paranoid here, but better safe than sorry. – Danijel Nov 12 '20 at 19:02
  • Take a look at this question and it's answers. – mook765 Jun 18 '22 at 17:23

3 Answers3

2

The only way to do this is to physically disconnect the Windows disk at the system. There's no real way to prohibit accessing the Windows drive if the system can see it.

The other thing you could do is just not click the drive and mount it - Linux won't automount the drive unless you've configured it to, and without the drive being mounted Linux can't change the Windows files.

Thomas Ward
  • 74,764
  • 1
    I've been using the setup for some year and a half now, and I can confirm that "just not click the drive and mount it" works pretty well. I never mount the drive, so my paranoia is suppressed. – Danijel Jun 20 '22 at 07:24
0

There is actually a way to do that. You can edit the fstab in the /etc directory .

First of all you must open the terminal. Then you must type 'sudo blkid'. This will list all the UUIDs and other details of the disks available. Now you gotta note these following for the windows partition:

  1. UUID
  2. PARTUUID
  3. DISK LABEL
  4. PARTLABEL
  5. THE DEVICE/PARTITION NAME ( /dev/sdXY )

The requirements actually depends on the name your fstab is written in.

A general fstab entry follows :

fstab pic The all fields are separated by spaces.

The first field will require the data we collected earlier.

Run 'sudo nano /etc/fstab' and remove the line that contains the entry of the Windows partition. You can identify that line by the data we collected earlier. It can be any one of these : UUID or PARTUUID or LABEL or PARTLABEL or DEVICE NAME.

Now save that file and exit nano. Next it is recommended to run 'systemctl daemon-reload' . Now reboot your system. And now whenever you try to mount the widows drive , you will encounter this that the drive is not described in fstab.

  • 1
    No, it won't work for the case OP is describing, ie. automounting of the partition after clicking on its icon in GUI. This doesn't require any entry to be present in /etc/fstab at all. In my case, I have no entry regarding Windows partition in my /etc/fstab, and Ubuntu can still see and mount that partition. – raj Jun 18 '22 at 15:04
  • I posted another one . Hope that'll work. – Dipanjan Das Jun 18 '22 at 17:10
-1

Okay , so as I got a comment on the previous solution by raj, there is another method to prevent this. And it is very simple. Just boot windows and encrypt the windows drive with windows bitlocker tool. This will atleast stop random disk read from the windows drive.

Hope this one helps :)