Another Ubuntu upgrade, another critical upgrade bug. I had this idea that letting a solid chunk of time go by before upgrading (in this case, ~4 months) would mean most of the upgrade bugs would be gone. Instead, I was bit in the ass because using the current 7.10 Gutsy kernel (2.6.22-15) means the upgrade process will freeze on the locales package.
The workaround, found by siberoptik on the Ubuntu forums, is to reboot your system with the 2.6.22-14 kernel. Everything is peachy after that. Since I’m working remotely, the way I changed kernels was to edit /boot/grub/menu.lst
and nuke the lines about the 2.6.22-15 kernel. That made 2.6.22-14 the top-most kernel. By the end of the upgrade none of those kernels will matter anymore anyway. If you are in front of the box, you can just press <Esc>
at the grub menu.
If you find yourself in the middle of an upgrade, frozen at “Generating locales…”, all is not lost. Get another shell on the system, look for the process tree (`ps axfw
`) with locale-gen
running, and kill locale-gen
off.1 For me, the upgrade continued on until the only packages left were ubuntu-minimal
and locales
. I had to kill off the locale-gen
process a couple of more times until the upgrade process was declared “failed”.
At this point I reboot the box and something went awry as it didn’t come back again. It’s unclear from the logs what exactly happened (working remotely, I couldn’t watch the screen), but after a hard reset I was able to get back in again. Running `dpkg --configure -a
` had the locales generate instantly and everything was fine.
The total joke about all of this is, as usual, it’s not documented on Ubuntu’s site in any useful place. Yes, I found it in the forum after I hit the bug and knew what to search for, but it’s a bit late at that point. You’d think there would be a “caveats” or “known problems” or “big nasty critical bugs you should avoid” section on the help page about Hardy upgrades.
In an effort to prevent others from going down this road, I’ve put information in the following places:
- Added a “Known problems” section to the HardyUpgrades help page.
- Added a comment to the update-manager fails 7.10 -> 8.04 LTS question.
- Opened a bug against the update-manager package.
Update (2008.08.19): The bug I filed against update-manager as been made a duplicate of a bug in linux-source-2.6.22. A lot of talk has been happening there and someone claims the developers are working on a fix.
Update (2008.09.24): On August 25, a new kernel was released which fixed this problem. All the upgrades I’ve done with the new kernel have gone perfectly. That said, it does appear there are some people who are still running into this problem. See barbex’s comment below and see the bug in linux-source-2.6.22 page.
- IMHO, it’s a good idea to try killing the highest process in the tree and work your way down to the root until you get the result you want. ↩
“The way I changed kernels was to edit /boot/grub/menu.lst and nuke the lines about the 2.6.22-15 kernel. That made 2.6.22-14 the top-most kernel.”
Or – ESC at the grub menu and select it (?)
I was doing this over SSH to a remote box, so hitting Esc at the grub menu wasn’t an option. I’ll clarify the article.
It’s almost October now and I can not BELIEVE that I just run into this problem! How can that not be fixed by now?
Unfortunately I found your solution too late and had completely screwed my system. Had to reinstall to get back to my perfectly working system. So what is the consequence? Never upgrade? Is this Windooze?
@barbex: Actually, a new kernel was released on August 25 that was supposed to fix the problem. For me, it did. All the other machines in the cluster I manage were able to upgrade to Hardy without any problems.
Did you make sure your Gutsy 7.10 had all the latest packages installed before trying to upgrade to Hardy 8.04?
If so, there does appear there are still some people hitting the bug. If you have the time and inclination you should make some noise on the bug page so they how widespread the problem is:
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/249340
hmmm…
You know now that I think about it, I may have skipped all the updating and may have decided to upgrade straightaway. Bad idea I guess.
That computer is not connected to the internet all the time and my internet connection is so slow that I probably didn’t bother with the 300+ updates before upgrading, not that I was really aware that I should have done that.
So my bad?
Still quiet annoying.
[...] as I learned here, it looks like I could have avoided all that if I had only received the critical kernel patch that [...]