lunes, 18 de abril de 2011

My journey updating to natty

Updating to a new version of ubuntu always has its glitches.... I hate doing clean installs (this is not Windows after all, right? So we should be able to do updates while working on the box) so I always do dist-upgrades in order to move to a new release of ubuntu (and don't try to change my mind... I'm stubborn and won't do it).

In my case, I wanted to update because I was having a small glitch with my intel graphics related to refreshing of the screen on my Samsung N150P plus netbook. Sometimes I had to switch to a different virtual desktop and come back in order to force the refresh of the whole screen to see things right... and I was tired of it.

I'm using kubuntu, anyway... so here's the journey so far.

First, going to /etc/apt/ and edit sources.list in order to change all "maverick"s in the file for "natty" (as a matter of fact, this is not what I do but the results are exactly that).

Then, performing the actual upgrade (you are on your own if you choose to do it this way, so no whining is accepted if something breaks):

sudo apt-get update
sudo apt-get dist-upgrade -y --force-yes -f

Give it time to download the stuff it has to download (about 800+ MBs for me), then answer a few question for a few packages, then the upgrade is finished (by the way... I normally had to run the dist-upgade a couple of times in order to get all packages installed... there was always a glitch... but not this time... it was flawless).

And here is where things get tricky. I reboot my computer and it fails to boot with the natty kernel with a kernel panic. Damn... it's never going to give itself away easily, is it? Aparently it doesn't understand where the root partition is. So I start booting with the maverick kernel that's still installed. Fortunately it does boot and I'm able to start kde normally..... except that graphics are a MESS (in order to keep the article PG-13). I had to disable desktop effects in order to have something usable. Ugh! And I thought natty would get rid of the refresh problem.

So I file a bug to complain about it (come on, guys! Natty is almost out there and the graphics on my netbook are awful!)... and when I'm about to finish the submission process, it hits me like a truck: old kernel. :-S I better start the new kernel to see if the graphics are better there. I file the bug anywhere with a comment at the end.

And then a new chapter of education begings. After a few attempts of trying to solve the problem by hand, I end up running update-grub to see what happens... and then I see that there's an error when trying to generate a new grub.cfg file:

$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
Found memtest86+ image: /boot/memtest86+.bin
error: syntax error.
error: Incorrect command.
error: syntax error.
error: line no: 143
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done

What do we have in the new broken grub.cfg file (grub.cfg.new) around line 143?

submenu "Xen 3.3" {
}

Well, well.... who knows why this is... but this xen stuff is going out. So I chmod -x /etc/grub.d/20_linux_xen and try again:

$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
Found memtest86+ image: /boot/memtest86+.bin
done

Much better now.... Now I'm able to reboot with the natty kernel and we are fine. And let me tell you that graphics are much better now... I have noticed a couple of things so far (I have to restart squid3 after I reboot in order to make it work, when the screensaver starts, sometimes it kills the whole kde session) but I'll look around to see if updates arrive that solve this problems or if there are easy fixes for them (besides not using them, of course).

No hay comentarios:

Publicar un comentario en la entrada