374

Is there a way to read ext4 partitions from Windows? If so, what can I do?

kobaltz
  • 14,896
zillion
  • 468

11 Answers11

102

Ext2Read works well. It can also open & read disk images ( eg: Wubi disk images)

Ext2Read is an explorer like utility to explore ext2/ext3/ext4 files. It now supports LVM2 and EXT4 extents. It can be used to view and copy files and folders. It can recursively copy entire folders. It can also be used to view and copy disk and file

alt text

98

DiskInternals Linux Reader

This program plays the role of a bridge between your Windows and Ext2/Ext3/Ext4, HFS and ReiserFS file systems.

Linux Reader Website

Features

  1. Integrated with Windows Explorer
  2. Reader for Ext2/3/4, ReiserFS, Reiser4, HFS, HFS+, FAT, exFAT, NTFS, ReFS, UFS2
  3. Can create and open disk images
  4. Freeware

Screenshot showing example usage of DiskInternals Linux Reader

Mithical
  • 321
Paulo Coghi
  • 1,264
57

WARNING
According to multiple reports, it does not work on Windows 10 version 1909 and later

EXT2FSD works for reading ext4 filesystems, though not all of ext4's capabilities are supported.

After installing set a letter to each Linux drive (see screen-shot) and then restart the application. After that Windows Explorer will show the Linux partitions as any other partition.

setting a letter to a Linux drive

ᄂ ᄀ
  • 4,187
caliban
  • 20,411
54

WSL2 on Windows 10 Build 20211

Windows allows now to mount physical disks using the Windows Subsystem for Linux 2 (WSL).

However, there is a limitation with this approach as noted in the Microsoft documentation. For convenience, this limitation is noted here:

  • At this time, only entire disks can be attached to WSL 2, meaning that it's not possible to attach only a partition. Concretely, this means that it's not possible to use wsl --mount to read a partition on the boot device, because that device can't be detached from Windows.

For people who are not familiar with WSL2:

... Windows Subsystem for Linux is a compatibility layer for running Linux binary executables natively on Windows 10 and Windows Server 2019. In May 2019, WSL 2 was announced, introducing important changes such as a real Linux kernel, through a subset of Hyper-V features. ...

find more on Wikipedia

The Windows 10 WSL2 now supports a mount command for linux filesystems called wsl.

First of all you have to install WSL2 on your windows10+ release. I recommend to simply follow the microsoft installation guide (note the minimum version required).

The following steps are taken from the microsoft's homepage docu wls2-mount-disk :

  • Identify the disk

    Open a powershell (or something else) and type

    wmic diskdrive list brief
    

    The disks paths are available under the 'DeviceID' columns. Usually under the \.\PHYSICALDRIVE* format.

  • List and select the partitions to mount in WSL2

    Note your disk to mount and enter:

    wsl --mount <DiskPath> --bare
    

    Now the disk is available to the layer and you can use the common linux command

    lsblk
    

    as you know well from linux systems.

  • Mount the selected partitions

    Identify your partitons and mount it using the following command

    wsl --mount <DiskPath> --partition <PartitionNumber> --type <Filesystem>
    

    If you ommit the --partition flag an ext4 filesystem will be choosen. Commands like help wsl or cat /proc/filesystems will give you more information about the options.

  • Access the disk content

    Once mounted, the disk can be accessed under the path pointed to by the config value: automount.root. The default value is /mnt/wsl .

    From Windows, the disk can be accessed from File Explorer by navigating to: \\wsl$\\<Distro>\\<Mountpoint> (pick any Linux distribution).

  • Unmount the disk

    To unmount and detach the disk run:

     wsl --unmount <DiskPath>
    
abu_bua
  • 558
  • 9
  • 9
35

Well not really a solution, but I use VirtualBox, use it as a bridge.

34

There is now another solution: Paragon ExtFS for Windows, which acts as a file system driver and so you don't need to use a specialized program to access your files.

From the website:

  • Fast and easy read/write access to Ext2 / Ext3 / Ext4 under Windows
  • The only solution with Ext4 read - write support!
  • Easy-to-install and supports Windows 8 / 7 / Vista / XP

edit 2015-04-06 you might want to stick to read files off Linux - there have been anecdotal reports of file system corruptions when writing files to ext4 partitions using Paragon

wjandrea
  • 686
10

ext4explorer

Ext4Explore is a program that allows Linux partitions to be browsed from Microsoft Windows. It has a GUI which will be familiar to users of Windows Explorer.

Ext4Explore Web Site

Features

  1. Displays Windows Icons
  2. Symbolic Links Displayed with 'Shortcut' Overlay
  3. Follows Symbolic Links and Displays Correct File Information
  4. Copy Files and Directories
  5. Configurable Edit Context Menu Option

enter image description here

Tachyons
  • 637
6

Ext2Fsd was common in the past, but it's usually outdated and constantly broken in newer Windows in my experience. You can also see that in many comments. There's a fork of it called Ext4Fsd

This is a branch of the Ext2Fsd project by Matt Wu where I try to implement support for metadata checksums and jbd2. I have also updated the project so it can be compiled with Visual Studio 2017 and Visual Studio 2019. This is work in progress. If you need a stable driver you should get the latest official release from http://www.ext2fsd.com.

You can try it at your own risk

Ext4Fsd is an ext2/3/4 file system driver for Windows (XP/Vista/7/8/10). It's a free and open-source software, everyone can modify or distribute under GNU GPLv2.

phuclv
  • 30,396
  • 15
  • 136
  • 260
3

If you want to dual boot Ubuntu (or any Linux-based OS) with Windows and read ext3/ext4 filesystem, you can use Ext2FSD. Although you may need to take special steps as explained below.

I’ve successfully used Ext2fsd on Windows 7 to read my ext4 (!) filesystem this way.

For those interested, more detailed how-to is here: Read ext3/ext4 Partition from Windows 7:

Originally Posted by berm0o0da on August 29, 2010 :

The newest version of Ext2Read open source software can read normal Ext4 filesystems from Windows, even with ‘extents’ feature bit enabled! Please share your experience with this software in the comments.

enter image description here

If you use Windows 7 and want to dual-boot Ubuntu (or another Linux-based operating system), you’ll want to be able to read Ubuntu files from Windows 7 or Windows Server 2008 R2.

From Ubuntu Karmic Koala 9.10 ext4 filesystem uses by default, and previous versions use ext3 and ext2 filesystems. There are several good options to read and write ext2 filesystems from Windows systems, but ext3 or ext4 support is an entirely different scenario.

enter image description here

I tried three different software to read my ext4 partition: Ext2fsd, Ext2IFS, and DiskInternal Linux Reader. Ext2IFS fails to mount my ext4 partition due to unknown feature bit AND because my partition has inode size of 256 (Ext2IFS only supports inode size 128). DiskInternal Linux Reader apparently tries to scan my harddisk forever.

With Ext2fsd, I’ve successfully accessed my ext4 filesystem from Windows 7. Here I’ll show you the steps to make it happen:

  1. When creating/formatting the ext4 filesystem, make sure to add -O ^extent which means disabling the “extent” feature bit. The following steps will not work if your ext4 filesystem still has “extent” feature enabled. ext2 and ext3 partitions should be fine.
  2. Download ext2fsd here.
  1. Right-click the downloaded file and click Properties. Set the compatibility mode to “Windows Vista Service Pack 2″ and check “Run as administrator”.
  2. Run the ext2fsd installer. During install, I recommend you uncheck the “enable write access” feature to safeguard against losing data in your Linux partitions.
  3. Restart Windows 7.
  4. Run the Ext2 Volume Manager from Start Menu.

Now you should be able to mount your Linux ext2/ext3/ext4 partitions from Windows 7 and read the files without any trouble.

These steps should also work on Windows Vista, Windows Server 2008, Windows Server 2003, and Windows XP, only that you will not need to enable compatibility mode (step 3).

note : You should run this program as an administrator. Use it and enjoy

Hope this helps!

NickAc
  • 3
1

DiskGenius is available as a free, versatile partition manager, running under Windows OS, up to and including Windows 10 v. 1909, that includes the ability to read extn (i.e., ext, ext2, ext3 & ext4)partitions. It allows full access to files and folders in those partitions. (There are also commercially licensed versions, but for the use described, the free versions should be sufficient.)

It also provides access to virtual disks created by some disk imaging software, such as Macrium Reflect. Reflect enables one to mount a disk image as a virtual disk, but browsing the image can only be done for file systems for which Windows has drivers. However, the mounted image can be explored in DiskGenius.

[Sadly, Ext2Fsd does not work on my current version of Windows, and Ext2Fsd has not been updated in years. It would have been nice to add drivers directly to Windows OS.]

0

If you have access to a raw ext4 image and want to read it without mounting it you can use https://github.com/nlitsme/extfstools (This will work on low privilege (which can not mount things) linux enviroments as well). It does the job of reading images directly, that means it will read EXT4 filesystems, if you already have the raw data readable somewhere, it will not do the job of reading the raw data hard drive or SD card directly, it is a commandline utility. (This means it can read your_ext4.img but it won't read raw data directly from the hard drive, this can be useful to you if you have qcow2 images or virtual machine images you can read on your filesystem normally.) If you can somehow dump sd card contents into an image, and if you can dump an ext2/3/4 partition, this will work!

That being said, if you already have the image, you could just use 7zip.

Rainb
  • 255