Upgrading Debian 3.1 (Sarge) from an IBM Thinkpad 390E on a 4GB 2.5” IDE/PATA Hard Drive to Dell Vostro Core 2 Duo on a 320 GB SATA Drive

This machine was initially setup using the Debian 2.2 potato release and was upgraded using the dist-upgrade method and changing the sources to point to the current release at the time. This method was used to upgrade from 2.2 (potato) to 3.0 (woody) then to 3.1 (sarge). Then the server was left to it’s own devices with updates run every week or two until sarge was no longer supported. I just didn’t have the time nor inclination to fix it. I turned it off in October 2010 when I heard the hard drive whining.

During a work at home period where I could let processes run and monitor them while working I decided it was time to finally sit down and bring this install up to date.

I moved the hard drive to a 2.5” IDE USB enclosure I had purchased several years ago for upgrading notebook hard drives to larger sizes. I then plugged it into a ubuntu server I had setup as a replacement for this original machine. The drive threw error after error but I was able to image it with ddrescue. Since the source drive was only 4GB there wasn’t much data on the machine, I mainly used it as a sandbox and to real USENET with slrn. I also developed some small database driven sites.

ddrescue /dev/sdb image log

After imaging the drive I imaged an 80GB 2.5” IDE hard drive and expanded the / partition to 60GB using gparted. I moved this 80GB drive to another somewhat more recent Toshiba laptop, still over 5 years old though. It booted right up. I upgraded the kernel to the sarge 2.6.8 kernel and rebooted.

Now the fun begins. I edited the file /etc/apt/sources.list file to point at http://archive.debian.org/debian/ instead of http://http.us.debian.org/debian/. I then modified the release name from sarge to etch (4.0).

apt-get update

apt-get –u dist-upgrade

Run the updates and reboot and we’re running etch. I do the same by modifying the release name to lenny (5.0) and the sources back to their original valies and update again. No sweat. I then installed grub to replace LILO.

apt-get install grub

grub-install /dev/hda

update-grub

I then imaged the 80 GB 2.5” IDE drive to a 320GB 3.25” SATA drive and moved it to a Vostro 220 Core 2 Duo as the boot device. I booted up and the machine didn’t know what partition was what since we were moving from /dev/hda to /dev/sda with the switch in hard drives. I was dumped at a root prompt. I edited /etc/fstab and changed /dev/hda1 (and 2,3,4) to /dev/sda1 (2,3,4). I also edited /etc/grub/device.map and changed (hd0)   /dev/hda to (hd0)   /dev/sda.

After rebooting I noticed that not all the memory was being recognised nor was the second CPU. After some digging I discovered I needed to upgrade the kernel to a 686/bigmem kernel.

sudo apt-get install linux-image-2.6-686-bigmem

update-grub

reboot

I logged into the machine and all the memory and CPUs were recognised. Networking was not working for some reason and I noticed that eth0 was no longer an existing device, eth2 was there though. I edited /etc/network/interfaces and renamed eth0 to eth2.

ifup eth2

Started the interface and we were online using the old existing assigned IP address.

Now we are running with dual CPUs, 3GB of RAM and a 320GB hard drive. Quite an upgrade from 1.3ghz single core CPU, 500MB of RAM and 4GB of disk space.

Leave a Reply