May 18, 2010 1 Comment
Obviously – this is the continuation of my previous post. I mentioned how I upgraded my computer, but I published the post before I rebooted it again. First thing I encountered was GRUB menu over-populated by various kernels. There reportedly is some way how to limit this – still it’s stupid if you ask me. For some reason you specify that “4th item in the menu is default” in GRUB configuration (
menu.lst). When the list was changed, Windows suddenly wasn’t my default (maybe it was some diabolic plan of Ubuntu developers ;-)). Maybe I don’t remember it right but I’m convinced that LILO configuration had some statement in the particular section saying “this is the default, this I want”.
“Ok, I’ll fix it when I boot Linux the next time,” I said to myself. Next time was a bit more complicated though. First I learned that “
Grub error 22: Partition not found”. Luckily I had Ubuntu installation CD I used for my wife’s computer. I booted, went to shell, mounted my root partition, chrooted… WTF? Why is bash not recognized? There I realized that this time I booted 32bit kernel and my OS on disk is 64bit. What a shame.
Ok, let’s do it without chroot – which I really like the most, because you feel like at home in your chrooted root partition, right? I removed all those older kernels from my (
/boot/grub/menu.lst and entered grub command. “Hey, stupid, you have to install grub first!” said Ubuntu. “Eh?” well you always learn something new, right? Obviously not the best emergency CD around, but suggested “
apt-get install grub” made the trick. Of course you have to do it every time when you don’t succeed on your first try (guess if I did :-)).
First I found out that
root(hd0,x) from my
menu.lst is not recognized. I checked the disk… to my surprise system disk was on
/dev/sdb – whatever. And Linux partition was 4. So
root(hd1,3) was OK,
setup(hd1), quit. I had to fix partition designations in menu.lst as well. Funny – what was
sdb4 now was
sda3 before. Don’t know why. Reboot – I felt I’m closing in.
Kernel was loaded this time, but disk by
UUID=xxx wasn’t found. What the heck? Live CD again. My
/etc/mount was OK when I compared it with
/dev/disk/by-uuid listing. But grub’s
menu.lst wasn’t. I fixed root partition UUIDs – don’t ask me why they had to change it and why all my UUIDs must have been altered. No idea, honestly. Being there I realized, that I still have
menu.lst, while the disk was
(hd1) now. I fixed that as well. (Wrong!) Reboot.
Partition not found. Confusion. “Oh, I’m so stupid!” I realized I was tricked by Live Ubuntu again. “It read kernel the last time, I shouldn’t have changed this! It is
hd1 in Live session, but
hd0 otherwise obviously!” Don’t ask me why. I don’t know. But it really is. Live CD for the rescue again. I fixed
menu.lst one more time. I wrote the grub configuration to
hd1 just to have the same disk named
hd0 during the boot. Whatever. I’m curious how would my mother solve this problem.
Finally I had menu as I wanted, default boot to Windows (stone me!) and Linux actually booting! What made me even more confused – I was convinced I changed Windows section root from
(hd1,0) and back as well – and it booted every time. I’m not really sure anymore – and I don’t want to try it again. But I’m pretty much convinced.
Now I finally have Ubuntu 10.04 up and running after the “smooth upgrade”. Never praise your upgrade before reboot – obviously. And good luck to all your upgrades. Sometimes you don’t need it, but sometimes…