Ketil Froyn's blog

Main blog

Wed, 09 Sep 2009

Installing Debian Lenny on a Dell 1950 III - Remotely

I decided to reinstall a server today, and wanted to install Debian Lenny (5.0.3) on a Dell 1950 server. The challenge was that the server is somewhere else. But fortunately, I have a DRAC5 card set up, so I can get remote console and reboot when necessary, etc.

First of all, the server was running windows from before. I used VMware Converter to back up the entire computer, and consolidate it onto another VMware system. (Now I just need to find out how to convert VMware images to Xen images).

Next step was to install Debian. I followed the instructions at to install from PXE boot, except that I used Lenny packages and amd64 architecture, available at I downloaded all files and subdirectories from here into my /var/lib/tftpboot directory, and did the following for internal references between files to be correct during install:

cd /var/lib/tftpboot
mkdir debian-installer
cd debian-installer
ln -s ../ amd64

Then I booted my Dell server, making sure to select PXE boot by hitting F12 on the remote console at boot time. The installer started, but then I ran into the problem described at Argh! So now I also need to insert a flash pen (or something) with some files during the install.

After a lot of trying and failing, I found the following:

But as you have guessed, I had to create a Virtual Flash image file, which I later uploaded using IE8. I had to do that, because I don't have hands-on access to my server (without paying for it). So to create the necessary virtual image file, I did the following. You can maybe skip a step or two, but this worked for me.

dd if=/dev/zero of=flash2.img bs=1M count=4
/sbin/fdisk flash2.img
> x
> c
> 2
> r
> n
> p
> 1
> 1
> 2
> t
> b
> w
losetup -f flash2.img # From here, I assume you also get loop0. If you're not sure, be VERY careful from here...
mkfs -t vfat /dev/loop0 # apt-get install dosfstools if you don't have mkfs.vfat
mount /dev/loop0 /mnt/tmp
cd /mnt/tmp
cd /
umount /mnt/tmp
losetup -d /dev/loop0
Following this procedure, the file flash2.img was an acceptable flash image that worked when I uploaded and enabled it on the Dell DRAC5 card during the Debian install.

But of course, that's not all. After finally installing Debian, and rebooting, the system won't boot. Apparently, partition and disk configurations are wrong. I had to edit the GRUB boot command line, and change root=/dev/sdc1 (which was wrong) to root=/dev/sda1. When the system boots, edit /boot/grub/menu.lst, changing all entries of sdc1 to sda1. Also, edit /etc/fstab, changing references to sdc to sda.

Finally I have a system that boots each time I try (so far, anyway). It wasn't plain sailing, but now I know how to remotely reinstall a Dell server with Debian Lenny. :)

posted at: 16:40 | path: /2009/09 | permanent link to this entry