Wednesday, August 27, 2008

How to fix verbose Ubuntu boot (Hardy Heron)

The symptoms were these: When I turned on my laptop, which runs Ubuntu 8.04 Hardy Heron, the orange and black splash screen comes up, the bar runs over to the right and stops, then the screen switches to text and reports:

* Reading files necessary for boot

Then a lot of text, and finally we're ready to go at the login screen! It only seems simple!

I didn't like the verbose boot. It was not aesthetically pleasing. It was new behavior. It shouldn't be happening. What was wrong?

Here it is:

1) I changed the size of my swap partition when I realized I'd set it up too small on Day One. That caused some of the trouble!

2) But wait, there's more! In System → Administration → Software Sources → Updates, I'd gone in some days ago and checked the "hardy proposed" and "hardy-backports" options, not because I knew what I was doing, but because it seemed like a good idea at the time. This. Had. Consequences.

3) Upon further checking using sysinfo, I realized the swap partition wasn't even active, and I couldn't MAKE it active using swapon !

4) vol_id /dev/sda2 showed a different UUID than the one in (how esoteric can you get?) /etc/initramfs-tools/conf.d/resume ! What the blazes is that, you ask? I dunno, I didn't figure this out on my own.

Ok, so how did I fix it? With the help of the übergeeks at Ubuntu Forums, of course! In a nutshell, the help I got covered the essentials and left some details about my specific situation to the imagination, so this is it:

DANGER, WILL ROBINSON!
Getting this wrong ABSOLUTELY WILL screw up your system!
ABANDON ALL HOPE YE WHO ENTER HERE
*except in California, where by law you may still hope but proceed at your own risk anyway!

A) Using System → Administration → Partition Editor, DELETE the swap partition, and recreate it in the exact same place and exact same size! This will reassign a brand new UUID to the swap partition, which you may discover using vol_id /dev/sda2 .

B) Using gedit, MANUALLY edit /etc/initramfs-tools/conf.d/resume so that the UUID is up-to-date. Do the same for the file /etc/fstab, i.e., find the swap partition (identified by type swap rather than ext3 and change the UUID to the new number.

C) Because I had been MUNG-ing around in Software Sources and told the system to feed me Ubuntu's experimental proposed updates and and the totally unsupported "hardy-backports", my kernel version was set to 21, but at the moment, the last stable kernel is 19. These are listed by filename in /lib/modules, and will be used in the next step.

D) You need to regenerate some boot information for your linux kernel version using sudo update-initramfs -k 2.6.24-19-generic -u — note that in my case, my kernel was set to version 21, not 19, so I had to use the -k 2.6.24-19-generic switch. If your kernel is right and proper as shown by sysinfo, you can leave that switch out, but be sure to include -u !

E) sudo reboot , and that's all!

Labels: , ,

1 Comments:

Blogger Unknown said...

Grikdog,

I'm a complete n00bee in regards to Ubuntu -or for the matter, any UNIX/Linux incarnation. Just installed Intrepid a few days ago in my Windoze (XP) netbook.

Having screwed the first installation of the NBR-1.0.1 remix left me with a small ~2.5Gb partition that just refused to go, so I went and deleted it, stupid action that left me with a non-bootable machine, forcing me to use the super-GRUB disk to repair it.

After that, Ubuntu went verbose on boot and took three or four times the usual time lapse to complete.

Your post made my day. It worked like a charm (although the possible consequences it scared me in no small measure), Of course, I had to leave out the kernel data on the update-initramfs command as mine was up-to-date. Now, I got rid of the endless text lines and Intrepid boots in a snap.

Many thanks... Good work!

--jorge.

2:45 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home