Windows 7 Backup & Restore

I had my first disk failure this week of my Windows 7 laptop hard drive. Fortunately I’ve been using Windows 7 Backup, and all I had to do was plug in the external USB drive with my backups to another machine, boot off the Windows 7 installation CD, and select ‘Repair…’ using the latest system image from the USB drive. Even restoring a system image from a Dell Latitude to a Toshiba Tecra (with the same sized drive and dual core x64 CPU) was painless, all the necessary drivers were changed automatically with no fuss. The only problem was reestablishing trust with a Windows domain, which was worked around by changing the computer name and re-adding to the domain. The default Windows 7 Backup configuration is to create a system image and backup all files in Libraries, which works just fine for me.

Portable PuTTY

Not unusually I work on both Windows and Linux systems, using SQL Server on Windows and Oracle on SuSE. I use Windows as the primary operating system on my workstation because I have greater confidence it will have driver support for devices like built in broadband wireless. Nonetheless I need to SSH regularly into Linux boxes to do administration and script development so I use Xming and Portable PuTTY.

Configuration options are stored in ‘session files’ located in in %appdata%Portable PuTTYsessions.  They contain name value pairs like the following:


The session files may be edited directly, and this appears the only way to update the UserName setting for an SSH autologin, but this approach is unsupported and a corrupted session file is ignored without warning.

To create a shortcut that loads a PuTTY session set the start location to “%appdata%Portable PuTTYsessions” and append a -load parameter to the target invocation.


Like many enterprise developers I use both Windows and Linux. Sometimes I really want to be able to use POSIX text processing tools on Windows, for example when troubleshooting pipe delimted data files used in batch system interfaces. I often have to research issues with pipe delimited transaction logs, and awk can be used to filter out the records of interest, eg.

awk -F| '($3==276||$3==259) && $5=="Payment " { OFS="|"; print $0 }' < transaction_log

Using a command line text tool like this can be much more efficient than importing text files into Excel for filtering. Other text tools I use heavily include find, grep, sed, tr and wc.

POSIX tools for Windows include SUA (aka. Interix, aka. SFU)  and MKS toolkit but I prefer Cygwin or Cygwin/X

Under Cygwin I used to use rxvt, but now I’ve switched to mintty which is similar to PuTTY. X can be started from a mintty session as follows:

xwin -multiwindow -clipboard

Trac on Solaris

Trac is a web-based software project management and bug/issue tracking system. Example publicly accessible sites that use Trac include

Getting Trac installed on Solaris 10 is easy, see Question is, what next?

Blastwave packages are installed below /opt/csw (csw = Community SoftWare). /opt/csw/share/doc/trac/INSTALL provides the next steps. I used:

trac-admin $tracenv initenv
tracd --port 8000 $tracenv & # no authentication
firefox http://localhost:8000/trac

For a small number of users the tracd standalone server is good enough. Authentication can be managed with htdigest on Solaris 10 thusly:

/usr/apache2/bin/htdigest -c $tracenv/conf/users.htdigest fred

Tracd can then be started like this:

nohup tracd --port 8000 --auth *,$tracenv/conf/users.htdigest, $tracenv &

To change the logo upload the new logo to /opt/csw/share/trac/htdocs and modify trac.ini

link =
src = common/mylogo.png
descr = My Trac
footer = Visit the Trac open source project at
icon = common/trac.ico
name = My Project
url =

Trac is much easier to administer with the WebAdmin plugin, which for Trac 0.10.4 requires downloading and installing from source:


To get started a Trac administrator has to be empowered:

trac-admin /var/opt/csw/trac permission add fred TRAC_ADMIN

To simplify account administration we’ll also try an account manger plugin


…and change /var/opt/csw/trac/conf/trac.ini

webadmin.* = enabled
trac.web.auth.LoginModule = disabled
acct_mgr.api = enabled
acct_mgr.htfile.HtDigestStore = enabled
acct_mgr.web_ui.AccountModule = enabled
acct_mgr.web_ui.LoginModule = enabled
acct_mgr.web_ui.RegistrationModule = disabled
acct_mgr.admin.AccountManagerAdminPage = enabled
password_format = htdigest
password_store = HtDigestStore
password_file = /var/opt/csw/trac/conf/users.htdigest
htdigest_realm =

Tracd can then be started like this:

nohup tracd --port 8000 $tracenv &

To manage custom fields we’ll add another plugin


…and change /var/opt/csw/trac/conf/trac.ini

customfieldadmin.* = enabled

VMware Timekeeping

A hopelessly inaccurate timeclock on my SLES host has been driving me nuts. I eventually found the relevant VMware white paper and used Virtual Center to set the ‘Advanced’ option to ‘Synchronize guest time with host’:

I also modified /boot/grub/menu.lst to add ‘clock=pit’ as an argument to the kernel invocation. Both changes required a reboot of the VM, but at least the issue is resolved now. Why on earth isn’t this option set by default?

Installing Subversion on Ubuntu

There are many ways to do it, but this incantation worked for me on an Ubuntu host. This is an ‘entry level’ setup with one repository and simple authentication. Read the Subversion book and Ubuntu documentation to understand.

su -
apt-get install subversion
adduser --system --home /srv/svn --gecos "System account to run svnserve" svn
svnadmin create /srv/svn
chown -R svn:nogroup /srv/svn

apt-get install xinetd
cat >> /etc/xinetd.d/svn << "EOF"
service svn
        port                    = 3690
        socket_type             = stream
        protocol                = tcp
        wait                    = no
        user                    = svn
        server                  = /usr/bin/svnserve
        server_args             = -i -r /srv/svn
/etc/init.d/xinetd restart

# uncomment line to use default password file (~svn/conf/passwd)
vi ~svn/conf/svnserve.conf

cat >> ~svn/conf/passwd << "EOF"
fred = *****
chmod 600 ~svn/conf/passwd

Installing Ubuntu Server 8.04 LTS Using LVM

The installation ISO for 8.04 LTS Server can be downloaded from

Ubuntu 8.04 was released in April 2008 and will be supported until April 2013. The 64bit version is recommended.

I installed Ubuntu Server on a VM with a 2GB drive and 512MB RAM.

The default hostname given during the install is ‘ubuntu’. Be sure to change it to something more distinct.

The installation offers LVM, and even encrypted LVM, but if you select them it does not actually install the O/S on an LVM partition. For that you have to enter manual partitioning. I created a 100MB ext3 /boot partition (GRUB does not support booting from an LV) and allocated the rest of the drive to a PV. ubuntu-install-partitions

Once the two disk partitions are created you can configure the Logical Volume Manager.  Allocate LVs for the various filesystems: at least 200MB each for / and /var and 250 MB for /usr (installing VMware tools requires more disk storage, a 350MB /tmp to untar the installation bundle and 600MB /usr).  I like using multiple separate filesystems because it reduces the risk that a runaway process will consume all available storage and render the system unavailable.  Using LVM helps make multiple filesystems manageable because it becomes much easier to extend a filesystem when you need to.


Ubuntu Server installation offers a minimal menu of packages to install.  I chose OpenSSH (OpenBSD Secure Shell) and PostgreSQL (v.8.3).  UFW is installed, but not enabled by default.ubuntu-install-packages

After installation my filesystem utilization looked like this.  ubuntu-install-df

To extend LVM based filesystems see, eg.

lvcreate --size 150M --name lv_tmp vg01
mkfs.reiserfs --label tmp /dev/vg01/lv_tmp

lvextend -L+100M /dev/vg01/lv_tmp
resize_reiserfs -f /dev/vg01/lv_tmp

Posts navigation

1 2 3
Scroll to top