How can I access a Linux partition from Windows?

3

3

I'd like to be able to access my Linux /home partition from within Windows on a dual-boot machine. Since the partition is formatted for XFS, I can't use explore2fs.

What other ways might I be able to access my Linux partitions?

I've considered VirtualPC, VMWare, and VirtualBox and believe both VMWare and VirtualBox support accessing raw partitions, but am not sure what the quickest and lightest weight solution will be. Suggestions.

Kaleb Pederson

Posted 2010-01-09T21:54:43.183

Reputation: 489

Answers

1

Cooperative Linux is the first working free and open source method for optimally running Linux on Microsoft Windows natively. More generally, Cooperative Linux (short-named coLinux) is a port of the Linux kernel that allows it to run cooperatively alongside another operating system on a single machine. For instance, it allows one to freely run Linux on Windows 2000/XP/Vista/7.

here's a tutorial: Ext3, ReiserFS & XFS in Windows thanks to coLinux

Molly7244

Posted 2010-01-09T21:54:43.183

Reputation:

Very interesting, will definitely investigate. Thanks. – Kaleb Pederson – 2010-01-10T07:12:09.553

4

After some investigation, I decided to use VirtualBox as I trusted it a bit more than Cooperative Linux. Here's the super-short guide to getting VirtualBox setup to access raw partitions using your current install of Linux. With only minor modifications, you can create a new VM that access existing physical partitions:

(1) Create a virtual disk that's nothing more than a reference to your existing file systems using VBoxManage:

# Note, backslashes immediately before new lines are continuations
C:\>cd \users\kpederson\.virtualbox\harddisks
C:\Users\kpederson\.VirtualBox\HardDisks>"\Program Files\Oracle\VirtualBox\VBoxManage" \
  internalcommands createrawvmdk -filename rawdisk.vmdk -rawdisk \\.\PhysicalDrive0 \
  -partitions 5,6,7,8 -mbr f:\sda5_mbr -register

(2) Create a virtual machine that uses the virtual disk created in step 1. In the above command I called it rawdisk.vmdk.

(3) Configure your virtual machine using VirtualBox's bridged networking. In my case, I found it buggy, so I setup my virtual machine to use host-only networking and then used Windows to bridge the host-only network adapter with my real (i.e. physical) network adapter.

(4) Configure a share in samba:

[shared]
   comment = Shared Documents
   path = /home/shared
   guest ok = no
   writable = yes

And with samba up and running, I had access to all the files I needed. In addition, I can use ssh/sftp to access all the files using WinSCP or a similar file-transfer client.

Full details are available on a blog post I wrote entitled "Accessing Linux File Systems from within Windows"

Kaleb Pederson

Posted 2010-01-09T21:54:43.183

Reputation: 489