Thursday, July 22, 2010

Why it's almost impossible to perfectly couple Windows and Linux in wedlock

Here's a story about how I recently seriously messed up the integrity of my computer and put myself into misery and disorientation. About a few days ago my Windows 7 operating system began complaining about "being lonely" and wanted to have the perfect companion operating system. Being a compassionate owner of the computer who listens to its needs while I bitch about mine, I introduced to him Xubuntu.


Why Xubuntu? Because there are those times when I needed to save resources and just want my computer to generally stay relaxed while I'm running applications. And I don't use the built-in Xcfe window manager that often, I mostly use Fluxbox while working. I think a very lightweight distribution of Linux is the best companion a Windows operating system could have. It's like pairing an anorexic girl with a 500 pound basement dweller.


However, there are problems. Xubuntu and Windows uses different types of partitions, ext and NTFS respectively. To put it metaphorically, anorexic Xubuntu keeps a neatly organized filesystem, while fat Windows does not bother cleaning up his basement base by himself. Also, they don't like visiting each other's flats. Xubuntu does not like her boyfriend's messy basement, while Windows it can't lift his fatass to stand up and go outside.


Luckily, there's a solution for that. Either I give Windows a Segway so he could go visit Xubuntu (using ext tools for Windows), or I could allow Xubuntu to go to my Windows partitions, using ntfs-3g. I chose the latter because my Linux partition is only 12GBs big and most of my files are stored in my two NTFS partitions.


While I am setting up Xubuntu to run with Windows 7, I actually did quite a lot of mess ups that will scar me for life. I first MOVED ALL (note that I MOVED, not copied) my important files to a storage NTFS. Now while I was installing Xubuntu I accidentally used that drive as swap, which completely removed it. Sucks, really. Thankfully, Windows saved my ass because it automatically saved a backup the day before I was screwed. Also, Dropbox has my important documents, so I can just restore in a breeze. However, this messed up my Winamp. I will have to reconfigure it to get it working again, or switch to Foobar2K because Winamp is getting old and unproductive.


Then another problem came up. I have allowed Xubuntu to read and write on both of my two NTFS drives. However, when I save files from Xubuntu there, then boot up Windows 7 to see if they can be detected, they were nowhere in sight. It appears that Windows overwritten them (in address, not in actualy memory). The files are there but Windows pushed them away from sight. Worse, it affects Xubuntu as well. When I boot back to Xubuntu all the files I have saved earlier are gone.


I got stuck like that for days until I found a solution: I stopped hibernating Windows 7 (as I was used to doing), restarted it, then ran a CHKDSK. It turns out there were so many errors in the storage partitions. Thankfully Windows 7 sorted it out and now it can see all files written by Xubuntu on either of its NTFS drives. I will have to refrain from hibernating Windows though, because it appears that it negates the changes made by Xubuntu when it boots up from hibernation.


I'm not happy with the state of my laptop right now. I'm planning to reformat it after the end of my term, when I can freely reinstall Windows since I'm done working with it. I will not completely remove Windows, though. I will need it for Windows programming (cross-platform programming is not my thing), and playing games that are laggy and unplayable with WINE in Xubuntu. I will continue to use Xubuntu as my primary OS, however.