darxus: (Default)
darxus ([personal profile] darxus) wrote2007-02-28 12:50 pm
Entry tags:

[geek] computers suck

Linux, grub, and initrd suck. Knoppix still kicks ass.

Most of this involved the root partition being mounted in /mnt/sda1 while booted to a rescue disk (Knoppix).

grub-install fails when either /mnt/sda1/boot is simlinked to /boot/ or I'm chroot'ed to /mnt/sda1 with the entirely unacceptable message "/boot/grub/stage1 not read correctly." WTF is stage1? I have some idea, but this is far too insufficiently relevant to what the actual problem is. Turns out I needed to use --root-directory=/mnt/sda1/ instead of chrooting or simlinking, and that was its way of telling me. And then, of course, since it uses screwy drive numbering, my root partition ends up as hd1 instead of hd0, because hd0 is apparently my cdrom drive, and you can't just tell grub to use /dev/sda like everything else.

So I finally get it booted. I run "aptitude install kernel-image-2.6-amd64-k8-smp" to upgrade to the latest version of that type of kernel. Seems to go okay. I reboot. It tells me it failed to mount the root partition. Now I haven't screwed with initrd much, but my first guess is that this kernel has it's scsi drivers (required to mount this drive) in this initrd image, and can't get to them. Boot Knoppix again, and sure enough all of my /boot/initrd* images have been wiped. chroot to my root directory and type the command to install the kernel again, and sure enough the package is incompletely installed and giving me a mkinitrd error message related to the absence of /proc. I mount /proc in my chroot jail and it still gets all pissy at me. As far as I can tell there is no way to get mkinitrd to work while booted to a rescue disk. I ended up copying over the old kernel and initrd image from a similar machine and updating grub and when I rebooted thankfully I was able to get into a rescue mode. Then I reran the kernel install command and it worked, mkinitrd and all. WTF, why did it fail the first time and not now?

The many varied and cryptic ways in which linux can fail pisses me off.

Of course I don't think I'd be able to do anything like any of this at all under any other OS.
(deleted comment)

[identity profile] darxus.livejournal.com 2007-02-28 07:00 pm (UTC)(link)
Right.

It was not helped that the hours I spent on this I was sitting on a hard cold floor between two very active A/C vents. And cold.

[identity profile] cathijosephine.livejournal.com 2007-02-28 09:24 pm (UTC)(link)
That sounds miserable!

I'll warm you up tonight.