Gutsy on ibook

From Finninday
Jump to: navigation, search

Problem

I'm trying to install Ubuntu 7.10 on an iBook with dual USB. Well, not exactly gutsy, since it isn't officially ported yet. I've tried installing 2 of the recent daily builds. Most recently 20071016.

After about 5 tries, I haven't found a way to get around this:

Loading, please wait...
     Check root= bootarg cat /proc/cmdline
     or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/dha3 does not exist. Dropping to a shell!

That message appears after a complete install and the first boot into the system.

Its funny because the first boot gets to the point of displaying the Ubuntu splash screen and progress bar, but then fails after about one minute and displays this. If /dev/hda3 doesn't exist, how did it find that graphic?

The shell that I get doesn't know how to do a df, so I'm not sure how to troubleshoot the disk. The shell does know how to do a mount, but I'm not sure what parameters to feed the mount command to get it to work. "mount /dev/hda3" responds with "Cannot read /etc/fstab: No such file or directory."

Using the install CD as a rescue disk lets me see that the install looks like it completed successfully and everything is really there. The rescue mode is pretty amazing.

Using the rescue mode, I can see that my yaboot.conf looks like this:

## yaboot.conf generated by the Ubuntu installer
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
## see also: /usr/share/doc/yaboot/examples for example configurations.
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

boot=/dev/hda2
device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
partition=3
root=/dev/hda3
timeout=50
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enablecdboot

image=/vmlinux
	label=Linux
	read-only
	initrd=/initrd.img
	append="quiet splash"

image=/vmlinux.old
	label=old
	read-only
	initrd=/initrd.img.old
	append="quiet splash"


Bug and possible fix

Ahh, Google has already found out that this is the answer I need: http://ubuntuforums.org/showthread.php?t=559099

And here is the bug that I'm tripping over: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/126337

Awesome. After doing the modprobe, the boot is getting farther, but the problem isn't fixed.

Using the rescue disk and doing this:

Add

ide_core
ide_disk
ide_cd

to /usr/share/initramfs-tools/modules

#update-initramfs -u

and rebooting didn't actually fix the problem.

But

modprobe ide_disk
modprobe ide_core
modprobe ide_cd

got me to a regular boot session without the rescue disk and then doing the

update-initramfs -u

still doesn't work.

Found this on another ubuntu forum:

Thus, to fix this bug:

1. Edit /etc/initramfs/modules and add at the bottom "ide_generic" (without the " of course
2. Update the initramfs with sudo update-initramfs
3. reboot! 

I'll have to try that when I get home. It would probably help if I knew what initramfs was... I suppose I could be bothered to read a few man pages.

Background

Well, the initramfs is a gzipped cpio archive that is loaded into RAM and mounted as a temporary root file system early during the boot process. That explains how my system could display a graphical splash screen and then complain that it can't see the hard disk. Once control is passed to the initramfs, it displays the splash screen and tries to mount the disk but fails because it doesn't have the proper modules in the kernel.

So it would seem that the bug is in the kernel modules (or lack of them) that come in the default ppc kernel. Changing the settings in initramfs could be a reasonable workaround. But just what modules are missing and how to I ask for them to be loaded automatically?

The busybox shell that I get doesn't include lsmod as a command, but I do have modprobe. Looking at the manpage or modprobe tells me that I should be able to do a modprobe --list. Hmm, that's not really what I want. modprobe --list gives me a list of available modules, not what is currently in use. Perhaps what I need to do is compare "cat /proc/modules" while in rescue mode with the same command in the busybox shell. That doesn't look exactly like lsmod, but it seems to be functionally equivalent. Particularly, I think I want to do this in both environments and compare:

cat /proc/modules | grep ide_

On my desktop, the result looks like this:

rday@weasel:~$ cat /proc/modules | grep ide_
ide_generic 2176 0 - Live 0xffffffff88083000
ide_cd 35104 0 - Live 0xffffffff880a0000
cdrom 40568 1 ide_cd, Live 0xffffffff88095000

It may also be handy to do a modprobe --config to see just what it thinks it is *supposed* to be doing. Well that doesn't work. --config just lets you define the config file, not peek at it. I guess I just have to reach into /etc/modprobe.conf and look at it myself.

Solution

I created a file called /usr/share/initramfs-tools/scripts/init-premount/ppc and put this in it:

modprobe -Qb ide_disk

Some people in the forums called it ide-disk and some called it ide_disk. I'm pretty sure that my attempts to use ide-disk failed and ide_disk definitely worked.

Now I can move on to other problems like missing icons, network manager using up all my cpu and gnome settings daemon failing to start.

Anti-solution

Now that I can boot gutsy on my old school iBook, I think I will switch back to a fresh install of Dapper or Edgy. The eye-candy won't start on my sad little video card, so there is not much incentive to jump to a distro that treats PPC as a third-class citizen. Perhaps things will be patched up and working in a few weeks after the gutsy release, but I'm not so sure. The initramfs bug I just struggled through was reported and verified back in July.

The following things are broken after the fresh install:

  • sound
  • gnome-settings-daemon
  • desktop icons are missing
  • system doesn't wake up after suspend