Wednesday, February 7, 2007

Ubuntu and Upstart - a BAD combination

This computer and Ubuntu made a BAD start. Ever since version 4.10, Ubuntu would install, boot and it would just freeze either at the login screen (GDM) of just a few minutes after logging in.

Then one day the smart people of Ubuntu decided that it would be good to unify the LiveCD and the install CD [an evil mind would think they did it to decrease the cost of ShipIt... ;-p ] and so made users use the GUI to install Ubuntu. Hell, I DON'T like GUI installers and I like them even less ever since they used this stupid installer from version 6.06 untill now.

Up to version 6.06 Ubuntu would install and work for a while before it froze, since version 6.06 the normal CD wouldn't even boot, it would just flash colours on my monitor and that's all... Fortunately the alternate CD with the good old text-based installer works fine when I set a custom resolution before starting the installation. So, I finally managed to install Ubuntu (Edgy 6.10) on this computer...

When the installation had finished, I had to deal with the annoying freezing. This time it was far worse since it would always freeze before logging me in. After several hours of Googling and searching in various files in Ubuntu I discovered that the problem was caused by the default runlevel which Ubuntu uses. Ubuntu by default boots on runlevel 2 which is also the default at Debian (though I've never had such problems with Debian...).

So, all I had to do was to modify /etc/inittab, right? Nooooo... it was way too easy just to make it work like that. There had to be something that would make fixing the problem even more time-consuming and complex than it already was and the good guys at Ubuntu made sure this would happen.

I booted on failsafe, logged in and ls ini* on /etc/ to find the inittab... well, guess what, someone had the greeeeat idea of replacing the traditional init system with the new (and poorly documented) Upstart and so THERE WAS NO inittab under /etc/!

Having already spent hours trying to solve the freezing problem, I wasn't going to quit until I had made it work the way it should, so I got back to googling. The Upstart website had very little things and a poor wiki which wasn't helpful at all, fortunately after reading several threads at Ubuntuforums.org I managed to understand the way Upstart works and finally, after days of searching and reading I found the script that handled the default runlevel and modified it.

10 comments:

Vince said...

And the winner is ?

continuous said...

So which script was it? All you did was share your pain, and leave the gain under your sorry little rug! HArdly an opensource attitude.

Anonymous said...

from doing my own research and playing around i found in /usr/share/doc/upstart there is a README.Debian.gz file which can be gunzip'ed then there's a question/answer in there that says upstart (as configured on Ubuntu 6.10 (Edgy Eft) does) actually does use /etc/inittab to determine default run level. i set runlevel to 3 (the default for console based login, btw Ubuntu apparently defaults to runlevel 2, execute command runlevel to find out what one you're in). This however did nothing.
Then with a combination of snooping, and recalling that i've installed other services on this box i recalled/figured out...
the graphical login screen is controlled by a service called gdm. services are started by having softlinks created in /etc/rc<level>.d/. there is a way to use the command
update-rc.d
to control which runlevels start which command, but i haven't yet mastered the use of that command, so i cheated, and just executed
sudo rm /etc/rc2.d/S13gdm
sudo rm /etc/rc3.d/S13gdm

this made ubuntu behave more like the other distributions i've tried where booting to runlevel 2/3 brings up a console login. YMMV, gdm startup scripts may or may not be prefixed with S13, just look for S(some number)gdm

hope other people find this, and find it useful.

Anonymous said...

Thanks, it was useful although mine is S30gdm.

Anonymous said...

cheap viagra overnight uk alternative viagra what is generic viagra viagra cheap buy online 2007 viagra hmo viagra oral buy cheap viagra online uk viagra or cealis new viagra viagra and alternatives mail order viagra super viagra pro how does viagra work viagra stories

Anonymous said...

good afternoon fellas. I'm actually into shoes and I had been searching allowing for regarding that meticulous make. The prices due to the fact that the boots are about 250 pounds on every site. But for all I bring about this site selling them for half price. I absolutely like these [url=http://www.shoesempire.com]prada sneakers[/url]. I will probably buy these. what is your opinion?

Anonymous said...

Great Site. Was added to mybookmarks. Greetings From USA.

Anonymous said...

hello everyone. I'm actually into shoes and I was digging for the sake of that particular make. The prices due to the fact that the velcros are approximately 340 bucks on every site. But definitively I base this area selling them someone is concerned half price. I in reality love those [url=http://www.shoesempire.com]gucci sneakers[/url]. I will definetly purchase these. what can you say about it?

Anonymous said...

good afternoon ppl. I'm actually into shoes and I was looking for the sake of that exact make. The prices due to the fact that the sneakers were all over 170 pounds on every site. But for all I found this site selling them someone is concerned half price. I really want those [url=http://www.shoesempire.com]gucci sneakers[/url]. I will definetly order these. what can you say about it?

Anonymous said...

Hey,

I am regular visitor of this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]lignuxer.blogspot.com is filled with quality info. Do you pay attention towards your health?. Here is a fact for you. Recent Research displays that closely 60% of all U.S. adults are either chubby or overweight[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Therefore if you're one of these people, you're not alone. Its true that we all can't be like Brad Pitt, Angelina Jolie, Megan Fox, and have sexy and perfect six pack abs. Now next question is how you can achive quick weight loss? Quick weight loss can be achived with little effort. You need to improve some of you daily habbits to achive weight loss in short span of time.

About me: I am blogger of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health expert who can help you lose weight quickly. If you do not want to go under difficult training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effective weight loss.