Saturday, December 11, 2010

The Great Reinstallation of '10

A few days ago I have successfully finished the rigorous task of repartitioning my drives and reinstalling everything. Now this might seem like an easy job for some of you, but here are the objectives I have to meet during reinstallation:

1. All important data are to be backed up and restored as is. This is not entirely difficult, but it is one of the objectives with grave importance. Most of my important documents are stored in my external HDD, Network Attached Storage (NAS) and my offsite Winamp is known for its shitty way of backing up your files. I've decided to just backup its database (as well as with iTunes for my iPhone), and just restore the files in the same location and partition as it was before so that they could easily find it.

2. I will have to equally distribute my partitions. As planned, my Windows and Linux partitions will get 40GB and 30GB of space respectively. A central storage drive formatted as NTFS (the Windows NT filesystem) will be shared by both operating systems. I'll explain more of this later.

3. Instead of Ubuntu, I'm installing Arch Linux as my Linux distro. This reason is primarily because Ubuntu is becoming less of the "Linux for human beings" as it was advertised and more of the "Linux for Mac Users". It's filled with bloatware, and horribly now very easy to use. Unlike Ubuntu, which practically works right out of the box, Arch Linux is light, but reliable and, ultimately customizable. It will be harder to set up, but more rewarding in the end.

As a matter of fact, you can use this post as some sort of a guide if you're planning to dual-boot Windows 7 and Arch Linux on a single hard disk drive. To avoid repetition, I'll post my laptop's specifications here.

IBM Thinkpad x60s
Age: 5(?) years
Intel Core Duo L2400 x86 (32-bit) @ 1.66Ghz
2.25GB of RAM
250GB Seagate 5400RPM HDD

(NOTE: If you have multiple hard disk drives, this will not cover your needs. However, I heard that multi-booting using multiple HDDs is easier than just using one HDD.)

(NOTE: I will not be covering how I backed up my data, as that wouldn't be too hard to do.)

Phase one: Setting up partitions



The first step would be repartitioning the hard disk. Take note that you will not be able to do this in the Windows 7 DVD, as it is really only limited to creating NTFS partitions of its own. To do this, you will need the GParted live CD, or you could use an Ubuntu Live CD, as they have GParted inside.

(NOTE: I have first attempted to repartition my drives on the Ubuntu 10.10 (Maverick Meerkat) Live CD, but GParted crashed shortly after the process and I could not get back to GParted just to check if everything was alright. I ended up using the Ubuntu 10.04 (Lucid Lynx) Live CD instead.)

After booting from the Ubuntu Live CD, I went to System->Administration->GParted. There, the filesystem table of my hard disk drive is shown. I deleted all the partitions, and then repartitioned them as:

/dev/sda (This is my HDD)
-> /dev/sda1 40GB NTFS (Windows 7)
-> /dev/sda4 30GB Extended (Arch)
-> /dev/sda5 10GB ext4 / (root)
-> /dev/sda6 2GB linux-swap (swap for Arch)
-> /dev/sda7 (the rest of /dev/sda4) ext4 /home
-> /dev/sda3 ~180GB NTFS (storage)

(NOTE: /dev/sda2 is used by Windows 7 as another partition, probably used for system restore. It is always 100MB in size, and takes up a partition in your HDD. There are, however, workarounds in removing this partition, if you plan on triple-booting.)

After successfully partitioning my hard disk drives, I prepared my Windows 7 Home Premium DVD (this is genuine, by the way, set me back Php5,500) to reinstall Windows.

Phase two: Installing Windows 7



I actually thought of installing Windows XP instead of Windows 7, as I enjoy XP better with its flexibility and being easily customizable (not to mention being completely compatible with LiteStep). But since that would mean tossing away five thousand pesos, I've decided to just continue with Windows 7. At least it's shinier.

Installing Windows 7 is a pretty straightforward process. It's particularly idiot-proof, so it's not really difficult. You can try to format your NTFS drives again here in Windows 7 (as it does the job better, I think), but take care not to touch the Linux extended partition. It will appear to Windows as blank and unpartitioned, but do not touch them or you will have to repeat phase one again.

After installation, I checked if my storage drive was present. It appeared in Windows as D:\, so I went ahead and created folders that would be shared by Windows and Arch (Photos, Music, Videos, Downloads, Games, etc.) and set the Windows Libraries to the location of the custom folders. Then I rebooted and inserted the Arch Linux Installation CD.

Phase three: Installing Arch Linux



The installation of Arch Linux is really different from Ubuntu's. In Ubuntu, you just input some information about yourself (location for UTC time, keyboard layout, etc.), and just let the setup do everything else for you. In Arch Linux, there is a semblance of a GUI setup present, but it's more of a list of everything you need to do before you copy the base files of the OS. Since describing everything I did during the installation would take too long, I suggest you consult the Arch Linux Wiki's Beginner Guide and the Official Arch Linux Install guide to get started. I won't be discussing how to use the Arch Linux installer, I'll be discussiing what I did after installing.

(NOTE: If you are just starting out with Linux, don't choose Arch as your first distro. It's difficult, and it's build primarily for Linux users who wants to know what's going on inside a Linux system. Ubuntu is primarily a good choice for those who are just starting out in Linux.)

After installing, I was transported back to the basic CLI terminal. I logged in as root (as there are no user accounts yet), and created a user account for myself. Using pacman (Arch Linux's PACkage MANager), I installed sudo (super use do, gives temporary root privileges for a command), the alsa mixer (for sounds) and the X Window Manager (xorg). As I want my Arch Linux setup to be minimal and un-shiny as possible, I've opted to install LXDE as my desktop environment, which turned out to be quite a pain to setup, so I removed it and installed the more familiar XFCE DE instead.

Right after installing my desktop environment of choice and starting X (using startx), I was greeted with the empty XFCE desktop. The extra packages that come with XFCE4 was not present, so I installed them using pacman. I also installed and configured ntfs-3g, which provides stable NTFS reading and writing, so now Arch can mount, read, and write to and from the two NTFS partitions in my hard disk.

Setting up my wireless network connection was the hard part. Although I was spared of having to find the drivers for my wireless device since the Arch repositories have them, managing the device itself was a pain. So far the method I used was through the CLI network management tool, netcfg. I added various network profiles like home (connecting to my home Wlan), home-eth0 (for connecting to my home ethernet), and others, which will make connecting to networks with profiles easily by just typing "sudo netcfg " to a terminal. Of course, this sucks if I am travelling and have to find a network to connect to, because I will have to manually scan and add a profile for that new network. But it works, and that's what matters.

Phase four: Restoring backups



This is pretty easy. I just move my backups back to the storage drive. I installed whatever is necessary to Windows and have successfully synergized it with Arch. Now they are pretty much working with each other, although I must admit Windows is a bitch. Currently I am in the never-ending process of customizing my desktops to get my dosages of desktop deviance (and shininess).

Tuesday, November 16, 2010

A sad case of focus loss

It's been more than a month since I last wrote a post for Sulatang Tapunan. It's been a frustrating October for me, even though that was the month where my birthday sits on. My ability to focus on one task is currently unoperational, as I have been trying to train my mind to multi-task everything. The human mind is not really a multi-threaded machine, and trying to multi-task on it is like telling your dog to do a handstand while he eats his food. It's never easy nor comfortable.

I managed to grab some time to write to Sulatang Tapunan by eagerly anticipating the arrival of my copy of Borderlands: Claptraps Robot Revolution DLC, instead of wasting my time playing Call of Duty: Black Ops (not really implying playing CoD:BO is a complete waste of time, that game is kickass, it's just that I don't really achieve much if I play it). Also, I am trying to fully adapt myself to turn Xubuntu into my primary operating system, and just resort to using Windows 7 if some game could not be run by Wine. As a consequence I wouldn't be able to use Windows Live Writer, a very good blogging tool developed by the folks at Microsoft, which I use frequently to write to Sulatang Tapunan, for its smooth, intuitive interface that is very similar to that of Office's.

Although the smooth ribbon toolbars and aero transparency is visually appealing to the eyes, it is also very, very distracting. When I first encountered the Aero interface I was very dazzled by the incredibly smooth blurring and transparency of the windows, and I would exclaim in my mind, "Holy shit, how did they do that?". My amazement was short-lived, though, as I quickly found ways to replicate the same effect in Windows XP, and more recently in a Linux Desktop Environment.

I wouldn't even dare go back to Blogger's default web editor either. Trying to work in a web browser is very dangerous to your concentration, especially today where my browser has an average of 30 tabs lying around (all sorted cleanly and beautifully by the way), waiting for me to click them, scan them, then maybe use my middle mouse to spawn more of them, until I become so absorbed in clicking that I forgot what I was doing. I came across a post in Lifehacker one day and found some great options for distraction-free writers. Distraction-free, as in, I am not given a beautiful GUI to work on, but rather, a dark (it could also be bright) void, waiting for me to type in my words. I chose TextRoom because, (1) it works on Linux, (2) It's as minimalistic as it could get, (3) It looks like it's based on Q10, another distraction-free writer, which is also great.

My color scheme is light grey on black, my favorite combination of monochrome, as it sorta looks like a xterminal. I don't really need formatting as I work, I can just do that later if I wish. Maybe I could also just lay out the HTML for the whole post and add formatting there, though, I would have prepared the pictures I'm going to include first before I finish up.

Other areas of Focus Loss



I'm also losing focus in physical activites, like how I get to jog less often, because I'm too busy either absorbed in studying, coding, or just playing around. It's horrible. Everything I do everyday now is quite unplanned and if this continues on I would be in serious disorganization. There's plenty of things I should keep up with, like my writing, my exercise, instead of just coding and playing around.

I don't even enjoy social networking, but look at me, I'm probably more disorganized than them. Maybe I should just stop lurking around on the Internet too much.

Monday, September 27, 2010

Result of no-protection XP challenge

When I installed Windows XP on a virtual machine on my laptop some time ago, it wasn't just because I want to experience nostalgia from using old OS'es, it's also to challenge my resilience on security and protection.

How does this challenge work? It's easy. I will never install any anti-malware software on my computer for some weeks or so. Additionally, since my copy of Windows is not genuine at all, it won't receive important security updates from Microsoft, so that's another layer of protection removed. Then I would do whatever I always do online. Trolling, researching, reading the news, maybe even download some pr0ns for...safekeeping. So there. I'll go out in the wild without anything watching your back for a few weeks, then I'd download Trend Micro House Call to scan for malware that came through.

Why did I use XP? Because with all the Windows versions I've used, XP was the most vulnerable, wherein I had way too many run ins with malware in the past. I believe XP is the most vulnerable operating system out there when it comes to malware. It's like a Thai prostitute - ugly and full of viruses. The only advantage XP has over its successors is that it uses way less resources than Vista and 7. So there.

Of course, I took every security precaution available. To safeguard myself against keylogging, I used LastPass to encrypt my logins and on-screen keyboards while inputting usernames and passwords. I even used Tor so that those tracking websites won't be able to remotely view my geolocation.

Results



House Call just finished scanning my computer for malware, and it found something. Great thing is, it's alone, and it's just some regular adware that I probably got from browsing pornographic websites (you know those popups of Adultfriendfinder and other sites? They give you that). The file detected was cmdow.exe, and its corresponding threat was, according to Trend Micro, ADWARE .0737EEDD. According to the data in the link, this spyware does nothing but take my browsing history and send it somewhere for marketing purposes. Well they're in for a big surprise then.

Also, cmdow.exe, according to further Googling, is not originally a fatal binary file, but a tool designed to modify commandline windows, such as not allowing the user to close the window (because some users freak out at the sight of an ugly DOS-prompt and close it immediately, hampering some installation procedures in the process). However, in this case, I don't recall having to use this, and I don't really need it, so I just removed it.

I also managed to install and run Malwarebyte's Anti-Malware (an excellent software, I might add), which managed to snag a trojan executable and a dangerous registry value. Also, it detected three potentially dangerous security settings, which was the Windows Security Center being turned off, but I intentionally set it that way for this challenge.

After a quick system reboot, I decided to run a scan again, just to be safe. I won't be posting any more details and its results, because that would be a waste of time.

Conclusion



  • It is possible to be malware-free without some sort of security software

  • Windows XP is very vulnerable to attacks

  • Virtual machines are probably the best way to protect yourself against malware, by using a fake OS as a shield