Installed new operating system

At 11pm last night I decided to install the latest version of Ubuntu – version 8.10 Intrepid Ibex. I grabbed the 32-bit alternate installer disc iso yesterday. It took about 1.5 hours – that is including the time it took me to change the server the OS gets it updates from. I have changed the update mechanism to check my local Internode mirrors so it doesn’t cost me bandwidth when a big release comes out.

It went quite well – the only hiccup was when I tried to get it to install over my existing linux partition – I had to manually re-format the partition before it would over-write…

1100 rebooted pc
1101 reset boot order in bios to set dvd as first boot device
1104 setting hostname
1105 setting clock and city
1110 erasing data on existing linux partition
1115 reformat linux partition due to “can’t delete base system files” error
1116 installing base system…
1118 default user account name = <MyUserAccountName>>
1119 user = <<MyUserName>>
1120 pass = <<MyPassword>>
1121 private passphrase = <<MyPassphrase>>
1123 scanning apt mirror
1125 select and install software…
1128   … 6%
1132   …25%
1135   …43%
1138   …60%
1145   …80%
1148   …84%
1150   …93%
1151 installation complete – first reboot
1152 test grub install worked ok – booting into windows…
1157   …everything AOK – rebooting back into Ubuntu 8.10
1159 password entry screen – login
1200 “Software update available” popup … [ignored]
1201 changing apt to use internode’s mirrors…
1211   …done – sudo apt-get update…updating
1213   …updates complete
1214 “Software update available” popup…
1217   …verified updates downloading from internode
1218   …7 minutes remaining
1225   …applying changes
1228   …system restart required
1229 TADA!

After this I had to make some small changes – the first being to allow users to have blank passwords – I needed my five year daughter to be able to login simply be selecting her login icon (barbie princess) from the gdm login screen.

Relax password rules so some users can login without password

Google helped me find this page which detailed a few shell commands that needed to be done to relax the default passwords complexity rules:

Remove the password for the user with username ‘myUser
open a terminal
– sudo passwd -d myUser

Authorize login with no passwords in gdm
– sudo sed -i ‘s/#PasswordRequired=false/PasswordRequired=false/’ /etc/gdm/gdm.conf

Authorize login with no passwords in pam
– sudo sed -i ‘s/nullok_secure/nullok/’ /etc/pam.d/common-auth

Set pictures on login screen for users

This was easy, for each user I logged on and selected System > Preferences > About Me. From here I only had to click on the default picture in the top-left of the screenand select a picture.

How to back up a windows installation

Now that I have installed winXP I think it’s time to back it up.


~$ sudo time dd if=/dev/hda1 ibs=4096 | bzip2 -v --fast | split -a 2 -b 1024m - winxpsp2.img-part-

[Verify backup files]
~$ md5sum /dev/hda1

~$ cat winxpsp2.img-part-* | bunzip2 | md5sum

~$ sudo time cat winxpsp2.img-part-* | bunzip2 | dd of=/dev/hda1


The dd command seems to be the way to go, but it backs up empty space as well, so I am using the compression tool bzip2 to ensure I don’t waste too much space. I’ll be storing the backup files on my network file server share.

First I’ll have to mount my file server shared directory:
~$ sudo mkdir /media/fileserver
~$ sudo mount -t smbfs //server01/shared /media/fileserver -o username=WindowsUserName,password=WindowsPassword

This command failed with the following error (grrr):
smbfs: mount_data version 1919251317 is not supported

After a quick google session I found that it means the smbfs package is not installed. I installed smbfs via: sudo apt-get install smbfs then executed this again:
~$ sudo mount -t smbfs //server01/shared /media/fileserver -o username=WindowsUserName,password=WindowsPassword

Now we are ready to backup not just the windows installation, but the entire partition that it is installed on.

The command to back up the partition is:
~$ sudo time dd if=/dev/hda1 ibs=4096 | bzip2 -v --fast | split -a 2 -b 1024m - winxpsp2.img-part-

Where sudo time dd if=/dev/hda1 ibs=4096 means:

sudo Super user do. That is, do the following command as the root user.
time Report how long the commands took
dd Disk Dump (as far as I know)
if In file
/dev/hda1 A reference to the partition that has windows on it
ibs Input byte size. That is, read 4096 bytes at a time

The results of the above commands are then piped into the bzip2 compression tool where bzip2 -v --fast means:

bzip2 Name of compression program
-v Do verbose logging (a bit pointless when piping – it really shouldn’t be there)
–fast Do fast compression. basically means it’s compressing smaller block sizes, which leads to sub-optimal compression. 7.5GB is still going to take about 2 hours on my AMD 2500+ CPU

The output of the compression tool is then piped (yet again) to a tool called split that splits large files into smaller ones. It uses the following syntax split -a 2 -b 1024m - winxpsp2.img-part- where:

split Name of splitting program
-a 2 The number indicates how many suffixes to use in the output file name. Say I split a large file into 3 pieces. I can use -a 1 to give me three files called filea, fileb and fileb. Using -a 2 would result in three files called fileaa, fileab and fileac.
-b 1024m Indicates the maximum size of each split output file – in this case 1024MB (1 gigabyte)
– winxpsp2.img-part-: The first dash means read from standard input (or piped input – same thing really). Usually you could put the name of a file to split. The ‘winxpsp2.img-part-‘ bit means to name each file winxpsp2.img-part- followed by the specified amount of suffices. In this case winxpsp2.img-part-aa, winxpsp2.img-part-ab, … winxpsp2.img-part-ah.

Eventually I guess I’ll do something silly and trash Windows XP. If that is the case I should be able to restore it by:
~$ sudo time cat winxpsp2.img-part-* | bunzip2 | dd of=/dev/hda1

Tada! A brand new windows installation in mint condition.

Backup/restore your MBR

I am going to re-install windows soon.

I haven’t done it in years, and the amount of cruft that has built up over that time has slowly increased. I am usually pretty on the ball regarding system maintenance and hat not but some things have recently started to go quirky on me. Typical stuff like general unresponsive system, Skype won’t recognise my microphone, even though I can hear it coming through the speakers, blah blah.

The only problem is that I have Ubuntu installed on the first partition and Windows installed on the second. Windows has little respect for the master boot record (MBR), and will happily overwrite it when I re-install, so I need to do something so I can restore the MBR back to it’s original state after the Windows installation.

Use disk druid and a live-CD:

  • Backup: $dd if=/dev/hdx of=MBR-backup bs=512 count=1
  • Restore: $dd if=MBR-backup of=/dev/hdx bs=512 count=1

Alternatively just use a live-CD in rescue-mode and use grub-install to fix it up for you! (Details provided on same page as previous link – first comment)

Making Ubuntu wife-friendly

At home the study PC is used by the entire family. We all share the same account. I’ve been getting quite into Ubuntu for quite some time now, the only thing stopping me from moving entirely to Ubuntu is the wife factor.

  1. Email clients are different.
  2. Everything looks different.

Our windows email client is Eudora. While it’s in the process of being open-sourced there is still no linux client. The reason we don’t just switch is due to the history. We’ve got 5+ years of emails, attachments and addresses stashed away in Eudora that I am not sure how to port over to something like Thunderbird.

So, in the meantime I’ve installed Ubuntu 7.04 (aka Feisty Fawn) – desktop edition to another partition and have settled on dual-booting until I can get these things sorted out. I am slowly working on problem 2 – Everything looks different…

I found a post on whirlpool that mentioned some of the things I was thinking – like xpde an xp theme for Ubuntu. But I didn;t like xpde, and figured I could come up with something that was more like the theme we use at home.

One guy mentioned replacing the Ubuntu menu icon with a more windowsy start icon.


The Ubuntu logo icon is called ‘distributor-logo.png’ and right now 95% of themes and icon sets are unaware of it as it has just been introduced. This will change. But for now, just replace it. Either globally (/usr/share/icons/hicolor/48×48/ap­ ps/distributor-logo.png) or per-user (~/.icons/name_of_your_current_ico­ n_theme/somedir/apps/gnome-main-menu.ext).

So I made one. Tada:

You can probably guess that I am a fan of Windows 2000 themes. We still use Windows 2000 at home, and I dislike the XP theme enough that I switched my work PC back to the Windows 2000 look’n’feel asap.

Update (7 March 2008)

I managed to get linux and windows reading the same profile information so they could share the same emails and address books. One way to do is outlined here, but I found an even easier way:

  • Install Thunderbird on first OS
  • Make sure your profile is stored on a partition that can be read by both windows and linux (ie a FAT32 partition).
  • Check everything is still AOK in first OS
  • Reboot into your other OS and open Thunderbird using the “-P” parameter to ensure the profile is asked for.
  • Point it to the funny named directory (something like 1a2s3d4fg5.default).
  • Tada! Your alternate OS can read and share the same email  and address book.

Worked a treat for me.

Installed Ubuntu Feisty 7.04

I finally installed the latest version of Ubuntu on my desktop PC. Granted, it’s still dual-boot with windows, but it’s now there. I am typing this in a Feisty Firefox session. Yay.

It took about 25 minutes for the installation to complete. Not bad. I am now installing updates – 147MB…

I am hoping my machine can handle Beryl.

breezy to dapper – I borked it!

Uh oh – I borked my dapper dist-upgrade. Whilst the upgrade was underway I was prompted a few times with “overwrite this file?”, “overwrite that file?” questions. Seems like I stuffed it…

Below is just a little reminder of where my windows boot loader is for when I do a clean install of Ubuntu Dapper 6.06 LTS:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows 2000 Professional
root (hd0,0)
chainloader +1

I got a new puppy (Puppy Linux that is)

Cruising the net the other day I saw that Puppy Linux had a two point zero release. I had tried Puppy a long time ago, and whilst inpressed with it power-to-weight-ratio, it just didn’t have enough good stuff to keep me interested.

I fired up Virtual PC and booted a virtual PC from an ISO of the puppy2.0_Opera version. It looked pretty sweet and was quite responsive. I then ran the HDD installer. It was brain dead easy. After a ‘reboot’ – remember this is on VirtualPC – I was running it as a dedicated Puppy installation.

First thing to do was download Firefox 1.5, install IceWM window manager plus some nice themes. All this was done via the DotPup ‘package mgmt system’. Made it very easy. This quick test convinced me that I was ready to take the next step… Install Puppy on my aging laptop. The specs of the laptop:
– Acer TravelMate 512T
– 333 MHz CPU (Pentium II Celeron)
– 64 MB RAM
– 4 GB HDD
– Synaptic touchpad
– Ethernet via PCMIA
– Video 800×600 16 bit colour

I wasn’t holding out much hope for recognition of the touchpad and ethernet adaptor, but everything had been so promising that I thought it was worth the effort. Worst case scenario was that my junk laptop remained a junk laptop. If all worked well my junk laptop would once again be a contributing member of my nerdly pursuits.

Double thumbs up!! I am typing this in my loungeroom while TOWMBO is playing games on the PC in the study. I can’t believe how repsonsive this piece-of-crap laptop is. Granted it’s only being used for web surfing and perhaps emergency work for Word/Excel/Email stuff, but for a laptop that is several generations behind it’s use-by-date I am very impressed.

Only one thing wrong with this install that I have not been able to figure out. When I go to shut down or reboot I get the shell is all blue. The background is blue, the text is blue. Makes it very difficult to see what I am typing. It’s kinda bizarre – after selecting “Start > Logout > Shutdown” I still have to type “poweroff” in the shell to poweroff, and then that stops the HDD and CPU (I think) but I still have to hit the button to REALLY turn the PC off. But I havent really started looking for a solution to that yet, it may be that I have selecteed a dodgy video mode…

Overall I am totally impressed with Puppy Linux 2.00 release. Fantastic stuff. My laptop has a new lease of life and I am thinking of installing on my folks PC when they next ask me to “fix” it.