Installing Ubuntu Intrepid Ibex on my ASUS P5KPL-AM with UNetbootIn

(This document is at http://canonical.org/~kragen/unetbootin.html.)

I downloaded unetbootin_304-4_i386.deb from SourceForge and installed it on my Debian Etch laptop with dpkg -i, which required that I apt-get install libqt4-gui libqt4-core first. Then I ran unetbootin to create a boot-install image on my USB key, selecting “Ubuntu → 8.10_NetInstall_x64”.

I’ve previously described the hassles of booting from USB on the P5KPL-AM but one thing I hadn’t realized was that every time you power-cycle the machine or boot it without the USB key, it forgets that you wanted to make it “Force FDD” on the USB device.

The USB key thus created doesn’t actually boot successfully. Each time the boot countdown finished, it would restart. I hit Esc to get to the boot: prompt and typed unetbootindefault and hit Enter; this explained that the problem was, “Could not find kernel image: /ubnkern”. Other people have successfully booted from USB and done installs with this version of unetbootin; I don’t know why things are different on my machine.

I changed the syslinux.cfg file to be much shorter:

default ubnkern
append initrd=ubninit

That got it to boot the kernel and start the install. Unfortunately the AMD64 (“x64”) boot image fails to get DHCP (or ping the default gateway when manually configured), but the i686 version works fine, except that it is going to install a 32-bit operating system. (dmesg says it’s using the r8169 driver, which I’m pretty sure is what the 64-bit one is using too. The 64-bit kernel can detect the link going up and down; it just can’t pass packets.)

Fixing GRUB

After the install finished, the disk would fail to boot; I just saw a blinking underscore cursor on a black screen when I tried to boot it.

I booted again from the USB stick, and after it got to the point where it had figured out that I had a hard disk, I went to the second virtual console (Alt-F2) and hit Enter to get a prompt. Then I did something like the following (from memory):

mkdir /foo
mount -t ext3 /dev/sdb1 /foo
mount -t proc none /foo/proc
mount -t sysfs none /foo/sys
chroot /foo /bin/bash
/etc/init.d/udev start
grub-install /dev/sdb

At this point I noticed that grub-install was saying, Installing GRUB to /dev/sdb as (hd1)..., but that was wrong. The disk will be the first one in the system when GRUB tries to boot off of it, so it should be (hd0), not (hd1).

So I edited /boot/grub/device.map, which said

(hd0)   /dev/sda
(hd1)   /dev/sdb

so that it said the opposite:

(hd0)   /dev/sdb
(hd1)   /dev/sda

and ran grub-install /dev/sdb again. This time it said, Installing GRUB to /dev/sdb as (hd0)..., and thereafter it worked correctly.