LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-16-2017, 03:08 AM   #1
PACMANchasingme
Member
 
Registered: Mar 2015
Distribution: Arch
Posts: 62

Rep: Reputation: Disabled
How do I block a windows hard drive access to my main hdd?


Hey guys I have just added a second NTFS drive with windows on it, I don't want it to be able to read my /dev/sda and if possible keep full access to /dev/sdb while I'm on linux.

Code:
robby ~ $ sudo fdisk -l
[sudo] password for robby: 
Disk /dev/sdb: 298.1 GiB, 320072933376 bytes, 625142448 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: dos
Disk identifier: 0x7a6522b5

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1  *     2048 625141759 625139712 298.1G  7 HPFS/NTFS/exFAT


Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 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: dos
Disk identifier: 0x887271ea

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1       269809664 312580095  42770432  20.4G 83 Linux
/dev/sda2         1028096  11378687  10350592     5G 82 Linux swap / Solaris
/dev/sda3        11378688 269809663 258430976 123.2G 83 Linux

Partition table entries are not in disk order.
Code:
robby /run/media/robby/070ddd9e-7d25-4778-832b-5a458804ebb8 $ ls -lsa
total 8321432
     12 drwxrwxrwx 1 root root      12288 May 16 01:05  .
      0 drwxr-xr-x 3 root root         60 May 16  2017  ..
      4 drwxrwxrwx 1 root root       4096 May 15 23:54  Boot
    372 -rwxrwxrwx 1 root root     379342 Nov 20  2010  bootmgr
    376 -rwxrwxrwx 2 root root     383786 Nov 20  2010  bootmgr~1
      8 -rwxrwxrwx 1 root root       8192 May 15 23:54  BOOTSECT.BAK
      0 lrwxrwxrwx 2 root root         59 Jul 13  2009 'Documents and Settings' -> /run/media/robby/070ddd9e-7d25-4778-832b-5a458804ebb8/Users
      0 drwxrwxrwx 1 root root          0 May 15 23:09  NVIDIA
8320608 -rwxrwxrwx 1 root root 8520302592 May 16 00:56  pagefile.sys
      0 drwxrwxrwx 1 root root          0 Jul 13  2009  PerfLogs
      4 drwxrwxrwx 1 root root       4096 May 16  2017  ProgramData
      4 drwxrwxrwx 1 root root       4096 May 15 23:53 'Program Files'
      8 drwxrwxrwx 1 root root       8192 May 16  2017 'Program Files (x86)'
      0 drwxrwxrwx 1 root root          0 May 15 23:01 '$Recycle.Bin'
     16 drwxrwxrwx 1 root root      16384 May 16  2017 'System Volume Information'
      4 drwxrwxrwx 1 root root       4096 May 15 23:00  Users
     16 drwxrwxrwx 1 root root      16384 May 16  2017  Windows
robby /run/media/robby/070ddd9e-7d25-4778-832b-5a458804ebb8 $

Last edited by PACMANchasingme; 05-16-2017 at 03:29 AM.
 
Old 05-16-2017, 03:32 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,508

Rep: Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551
I assume your first drive is /dev/sda and second is /dev/sdb.
sda is your linux (which is now in use) and sdb is your windows. And now I'm lost.
I'm sorry, but I do not understand what do you want to achieve.
 
1 members found this post helpful.
Old 05-16-2017, 03:49 AM   #3
PACMANchasingme
Member
 
Registered: Mar 2015
Distribution: Arch
Posts: 62

Original Poster
Rep: Reputation: Disabled
When I'm booted in windows on /dev/sdb I don't want it to be able to have any read/write access to /dev/sda
 
Old 05-16-2017, 03:52 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,508

Rep: Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551Reputation: 5551
As far as I know by default windows has no driver to read/write ext4, so you do not need to do anything. But probably in your case it is different.
 
1 members found this post helpful.
Old 05-16-2017, 06:15 AM   #5
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
You cannot stop Windows from finding it, but you can, in Windows, restrict the access permissions.
However anyone with Admin permissions could change the access permissions.

Windows will find drives that even the BIOS does not know about - as it must to allow external drives to be accessed.
 
1 members found this post helpful.
Old 05-16-2017, 06:31 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917
One solution is to encrypt your Linux drive - Windows will then be able to access it but not understand the data.
 
1 members found this post helpful.
Old 05-16-2017, 07:11 AM   #7
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,807

Rep: Reputation: 215Reputation: 215Reputation: 215
Another possibility...

I have a PC tower with openSUSE 42.2 on an internal HDD on one of the motherboard's SATA connectors. I also have an adapter on one of the other SATA connectors to an eSATA port at the back of PC case. This connects to an external HDD in a HDD case with Windows 10 installed, one having an eSATA connection and its own power supply.

If I want Windows 10 I turn on the external HDD and use the one-time-boot BIOS option to find that HDD to boot. In your case you could reverse the installation with Linux on a removable HDD and Windows on an internal. With both running linux should see your Windows files, but without linux running Windows has nothing to see.

I used this setup because I couldn’t get Windows 10 to update as a dual-boot installation with openSUSE. This way neither OS knows of the other and Windows thinks it reigns alone.

Last edited by thorkelljarl; 05-16-2017 at 09:25 AM.
 
1 members found this post helpful.
Old 05-16-2017, 08:27 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,393

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Quote:
When I'm booted in windows on /dev/sdb I don't want it to be able to have any read/write access to /dev/sda
Have you done this or attempted to do this? I'd agree with the comment above by pan64, a default windows won't write or even read a Linux filesystem. The only access to a Linux partition I see is showing it as a 'healthy partition' in Disk Management.

Last edited by yancek; 05-16-2017 at 08:29 AM.
 
1 members found this post helpful.
Old 05-16-2017, 09:31 AM   #9
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
It depends what file system the drive is using. It really has nothing to do with what OS is running, but is more to do with what file sysem is in use and whether the drivers for that system are loaded.
 
1 members found this post helpful.
Old 05-16-2017, 10:19 AM   #10
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,807

Rep: Reputation: 215Reputation: 215Reputation: 215
A clarifying question...

Is it your intent that it should be impossible for anyone but you to access your linux files, or do you merely want Windows not to find them? In the latter case, as others have noted, unless you install a Windows program to recognize an Ext file system, Windows is blind and you don't have a problem.
 
1 members found this post helpful.
Old 05-16-2017, 11:43 AM   #11
PACMANchasingme
Member
 
Registered: Mar 2015
Distribution: Arch
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Have you done this or attempted to do this? I'd agree with the comment above by pan64, a default windows won't write or even read a Linux filesystem. The only access to a Linux partition I see is showing it as a 'healthy partition' in Disk Management.

Quote:
Originally Posted by thorkelljarl View Post
A clarifying question...

Is it your intent that it should be impossible for anyone but you to access your linux files, or do you merely want Windows not to find them? In the latter case, as others have noted, unless you install a Windows program to recognize an Ext file system, Windows is blind and you don't have a problem.
Why wouldn't Windows10 by default have an ext read/write tool somewhere in the depths of it's propitiatory OS it is like 35gb after all, these keystrokes are likely all being recorded and sent back to the mother ship and none of us will ever know until a disgruntled Microsoft employee goes on a date with Julian Assange.

thanks encrypting is the best choice, I never needed to do it cause it's only useful for physical security. Although dual-booting is the same principle.

Last edited by PACMANchasingme; 05-16-2017 at 11:44 AM.
 
Old 05-16-2017, 12:18 PM   #12
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
Quote:
Why wouldn't Windows10 by default have an ext read/write tool somewhere in the depths of it's propitiatory OS
Why should it? The authors know very well tha such a tool is best left to an add on.
Does your car carry around all the tools a mechanic is ever likely to need to maintain it or modify it.
 
1 members found this post helpful.
Old 05-17-2017, 09:30 PM   #13
Barkester
Member
 
Registered: Jan 2017
Location: SE Asia
Distribution: Arch
Posts: 67

Rep: Reputation: Disabled
I'm pretty sure Windows needs special software (used once > buggy) to read ext. 3 or 4. Should be no worries. I've previously "tested" (played.. Windows 7 was my Xbox) dual-boot with Ubu and never had any problem. Windows never even noticed the Linux drive.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Copy main hard drive to backup hard drive jaredR Linux - Newbie 5 12-13-2012 11:34 PM
Windows 2003 Domain Users Unable to access Windows Xp Clients Local Hard drive sheikptcs1984 General 2 04-11-2010 12:22 PM
Need help installing Ubuntu onto hard drive (currently on USB. Windows on HDD) Nightwolf411 Linux - Newbie 3 03-09-2010 02:11 PM
How to access Access root(/) hard drive attached in Windows XP machine farrukhndm Linux - Software 2 07-29-2008 12:52 PM
How do i access my windows Hard drive FireInTheDark Linux - Newbie 11 08-29-2004 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration