Sunday, November 20, 2011

Ubuntu 11.10 alternate install blank screen

With Ubuntu 11.10 Unity requiring lots of resources both in CPU and memory, I embarked on installing a trimmed down version of it using alternate install. This used to be straight forward, follow the text based wizard and you are ready to go.

The problem is that after installation, on reboot it shows a blank screen. Just nothing... (except for the blinking cursor). This might be specific to VirtualBox guest machines but I can't verify this.

Anyway, it took me a while to figure this one out (of course with the help of Google). The following, from  Ubuntu's bug repository Launchpad, shows the problem:


Ubuntu 11.10 Command line only installation fails over and over again
http://ubuntuforums.org/showthread.php?t=1873069

grub2 configuration has vt.handoff=7 even when X11 is not installed
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/695658

Command-line Install on Minimal CD tries to boot graphically
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/831752

The problem
Ubuntu minimal/alternate failed to cover the use case that user might not need GUI in Ubuntu. This is a big oversight as a big chunk of Linux users (servers) don't need GUI. What happens is that it boots up and creates virtual terminal session 7 so that it can transition to GUI login seamlessly. 

The work around
In Ubuntu 11.10, /etc/grub.d/10_linux line 70, it checks if the word "splash" is present in GRUB_CMDLINE_LINUX_DEFAULT.  This GRUB_CMDLINE_LINUX_DEFAULT can be modified in /etc/default/grub. So changing this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT=""

I should have removed "splash" only but I also would like to see all the message while the machine is booting up.

Next up, is add the following towards the end of /etc/default/grub:
GRUB_GFXPAYLOAD_LINUX=text

Ok I am not so familiar with this one. But I believe what it does is to force it to run in text mode instead of doing KMS functionality built-in the kernel.

Now, to update grub.cfg run:

sudo update-grub
Then reboot the machine, like:
sudo reboot

12 comments:

Nauglin said...

Great, works like a magic spell, thanks a lot. I was very confused about this Ubuntu CLI boot hanging "feature", wandering what the hell were I doing so wrong O_o Un millón de gracias.

Techno Scavenger said...

Glad to be of help. Thanks for the comment.

Unknown said...

ditto to Nauglin. You just saved my day man! I made 4 different Virtual Machines, trying some luck. Thanks a lot!

Anonymous said...

Thanks for compiling this worked well. Took a moment to figure out how to get to the command line (using the install cd in rescue mode), but I'm pretty noob on this.

Techno Scavenger said...

@Unknown/Anonymous, I am glad that the post helped. Thanks for the comment.

Deepak @ BITS said...

Didnt work for me
took me to tty
logged in
startx came with errors: Fatal server error: no screens found.
ny idea???

deepak

Deepak @ BITS said...

Didnt work for me
took me to tty
logged in
startx came with errors: Fatal server error: no screens found.
ny idea???

deepak

Senryo said...

Many thanks. Helped me a lot.

Todd T said...

Thank you very much for sharing, this helped me out.

Todd T said...

Thank you very much for sharing, your instructions worked for me (using Ubuntu 11.04 minimal install on vmware player).

Todd T said...

Thank you very much for sharing, this helped me out.

Anonymous said...

thanks brother its good more tech tips visit www.anbuthil.con