Thursday, July 29, 2010

Reviving the Desktop

Been busy lately. The ~10 year old drive in my Phenom II box finally kicked the bucket (random chance whether BIOS would recognize it at boot, bad sectors galore, et cetera), so I bought a new one: A 1TB WD Caviar Black (WD10000LSRTL). I was a bit apprehensive shipping it from Newegg with all the horror stories of drive damage as a result of UPS' shipping procedures, so I opted for the retail packaging ($10 extra, w/o free shipping). The drive arrived, and was immediately plugged in so I could double check it's SMART attributes, as well as run badblocks on it to check for bad sectors and everything came back a-ok.

First a fresh copy of Windows 7 was installed (In a fit of rage, I formatted the NTFS partition on the old drive and turned it into an Ext4 storage partition). That went fairly without incident, save for the hours I spent finding and installing all the programs I use, updating drivers, et cetera. At this point I'm obligated to mention that whenever I install Linux, it takes me about 5 minutes to open a terminal and tell the package manager to download everything I need, and then I can go about my day until it finishes. In Windows, it takes significantly longer, especially with having to use your web browser to navigate to each program's site individually, and painstakingly sit through dozens of "Next, Next, Next, I Accept, Finish" install 'wizards'... But I digress. After all the programs were installed, as well as my full Steam game library, I let the disk defrag for a few hours. Defrag finishes, and I can get on with more important things; Namely, saving my Arch setup. I put way too much work into it with the compiz effects, my custom scripts, and everything else to just let it go to waste by reinstalling from scratch.

I used a fairly standard partition setup on the Arch box with separate /, /boot, and /home partitions. This was by far the easiest part of the day. I put both drives in the tower, and booted into whatever livecd I had lying around (I think it was the server edition of ubuntu 8.10) and mounted the partitions in the appropriate places. Then just copied everything over using the 'a' argument, which preserves the files exactly.

I.e.:

# mkdir /mnt/old /mnt/old/boot /mnt/old/home \
> /mnt/new /mnt/new/boot /mnt/new/home
# mount /dev/sda3 /mnt/new/boot
# mount /dev/sda5 /mnt/new/home
# mount /dev/sda4 /mnt/new/
# mount /dev/sdb3 /mnt/old/boot
# mount /dev/sdb5 /mnt/old/home
# mount /dev/sdb4 /mnt/old/
# cp -av /mnt/old/* /mnt/new/


Easy, peasy, and the box now runs fine (after making the appropriate changes to Grub's menu.lst and the fstab of course). Next in line is the netbook, which is going to get a fresh Arch install in time for LinuxCon (Currently running a rather useless Chromium OS since the wireless drivers are refusing to cooperate). Originally I was going to install Gentoo on it, but compiling on an Atom is a special kind of hell, and until I have the patience and the time to do it, Arch is a much better choice. Plus I can always use the Arch build system for the packages I'll be using the most.

No comments:

Post a Comment