Sunday, February 21, 2010

ext4 in Windows

I recently bought Windows 7 to install, but all my files are already in an ext4 partition.  How to access them?  The ext2fs program doesn't really work well with the full ext4 system, and Microsoft.... well let's just say they won't be making any moves to create an ext4 driver.

So here's what I did that works perfectly:
  1. Install VirtualBox
  2. Install a linux variant inside virtualbox
  3. Set up raw partition access in virtualbox.  This is the key step.  The user manual for virtualbox does a very good job explaining it, but I've noticed that to use this correctly everything must be run in administrator mode in windows.
  4. Make a script to automatically mount the virtual raw partition (the ext4 partition)
  5. Set up symlinks inside the linux os to point to the mounted partition
  6. Set up samba in the virtual linux os to share the mounted partition
  7. Set up the virtual network adapter in virtualbox so that the virtual machine has an ip address you can access (try pinging it from windows to test it).  Make sure it's a static IP so you always know what it is.
  8. Access your files through in windows using samba :)
  9. (optional) turn off the linux os's gui to save memory and processing power, etc.
  10. (optional) set up a network map so that the partition is always mapped to a specific drive letter (like Z:\ )