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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-16-2017, 03:08 AM
|
#1
|
Member
Registered: Mar 2015
Distribution: Arch
Posts: 62
Rep:
|
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.
|
|
|
05-16-2017, 03:32 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,767
|
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.
|
05-16-2017, 03:49 AM
|
#3
|
Member
Registered: Mar 2015
Distribution: Arch
Posts: 62
Original Poster
Rep:
|
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
|
|
|
05-16-2017, 03:52 AM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,767
|
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.
|
05-16-2017, 06:15 AM
|
#5
|
Member
Registered: Sep 2011
Distribution: Puppy
Posts: 601
Rep:
|
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.
|
05-16-2017, 06:31 AM
|
#6
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
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.
|
05-16-2017, 07:11 AM
|
#7
|
Senior Member
Registered: Jun 2008
Posts: 1,820
|
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.
|
05-16-2017, 08:27 AM
|
#8
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,864
|
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.
|
05-16-2017, 09:31 AM
|
#9
|
Member
Registered: Sep 2011
Distribution: Puppy
Posts: 601
Rep:
|
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.
|
05-16-2017, 10:19 AM
|
#10
|
Senior Member
Registered: Jun 2008
Posts: 1,820
|
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.
|
05-16-2017, 11:43 AM
|
#11
|
Member
Registered: Mar 2015
Distribution: Arch
Posts: 62
Original Poster
Rep:
|
Quote:
Originally Posted by yancek
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
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.
|
|
|
05-16-2017, 12:18 PM
|
#12
|
Member
Registered: Sep 2011
Distribution: Puppy
Posts: 601
Rep:
|
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.
|
05-17-2017, 09:30 PM
|
#13
|
Member
Registered: Jan 2017
Location: SE Asia
Distribution: Arch
Posts: 67
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 12:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|