grub2 configuration has vt.handoff=7 even when X11 is not installed

Bug #695658 reported by Eliah Kagan on 2010-12-30
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Medium
Unassigned
Natty
Medium
Unassigned

Bug Description

Binary package hint: grub2

The following line in /etc/grub.d/10_linux is present in Natty but not Maverick:

GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA vt.handoff=7"

That creates seamless transition to the graphical login screen. Specifically, it makes the 7th virtual terminal come up automatically, so you don't see the console login prompt before X11 loads. This is a good thing. The problem is that this occurs even when X11 is not installed! The result is that a command-line system will appear to have failed to boot, showing a blank, purple-tinted screen (on tty7) instead of the console login prompt on tty1. In order to log in and use the system, the user must manually switch to one the usable virtual terminals (tty1 through tty6).

When X11 is not installed, grub2 should not be configured with vt.handoff=7. A weak fix for this problem would be for Ubuntu installations not providing X11 not to include that line in /etc/grub.d/10_linux (or, better, to include it, commented out, with a comment explaining what it does). A strong fix for this problem would, in addition, cause that line to be added (or uncommented) when X11 is installed (or when it's reconfigured to provide a graphical login screen), and removed (or commented out) when X11 is uninstalled (or when it's reconfigured not to provide a graphical login screen).

These were the steps I took, which produced the bug:
(1) Install a command-line system from the Natty Alpha 1 i386 Alternate Install CD. (At the boot menu, after selecting the language, press F4, and a command-line system is one of the options.)
(2) When the system boots, observe the blank purple screen. Switch to usable virtual terminals with Alt+F1 through Alt+F6. (Switching back to tty7 shows the same blank screen, but it is no longer tinted purple.)
(3) Log in, update the package cache, and install all available updates (I used apt-get for this), allowing new versions of any systemwide configuration files to replace the current versions. Reboot.
(4) Repeat step 2, confirming that this bug has not been fixed by the updates.

And then these were the steps I took, to confirm my analysis of the bug:
(1) Edit /etc/grub.d/10_linux (e.g. "sudo nano -w /etc/grub.d/10_linux") and comment out the line containing "vt.handoff", or change the number from 7 to some lower number. (I tried it both ways; they both worked.)
(2) Run "sudo update-grub" to apply the new configuration.
(3) Reboot. A usable virtual terminal with a login prompt comes up automatically.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: grub-common 1.99~20101221-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.37-11.25-generic 2.6.37-rc7
Uname: Linux 2.6.37-11-generic i686
Architecture: i386
Date: Thu Dec 30 05:45:46 2010
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20101202)
ProcEnviron:
 LANG=en_US.UTF-8
 LC_MESSAGES=en_US.utf8
 SHELL=/bin/bash
SourcePackage: grub2

description: updated
description: updated

I am able to reproduce this bug (and the workaround) on Natty Server (installed from the Alpha 1 Server Install CD). Since Ubuntu Server is configured by default to write status information to tty7, it looks a little different -- you see a "shadow" of whatever text is written there.

Arguably the unreadability of that text could be considered an additional bug, but I don't think so. Switching to any other virtual terminal and back renders the text readable again (because it gets rid of the purple color scheme, just as on an Ubuntu non-server command-line system). When the workaround is applied, text on tty7 is always readable.

On the other hand, a minority of server administrators might prefer to see those status messages (instead of a login screen) when they boot up their servers. Assuming they haven't installed X11 (or have, but have it configured not to provide a graphical login screen), they could achieve this by manually adding vt.handoff=7 to the grub2 configuration...except that this would show the purple and black silhouetted text, instead of readable text. That's the justification for the idea that the displaying of unreadable solid black-on-purple text might be an additional bug.

Colin Watson (cjwatson) wrote :

The purpose, FWIW, is to transition smoothly to Plymouth, not to transition smoothly to X11. Perhaps we need to check the installed Plymouth theme or something.

Changed in grub2 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
milestone: none → natty-alpha-3
Martin Pitt (pitti) wrote :

Not a milestone blocker, but as this touches some rather fundamental boot logic, it should be done before beta-1.

Changed in grub2 (Ubuntu Natty):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
milestone: natty-alpha-3 → ubuntu-11.04-beta-1
Colin Watson (cjwatson) wrote :

I believe I fixed this as bug 700686, and forgot that this bug had already been filed.

Changed in grub2 (Ubuntu Natty):
milestone: ubuntu-11.04-beta-1 → none
assignee: Canonical Foundations Team (canonical-foundations) → nobody
Eric Arthur (madspyman) wrote :

This is still happening when installing from the 64bit Natty Minimal CD, at https://help.ubuntu.com/community/Installation/MinimalCD

It also occurs when upgrading from a Maverick minimal install to Natty with sudo do-release-update.

@Eric Arthur
You have just marked this as a duplicate of bug 700686. Are you sure that's right? Remember, I created this bug report after describing the problem to Colin Watson in bug 700686 -- he instructed me to create a new bug instead of reopening bug 700686.

@Eric Arthur
Sorry, my last post (post #10) was totally stupid. I had to make three separate mistakes in understanding what was going on in order to make that post; it would take about twenty lines just to say what they were. I'll post constructively soon--I just wanted to first take this opportunity to completely retract post #10. Again, sorry about that.

@Eric Arthur
OK, this is my not-stupid post. ;-)

This bug is marked as a duplicate of bug 700686. That bug was fixed, and the fix works in some situations. It appears that most, or at least some, Ubuntu Server installations don't suffer from the problem anymore. Since this really was the original report, it makes sense to continue considering this to be the same bug as bug 700686.

When I saw that I could still reproduce this bug on some Natty systems (this was on April 14th, 2011), I asked how best to report that, by posting a comment in bug 700686. (I posted there instead of here, since this bug is a duplicate, and that bug is not.) Colin Watson instructed me to create a *new* bug, which I did. That new bug is bug 761830. I posted a link to bug 761830 in bug 700686, but I did not post a link to it in this bug, since this bug is marked as a duplicate.

From your description in your post here (post #9), your experience is entirely consistent with the continued problem described in bug 761830. So I've subscribed you to bug 761830, and I recommend you re-post the information that you've posted here in bug 761830 (and also mark that bug as affecting you, using the green "This bug affects..." link at the top). I don't think anyone else has reported that bug 761830 occurs for minimal Maverick systems upgraded to Natty, so it's particularly valuable for you to post about that, but you should also mention (in the same post) that it happened when you installed from the Natty amd64 minimal CD.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions