From kragen at canonical.org Sun Jan 18 02:19:31 2009 From: kragen at canonical.org (Kragen Javier Sitaker) Date: Sun Jan 18 02:19:32 2009 Subject: installing Ubuntu on my new Asus P5KPL-AM (not yet successful) Message-ID: <20090118071930.GA30083@canonical.org> I decided I'd better get a new machine; my current laptop ("thrifty") is 10 years old. So I bought an Asus P5KPL-AM motherboard, an Intel Celeron E1200 1.6GHz dual-core processor (really a slow Core Duo with 512kB of cache), a 2GB DIMM of Kingston DDR2-800 RAM, a cheap-junk power supply and USB keyboard, a 500GB SATA disk, and a 1280?1024 LCD monitor. No case yet. At this point the total cost is roughly US$400. So far I haven't been able to get anything installed on it due to lack of suitable install media. Here is a list the significant mistakes I know I have made so far: - ATX 12V power supplies require that you connect *two* power cables to the motherboard, the big wide one and the little 12V square one. Just one won't make it boot or even POST. - I spent far, far too long actually buying the thing, in parts. Assembling the parts was easy and fun (aside from the problem above), but comparison-shopping for them really sucked. - I probably should have just bought a CD-ROM drive instead of trying to do the install from a USB key. - I tried to use various automated programs to make a bootable USB key instead of doing it myself. Given a USB key already partitioned with a single FAT16 partition, you just need to `syslinux /dev/sda1` and copy an Ubuntu `vmlinuz` and `initrd.gz` onto it and put this in `syslinux.cfg`: default vmlinuz append initrd=initrd.gz However, I don't currently have a working flash drive large enough to load an Ubuntu install CD image from, and for whatever reason, the Ubuntu `initrd.gz` doesn't automatically load the Debian Etch netinst ISO I put on the flash drive. Here are some obstacles I've run into: - The 2GB Kingston/Trend Micro flash key I bought for this purpose for AR$49 (US$14) doesn't actually work. I'm currently using Beatrice's 256MB flash key. - The `liveusb` package doesn't work because of a variety of bugs; as mentioned before, I should have just done it myself. - However, it took me a while to find that out, because there are no tarballs of `liveusb`. You have to check it out from source control using `bzr`. - The version of `bzr` in Debian Etch is too old to access the `liveusb` repository on Launchpad, so I installed `bzr` from backports. - But my backports GPG ring was out of date, so I had to update it. - Thrifty (a Thinkpad T20) won't get past POST with either of my CD-ROM drives plugged in. This is a new feature in the last few months. - But you can't plug a CD-ROM drive into it once it's already booted; Linux won't notice it. - You can plug a CD-ROM drive into it after it's out of the BIOS but before Linux has scanned for IDE devices, and that mostly works. - Except that both of the CD-ROM drives I have for it can't reliably read the Ubuntu 8.10 CD that Beatrice burned on her Mac, probably because they're 10 years old this year. So there was really no point in getting one of them to work. - The AMI BIOS on the "mother" (as they call it here) doesn't really have a "boot from USB" option in the setup. You have to press F8 at boot time to get a list of possible boot devices including the USB stick. - But first you have to configure the BIOS to boot from it as if it were a floppy drive: press DEL to get into setup, and in the Advanced tab, under "? USB Configuration", under "? USB Mass Storage Device Configuration", set the "Emulation Type" to "Forced FDD". Neither "Floppy" nor "Hard Disk" nor "Auto" works; all result in the error message "Missing operating system". "CDROM", the other option, just results in hard system hangs during boot. - The Ubuntu `initrd.gz` doesn't automatically load the Debian Etch netinst ISO I put on the flash drive. I was able to mount it myself with commands like the following: modprobe vfat mkdir /mnt mount -t vfat /dev/sdb1 /mnt modprobe loop losetup -f /mnt/debian-40r6-amd64-netinst.iso mkdir /cdrom modprobe iso9660 mount -t iso9660 /dev/loop0 /cdrom cp /cdrom/install.amd/initrd.gz /tmp cd /tmp gzip -d initrd.gz cpio -i < initrd chroot . bin/ash I'm not sure if all of that ceremony was needed, but it did work. Unfortunately I don't know enough about how the Debian netinst disk works to figure out how to run it from here. From kragen at canonical.org Sun Jan 18 19:07:10 2009 From: kragen at canonical.org (Kragen Javier Sitaker) Date: Sun Jan 18 19:07:12 2009 Subject: succeeded in installing Ubuntu on the Asus P5KPL-AM Message-ID: <20090119000710.GA31008@canonical.org> I hassled around with trying to get it to install via PXE (enabling PXE boot on the Asus board required that I go into BIOS setup and enable the Ethernet option BIOS, in BIOS setup ? Advanced ? Onboard Devices Configuration ? Onboard PCIE GbE LAN ? LAN Option ROM) but then I gave up in favor of the following approach instead. Installing Ubuntu Intreped Ibex on my ASUS P5KPL-AM with UNetbootIn =================================================================== (This document is at .) 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] (http://lists.canonical.org/pipermail/kragen-journal/2009-January/000563.html) 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.