Mount EXT3 in Windows 7 x64
// September 23rd, 2009 // Windows
I’ve recently installed Windows 7 RC x64, but being primarily a Linux user I want to be able to use EXT3/EXT4 with Windows. Here are a few simple steps and requirements to get it working.
Preparation
I’m using Windows 7 x64 so have two options of either with using EXT2IFS (which I generally prefer as it’s a bit more subtle) or EXT2FSD. I’ll start by going over EXT2IFS.
EXT2IFS
- Using EXT2IFS means I am limited to an inode size of 128. This means I have to ensure my partition is formatted in this way. Ubuntu live CD’s, as of 8.10 (Jaunty) will format EXT3 with an inode size of 256 (for future proofing). Therefore you will need to manually format the partition. This can be done with the following commands:
sudo fdisk -l
sudo tune2fs -l /dev/sda7 | grep Inode
sudo mke2fs -I 128 -j -t ext3 /dev/sda7
Installation
Ok, so you should have Windows 7 x64 installed, and an EXT3 partition with an inode size of 128.
- Download and install EXT2IFS
- Run it once installed, you should be able to assign a drive letter to your EXT3 drive, and once done, be able to browse your files.
Remembering After Reboot
There is a problem with Windows 7 that doesn’t occur in Windows XP. After a reboot it won’t re-mount your EXT3 partition. This is due to UAC, something that you need to turn off. * There is a way around this, see at the bottom of the post.
- Open up a command prompt and type “mountvol”
- This will list all of your volumes including the EXT3 volumes. You need to figure out whic volume is the one you want. It will generally map against the partition table. So for example, if the last partition on the hard drive is the one you want, it’ll be the last one listed in mountvol.
- Once you’ve found the one you want, note down the output generated for it from “mountvol”. It’ll look something like:
\\?\Volume{792de021-9e3e-11de-80cf-001d094608bc}\
*** NO MOUNT POINTS *** - The full command to mount it is below, but if running this on your standard account you’ll probably get an “Access Denied” error due to UAC.
mountvol R:\ \\?\Volume{792de021-9e3e-11de-80cf-001d094608bc}\
So having figured out the command to use to mount the volume, we now need to get around UAC. Here’s how to:
- In C:\%User%\.. create a file called mount.cmd
- Open the newly created file, and paste in the command from above.
- Disable UAC by going to Control Panel > System Security > Change User Access Control settings.
- I set mine right to the bottom to “Not notify” otherwise I found the command wouldn’t work.
Disabling UAC is far from ideal, but was needed to make the partition mount upon reboot. I’ll keep looking for a way to have UAC enabled and the mounting still working, and update the post if I find a solution.
EXT2FSD
I did originally have problems running EXT2FSD. But after a few people posted comments, I tried it again. It works! I had to set it to run in Compatibility Mode for Windows Vista SP2. Unfortunately my machine was already setup with EXT2IFS so I don’t know if UAC needs to be disabled (I’ll find out when I get a bit of time). It’s worth trying though if you have an EXT3 drive with an inode size of 256 (and hence can’t use EXT2IFS).
Running .exe’s
One problem I did have prior to the .cmd file (ie when it wouldn’t remember to re-mount upon reboot), was that I couldn’t run .exe files from my EXT3 partition. I think this was due to UAC too, and the fact that I had mounted the drive under my user account (rather than as an admin). However, since using the .cmd file and disabling UAC I can run .exe files without a problem.
UAC Fix
‘adic_tech’ in the comments below has found a solution on how to keep UAC enabled, but have EXT2IFS running. Here are the steps taken, you’ll need to open a command prompt:
- |Enable the Administrator account| net user administrator /active:yes
- |Set the Administrator’s password| net user administrator *
- Create a task in Task Scheduler to run as Administrator at startup, to run the moutvol command
I’ve not tried the above, but from looking at it, it looks fairly obvious that it should work.
so basically it’s a huge pain in the ass
great
Well you are trying to run a different file system that Windows doesn’t natively support. But typically yeah it is a bit. But that’s fine as I don’t use Windows much. If I did then I probably wouldn’t use EXT3.
This looks like a great solution to my problem of having to manually mount my ext3 stuff at every windows boot. Thanks! and please do update us with a comment if you hear of a better solution!
How did you installed it? When I try 1.11a it says uncompatible operating system…
Ah I may have run it in compatibility mode. I’ll check tonight when I get back from work. May have been a step I missed out.
Someone is mentioning EXT2FSD works on another one of my posts. It may be worth trying that. I’m going to give it another go too.
To get the program to work, you have to right click->Troubleshoot compatibility
It will most likely not work at first, but when it lets you try again, I chose “Vista (service pack 2)” and now I’m all set. When you save the settings for the file, just ignore the “incompatibilities found” dialog and close it.
Thanks, yeah I need to update the article. I got EXT2FSD working just the other night, and picked it to run in compatibility mode as Windows Vista too.
On Windows 7 64-bit, when I tried ext2fsd, it recognized my ext2 partition (on a portable USB hard drive), and assigned a drive letter. But Windows said the drive was unformatted, so I gave up pretty quickly.
For those who use ext2fsd successfully on W7, do you know why Windows thinks the drive needs to be formatted even though ext2fsd recognizes the partition correctly?
ext2ifs worked, but it loses the drive letter upon reboot. I just read about using mountvol in a script that runs at startup as SYSTEM, but don’t know how to actually do that yet.
If there’s someone who has set up mountvol to run at startup as SYSTEM, can you point me to a tutorial, or just explain if it’s brief?
Thanks.
Ah external drives are a bit tricky. I have an EXT3 drive, but EXT2FSD doesn’t want to auto-assign a letter to it. I can assign one and reboot, but that’s really for fixed drives.
The formatting message is either typically a) Linux still has the drive locked (incomplete shutdown), b) EXT2FSD etc… can’t recognise the partition.
I’ve not figured out how to run mountvol as SYSTEM. One ideas is to look at the “runas” command. I find UAC quite annoying though so am gald it’s off. And the majority of my time anyway is spent in Linux Mint.
I didn’t pursue the powerscript, don’t need to learn that today. Doesn’t seem that safe, anyway.
Instead I just used mountvol to find the unmounted partion ID, then made a shortcut to mount it to my desired drive letter. I plug in the drive and hit the shortcut.
If I didn’t own an administrator account, not sure then what I would do. Can Windows do sudo-like stuff? I’m guessing I can’t simply change the permissions on mountvol to include non-privileged users.
BTW, I’ve read horror stories of ext2ifs trashing not just the Linux volume but even trashing the Vista host partition. Sounds scary. Hard to be sure it was ext2ifs’ fault, though.
Here’s how I mount after I plug in the USB drive:
runas.exe /user:domain\an-administrator “mountvol L: \\?\Volume{2753554c-28b0-11df-ad66-0024e8f45832}\”
Need to use eject twice in a row to unmount it, but that works.
The powershell script to make this work is the same as the command shown:
mountvol R:\ \\?\Volume{792de021-9e3e-11de-80cf-001d094608bc}\
Just put that in a .ps1 file and use start->accessories->system tools->task scheduler to create a new task to run the ps1 script at boot. Task scheduler is rather intuitive.
The only hang up is that by default powershell is set not to execute scripts unless they are digitally signed by some sort of authority. You can change this setting with the Set-ExecutionPolicy cmdlet as explained here:
http://technet.microsoft.com/en-us/library/ee176949.aspx
Error correction, the command is not quite the same. Almost. It needs a set of quotes:
mountvol R:\ “\\?\Volume{792de021-9e3e-11de-80cf-001d094608bc}\”
Thanks generic for the script hint.
YES ! Its working without annoing UAC confirmation!
- enable Administrator account (net user administrator /active:yes )
- set Administrator password (net user administrator *)
- create a task in Task Scheduler to run as Admin at strartup the moutvol command
Succes!
adic
Ah nice one. I’ll update the article and credit you with the find. I’ve been too lazy, never go into Windows that much. Plus I hate UAC too!
Hey, thanks for your posting!
Just a heads up on the UAC, there is a much simpler way to get administrative access. As long as your are using an administrative account, you may right click on the command prompt and click ‘run as administrator’.
So you do not need to enable the ‘administrator’ account or set a password.
By default, Windows will not grant administrative privileges to the command prompt, unless you explicitly specify that you would like to do so.
Forgot to check the box of notifying for follow up comments! whoops
Hi Guys!
First thing Im running a windows7 64bit box here.
I have installed EXT2IFS. Also used the mountvol command to mount the disk. No problem but when IT is mounted windows doesnt recognize it and wants to format it, I dont want that =)
any tips ?
-Petter
I followed the directions using EXT2IFS on Windows 7 64-bit and everything seemed to work fine. I disabled UAC and set the mount command to run at startup. But Windows cannot write to my ext3 partition, only read. The “Security” tab where I would normally go to adjust permissions is not available for my ext3 drive. Does this always happen or is there something I should do to enable writing?
Thanks,
Daragh
@generic: the quote is not needed as I tested. In fact, adding quote will fail with “The parameter is incorrect.”