Ext3, ReiserFS & XFS in Windows thanks to coLinux

[ Saturday, 2 August 2008, MAcks ]


If you ever: needed to access your ext3, reiserfs or XFS partitions from Windows, wanted to use one of your favorite file systems via FUSE, or had an idea to mount an image of your hard drive, then this article is for you. This is a how-to, describing what to do, if you want Windows to handle file systems in a similar way as Linux does.

For our task we will use coLinux. coLinux is a modified linux kernel that can be executed as an application or a service in the Windows environment. The web page of the project is http://www.colinux.org/.

The installation procedure was tested on the stable version of the coLinux project (as of 28.06.2008). Installation was performed on the Windows 32-bit architecture. As far as other operating systems are concerned, there might be some modifications needed.

In short, we install coLinux on a windows machine, assure access to disk partions, and export all the mounted file systems using Samba.

Windows Vista users have to run the commands (e.g., cmd.exe, setup) via the context menu “run as …”. It is important, that while doing that, they are in the administrators mode.

coLinux's terminal

Get ready for the installation

  1. Download the program from the projects website (v0.7.3), and
    install it in the C:\coLinux directory
  2. Edit the connection settings of the virtual ethernet card installed by the coLinux (TAP Win32 Adapter V8 (coLinux)).
    In the TCP/IP settings, set: IP address: 192.168.37.10 Subnet Mask: 255.255.255.0
  3. Download Ubuntu-7.10.ext3.2GB.7z image from the the project’s webpage, and extract it to C:\coLinux
  4. The swap file comes together with the image so the next step can be omitted
  5. (Optional) If really needed, this command will create a 128MB swap: fsutil file createnew c:\coLinux\swapp128.fs 134217728 (one also has to run mkswap in Linux, and make sure that there is a corresponding line in fstab)
  6. Change of filenames:Ubuntu-7.10.ext3.2gb.fs -> ubuntu.fsswap128.fs -> ubuntu-swap.fs
  7. Copy example.conf to ubuntu.conf
  8. Edit of ubuntu.conf, by inserting these in proper places:cobd0="c:\coLinux\ubuntu.fs"cobd1="c:\coLinux\ubuntu-swap.fs"mem=32eth0=slirpeth1=tuntap
  9. Create ubuntu-start.cmd with the following content:colinux-daemon.exe -t nt @ubuntu.conf
  10. Runs ubuntu-start.cmd
  11. Login as root with the default “root” password
  12. Change the root password (passwd)
  13. Run: editor /etc/network/interfaces and add:auto eth1iface eth1 inet staticaddress 192.168.37.20network 192.168.37.0netmask 255.255.255.0broadcast 192.168.37.255
  14. ifup eth1
  15. ping 192.168.37.10 (from Linux to Windows) it should work now
  16. editor /etc/apt/sources.list (replace gutsy with hardy in all the paths)
  17. aptitude update
  18. aptitude safe-upgrade
  19. aptitude install samba openssh-server mc fuse-utils
  20. apt-get clean
  21. editor /etc/fuse.conf remove # at the beginning of the line user_allow_other
  22. editor /etc/ssh/sshd_config change PermitRootLogin to “no”
  23. Add a new user:adduser user1 (from now on, you can ssh to this account)
  24. adduser user1 fuse (this allows the user to use FUSE)
  25. /etc/init.d/ssh reload
  26. Check if you are able to establish a ssh connection with 192.168.37.20 in Windows
  27. Halt Linux: halt

How to mount the file system?

  1. Search for the partition you want to mount.http://colinux.wikia.com/wiki/Partitions.In my case, it is \Device\Harddisk2\Partition2.
  2. Edit ubuntu.conf again, and insert the following# partition to be mountedcobd2="\Device\Harddisk2\Partition2"
  3. Run ubuntu-start.cmd
  4. Login as root
  5. mkdir /media/codb2
  6. Add:/dev/cobd2 /media/cobd2 ext3 defaults 0 0 to fstab (it is an ext3 partition in my case).
  7. mount /media/cobd2

How to share file systems via Samba?

  1. Should you want to share a whole file system with user1, you must give him read and write permissions.(chown, chmod…).
  2. After setting the permissions, add at the following, at very end of /etc/samba/smb.conf:[my data]path = /media/cobd2valid users = user1read only = no
  3. Add the user to the password’s database of samba:smbpasswd -a user1 (samba does not use the system accounts by default)
  4. /etc/init.d/samba reload
  5. Type the address in Windows \\192.168.37.20, and login as user1 using the password generated by smbpasswd. You can map this file system to a “letter” in your OS

the view of an exported file system

FUSE-based file systems

To use the FUSE file systems (e.g., sshfs, encfs, …), you have to mount them using the allow_other option (which should be enabled in /etc/fuse.conf).How to mount:encfs $WHAT $WHERE -- -o allow_othersshfs $SERVER:$PATH $WHERE -o allow_other

More details

  1. To make, connecting to coLinux, easier add the IP address to WINDOWS\system32\drivers\etc\hosts by adding:192.168.37.20 colinux
  2. If you don’t want to start coLinux manually, it can be installed as a service:colinux-daemon.exe --install-service colinux @ubuntu.conf
  3. When running coLinux as a service, you can use the following commands to control it:net start colinuxnet stop colinux
  4. You can also set this service to start automatically. By doing so, you will get access to the mounted file systems immediately after the OS starts (provided that the disk was was mapped to be automatically mounted). One can access coLinux via a console (all of them are installed in C:\coLinux) or via ssh.
  5. If you want to have the same data under Windows and Linux, you have to sync the UID numbers (in /etc/passwd) of the user, who handles the files under Linux and coLinux.

Service settings

Stop the service

Performance

This solution does not provide an outstanding performance, but the benefits compensate for it. I’ve obtained transfers of up to 5 MB/s on an Athlon XP 2000+, SATA disk and an ext3 file system. Any ideas, on how to improve these results, are welcome.

Subscribe to RSS feed for this article!

30 Comments

fold this thread JIm Woods  Sunday, 3 August 2008 o godz. 4:21 pm #  Add karma Subtract karma  +0

Dude I just love that little penguin. He is so cute!

JT

(Comments wont nest below this level)
fold this thread Yury  Wednesday, 7 January 2009 o godz. 12:45 pm #  Add karma Subtract karma  +1

Really helpful to read XFS partitions from windows. Thanks!

 
 
fold this thread Anonymous  Sunday, 3 August 2008 o godz. 5:50 pm #  Add karma Subtract karma  --2

Actually, it’s very easy to improve that 5MB/s. Here — http://ext2fsd.sourceforge.net/

(Comments wont nest below this level)
fold this thread MAcks  Monday, 4 August 2008 o godz. 8:35 pm #  Add karma Subtract karma  +0

This is only for ext2. Ext3 is supported as ext2 (without journalling).

 
 
fold this thread William Mayo  Sunday, 3 August 2008 o godz. 6:31 pm #  Add karma Subtract karma  error

So… or you could install either of the two stable ext2/3fs drivers for Win2k-Vista. I mean, I’m all for coLinux, but it is the roundabout way to do this for ext2 or ext3.

Still the only way (AFAIK) for Reiser.

(Comments wont nest below this level)
 
fold this thread Dietrich  Sunday, 3 August 2008 o godz. 6:49 pm #  Add karma Subtract karma  --3

This all very nice. Folks who wish to forgo installing coLinux can opt to install Cygwin into Windows, which supports openssh, secure shell.

ssh, thus allows you to log into any Linux host and scp, sftp transparently and visa versa.

Thanks

(Comments wont nest below this level)
 
fold this thread Randy  Sunday, 3 August 2008 o godz. 7:32 pm #  Add karma Subtract karma  --1

Ext2 IFS 1.11 is much easier. – http://www.fs-driver.org/

(Comments wont nest below this level)
 
fold this thread Passing Troll  Thursday, 7 August 2008 o godz. 3:05 am #  Add karma Subtract karma  --1

Bump!

“Ext2 IFS 1.11 is much easier. – http://www.fs-driver.org

This is by far the best solution for accessing Ext2/3 partitions under win32.

There is also a program called Explore2fs which provides read-only access to ext2/3 partitions.

Explore2fs homepage – http://uranus.it.swin.edu.au/~jn/linux/explore2fs-old.htm

There are win32 drivers available for ReiserFS3 but not ReiserFS4. However, as Hans Reiser (the inventor of ReiserFS) is currently awaiting sentencing for murdering his wife and has sold his company “Namesys” (which develops ReiserFS) the future of ReiserFS looks shaky.

(Comments wont nest below this level)
 
fold this thread Passing Troll  Thursday, 7 August 2008 o godz. 3:07 am #  Add karma Subtract karma  --1

maybe a doublepost? didn’t seem to work the first time.

Bump!

“Ext2 IFS 1.11 is much easier. – http://www.fs-driver.org

This is by far the best solution for accessing Ext2/3 partitions under win32.

There is also a program called Explore2fs which provides read-only access to ext2/3 partitions.

Explore2fs homepage – http://uranus.it.swin.edu.au/~jn/linux/explore2fs-old.htm

There are win32 drivers available for ReiserFS3 but not ReiserFS4. However, as Hans Reiser (the inventor of ReiserFS) is currently awaiting sentencing for murdering his wife and has sold his company “Namesys” (which develops ReiserFS) the future of ReiserFS looks shaky.

(Comments wont nest below this level)
 
fold this thread Turtle  Friday, 8 August 2008 o godz. 4:18 am #  Add karma Subtract karma  +2

Your formatting of the instructions above just plain sucks. Makes following this how-to about 10 times harder.

(Comments wont nest below this level)
 
fold this thread kaharoth  Friday, 10 October 2008 o godz. 1:02 pm #  Add karma Subtract karma  --1

this is a try

(Comments wont nest below this level)
 
fold this thread kaharoth  Friday, 10 October 2008 o godz. 1:08 pm #  Add karma Subtract karma  +0

Hi I need help in configurations
I had a problem in step 14 (Get ready for the installation), when I do the command “ifup eth1″ I obtain this error:

root@ubuntu:~# ifup eth1
eth1: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
eth1: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth1: ERROR while getting interface flags: No such device
eth1: ERROR while getting interface flags: No such device
Failed to bring up eth1.

My windows configuration of the TAP-Win32 adapter is:

And the interface in windows appears disconnected.
What about the DNS servers??

please help me..
this is the only way to work with my XFS partition in windows.

(Comments wont nest below this level)
 
fold this thread kaharoth  Friday, 10 October 2008 o godz. 1:13 pm #  Add karma Subtract karma  +0

Hi I need help in configurations
I had a problem in step 14 (Get ready for the installation), when I do the command “ifup eth1″ I obtain this error:

root@ubuntu:~# ifup eth1
eth1: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
eth1: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth1: ERROR while getting interface flags: No such device
eth1: ERROR while getting interface flags: No such device
Failed to bring up eth1.

My windows configuration of the TAP-Win32 adapter is:
this
and the interface in windows appears as disconnected (network cable unplugged).
Is it needed a DNS server??
please.. help me
this is the only way to work with my XFS partition in windows.

(Comments wont nest below this level)
fold this thread Ash  Tuesday, 28 April 2009 o godz. 8:28 am #  Add karma Subtract karma  +1

Try to use commercial UFS Explorer utility (http://www.ufsexplorer.com/download_std.php). It supports most Linux file systems, including XFS and price is not very high (it saved much time for me :) )

fold this thread stevie  Monday, 4 January 2010 o godz. 1:29 am #  Add karma Subtract karma  +0

OMG Thanks so much for this link, my Linkstation NAS packed up yesterday and I’ve spent hours and hours trying to get stuff of it, after taking it out and sticking in my comp I’ve tried everything to get at those files but to no avail, until now. Thanks so much

 
 
 
fold this thread Sendoshin  Monday, 10 November 2008 o godz. 4:01 am #  Add karma Subtract karma  error

Try using eth0 instead of eth1. Linux systems tend to prefer starting with 0 instead of 1 when numbering things.

As far as DNS goes, unless you plan to browse the web from coLinux, you don’t really need DNS servers set on the coLinux side of things.

Hope that helps!

- Sen

(Comments wont nest below this level)
 
fold this thread Hugo Barrera  Tuesday, 31 March 2009 o godz. 11:23 pm #  Add karma Subtract karma  error

you could also use a virtualbox, with a heavily stripped linux+samba and run it in headless mode, achiving practicaly the same.
Only advantage is setup easyness.

(Comments wont nest below this level)
 
fold this thread Stefan Gheorghe  Friday, 8 May 2009 o godz. 9:36 am #  Add karma Subtract karma  +1

Many Thanks!

Your Docu help me to get access to my XFS HDD :-)

kind
regards
Stefan

(Comments wont nest below this level)
 
fold this thread Charlie Jay  Thursday, 11 June 2009 o godz. 10:23 pm #  Add karma Subtract karma  --1

This tutorial is bad ass.

(Comments wont nest below this level)
 
fold this thread Dusan Svekus  Friday, 8 January 2010 o godz. 5:53 pm #  Add karma Subtract karma  +0

Any solution for AMD64 or EM64T ?

(Comments wont nest below this level)
 
fold this thread Charlie Jay  Sunday, 31 January 2010 o godz. 7:30 am #  Add karma Subtract karma  +0

Dusan, use VirtualBox–download a Ubuntu image from http://virtualbox.wordpress.com/images/ubuntu/, then basically follow the guide here: http://www.ubuntugeek.com/howto-access-ext3-partition-from-windows.html.

Just ensure your network adapter is in bridged mode & that your /etc/network/interfaces has the right interface (ifconfig -a).

Good luck.

(Comments wont nest below this level)
 
fold this thread Joris  Monday, 8 March 2010 o godz. 11:39 pm #  Add karma Subtract karma  +1

Thanks for the excellent tutorial. Some line breaks are messed up but if you have some basic Linux knowledge and you know the ‘man’ command, you’re good to go.

(Comments wont nest below this level)
 
fold this thread Touchscreen  Monday, 24 May 2010 o godz. 5:03 pm #  Add karma Subtract karma  --1

Why is the file shown as a heuristic virus in Norton Internet Security 2010 as infection Suspicious.Emit.

(Comments wont nest below this level)
 
fold this thread Thany  Tuesday, 3 August 2010 o godz. 12:41 pm #  Add karma Subtract karma  +0

Get ready for installation: 27 steps.

Are u kidding me?! twenty-seven steps before anything happens?

(Comments wont nest below this level)
 
fold this thread John  Sunday, 15 August 2010 o godz. 11:45 pm #  Add karma Subtract karma  +0

When I follow the instruction above, I always got an error “FATAL -> Failed for Fork.” when doing the aptitude safe-upgrade or aptitude install. Any idea what I did wrong?

Thanks,
John

(Comments wont nest below this level)
 
fold this thread Manish  Friday, 27 August 2010 o godz. 8:46 pm #  Add karma Subtract karma  +0

For the “FATAL -> Failed for Fork.”
Change
mem=32

to

Mem = 64 in Step 8

(Comments wont nest below this level)
 
fold this thread Johannes  Friday, 1 October 2010 o godz. 9:13 pm #  Add karma Subtract karma  +0

I have a problem in line 2 and 6 already:
Step 2: I have WinXP and know how to change TCP/IP settings for my Ethernet or wireless card, but don’t know how to change for the virtual TAP adapter. So I didn’t change anything.
Step 6: “Change of filenames: Ubuntu-7.10.ext3.2gb.fs -> ubuntu.fsswap128.fs -> ubuntu-swap.fs” I have only a file Ubuntu-7.10.ext3.2GB.7z; in what name should I change, ubuntu.fsswap128.fs or ubuntu-swap.fs?

(Comments wont nest below this level)
 
fold this thread Leoma Katsaounis  Thursday, 9 February 2012 o godz. 1:40 pm #  Add karma Subtract karma  +0

I think that what you published made a great deal of sense. However, think on this, what if you composed a catchier post title? I am not saying your information isn’t good, but what if you added a headline that makes people want more? I mean polishlinux.org » Ext3, ReiserFS & XFS in Windows thanks to coLinux is kinda vanilla. You should peek at Yahoo’s front page and watch how they create article headlines to get viewers to click. You might add a related video or a related pic or two to grab readers interested about what you’ve written. In my opinion, it would make your posts a little bit more interesting.

(Comments wont nest below this level)
 
fold this thread anti-aging cream  Friday, 11 July 2014 o godz. 3:01 pm #  Add karma Subtract karma  --1

Numerous of us have attempted one of the new facial moisturizers
we see at the keep and been disappointed at how poorly
it worked when we used it. A lot of the so-referred to
as excellent facial creams are far less effective than the manufacturer’s would like us to believe.

(Comments wont nest below this level)
 
fold this thread world of tanks hack download  Sunday, 20 July 2014 o godz. 6:36 pm #  Add karma Subtract karma  --1

Even Punk – Buster, a company devoted to stopping hacking in video games,
regularly updates. Make sure you let your friends know how to return the favor.
The magnetic system would make all forces gentile, but any large motion of the station body would require that the instrument be
nudged to keep up.

(Comments wont nest below this level)
 
Name (required)
E-mail (required - never shown publicly)
URI

Adjust field size: shrink | enlarge)


You can use simple HTML in your comments. Some examples are as follows:
  • A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
  • Strong text: <strong>Strong text</strong>,
  • Italic text: <em>italic text</em>,
  • Strike: <strike>strike</strike>,
  • Code: <code>printf("hello world");</code>,
  • Block quote: <blockquote>Block quote</blockquote>

About the Author

MAcks

System administrator and programmer (Python, Common LISP). Main interests: distributed systems, virtualization, intelligent computations. Linux user since 2000.

New AdTaily ads!

Are you a film buff?

film buffs community, movie recommendations and reviews

RSS: Comments

You can follow the comments to this article through a special channel RSS 2.0 .

Related articles: Linux

 more »

PolishLinux Top Content


Become our fan on Facebook!

PolishLinux.org on Facebook

Follow PolishLinux on Twitter!

Follow polishlinux on Twitter

Google Ads