Featured Posts

SciPy 2008 - Software & Tools STATUS: Day 1 - Thursday: Concluded. Day 2 - Friday: In progress. Astronomy: Enzo [ home ] yt (related to Enzo) [ home | scipy ] Books: Computational Modeling and Complexity Science...


An example of checking out a git tag using Qt 4.6.0... Clone the Qt repository: $ git clone git://gitorious.org/qt/qt.git Show available tags: $ git tag -l output: v4.5.1 v4.5.2 v4.5.3 v4.6.0 v4.6.0-beta1 v4.6.0-rc1 v4.6.0-tp1 Checkout v4.6.0: $...


Building 64-bit/32-bit Debug&Release Universal Build... See my directions on checking out Qt 4.6.0 from the git repository if you do not already have the source code. Launch a Terminal and cd to the source directory. Run configure w/ 64-bit & 32-bit...


  • Prev
  • Next

Evil Spammers

Posted on : 28-08-2007 | By : Brandon W. King | In : Computers/IT, Linux, Systems Administration

Tags: , , ,


Those evil spammers figured out I had misconfigured my postfix smtp configuration before I did and they started using my server to forward spam! The configuration has now been fixed, but I wanted to point out a useful link on setting up postfix smtp authentication using sasl:

How to force SMTP authentication in postfix by Kevin Bailey

Multi-thousand dollar experiment… Where did D:\ go?

Posted on : 24-05-2007 | By : Brandon W. King | In : Computers/IT, Error Fixes, Stories, Systems Administration

Tags: , ,


Nothing like a little pressure to get you going in the morning. I came in to work today to find out someone had started an Affymetrix experiment but the analysis software would not start. About 2 hours were left before the experiment had to be run or it would risk the quality of the experiment and then would have to be repeated.

The problem… The 2nd hard drive which contained the analysis software was not being recognized by Windows. In comes Kubuntu live CD. Turns out the partition table was empty. I ran smartmontools to make sure the drive was still alive and it was. I tried running gpart to have it guess what the partition table should be and had it write a new partition table. Upon rebooting into windows the D: drive was visiable in My Computer, but it wanted to reformat it when I double clicked on it. Nice of windows to offer to reformat my drive isn’t it? Oh right, it has data on it that I want. Reboot back into Kubuntu… mount -t ntfs /dev/sdb1 /mnt… Hey, what do you know, all the files are still there. Kubuntu reading NTFS drive and Windows won’t… How ironic?

Any way, time was running out for the experiment, I knew the data still existed on the D: since Linux could read the data now… The thought came to my mind, maybe the partition table is wrong? So, I stumbled upon testdisk… testdisk /dev/sdb y done. I rebooted and Windows now could read and write from the D: drive again.

Purpose of this post: To remind myself and others to try testdisk when trying to fix a corrupted partition table. (Debian/Ubuntu(Universe): testdisk package)

Rescuing a Linux installation

Posted on : 30-01-2007 | By : Brandon W. King | In : Computers/IT, Error Fixes, Linux, Systems Administration

Tags: , , , , , , ,


In an attempt to save a system without doing a fresh reinstall by copying the contents from dying hard drive to new hard drive using external hard drive enclosure. This method seems to have worked well for me. I’m posting it as reference so others have a guide to work from and improve upon. I have only used this method once so make sure you know what you are doing if you follow the guide.

WARNING: Use the following formation at your own risk. Make sure you make proper backups. The following information may have errors or may not work properly and could possibly damage your system or cause the loss of data. Once again, use the following at your own risk. Research how to use each individual command so you know what you are doing.

Guide to moving a Debian or Ubuntu Linux installation from an old hard drive to a new hard drive without re-installing.

  1. Attach external hard drive
  2. Reboot computer into single user mode (i.e. rescue mode)
  3. Find the new device of the external hard drive (probably sda or sdb) dmesg | grep hd; dmesg | grep sd
  4. create new partions on new drive: fdisk /dev/sd(a,b, etc.)
    1. create swap partition
    2. create linux partition(s)
  5. initialize swap: mkswap
  6. create filesystem (I’m using ext3): mkfs.ext3
  7. Mount the new hard drive (referred to as /dev/sda2 from now on): mount -t ext3 /dev/sda2 /mnt
  8. Use debootstrap to get base install (ubuntu edgy example): debootstrap edgy /mnt http://us.archive.ubuntu.com/ubuntu
  9. Now the copy command: rsync -av –exclude=/dev –exclude=/sys –exclude=/mnt –exclude=/proc –exclude=/media / /mnt
  10. Make partition bootable: fdisk /dev/sda2 # use the ‘a’ option
  11. Shutdown system and put in the new drive.
  12. Get Grub working again:
    1. Insert Ubuntu or other Debian based live CD (Knoppix is a good choice too).
    2. Mount the new drive: mount -t ext3 /dev/hda2 /mnt
    3. Install grub: install-grub –root-directory=/mnt /dev/hda2
    4. chroot into new drive: chroot /mnt
    5. edit /boot/grub/menu.lst
      1. Update groot(hd0,) #if bootable partition changed (i.e. Was /dev/hda5 is now /dev/hda2… Old: groot(hd0,4) New: groot(hd0,1)
      2. Update kopt=root #if bootable partition changed (i.e. Was /dev/hda5 is now /dev/hda2… Old: kopt=root=UUID= or kopt=root=/dev/hda5 New: kopt=root=/dev/hda2 (NOTE: There is probably a way of getting the new UUID of the new partition, in which case you can just update the UUID option, but I don’t know enough about this yet to offer advice… Feel free to post a comment if you know more.)
    6. type: update-grub
  13. Reboot and hope everything works properly.