Launchpad Entry: https://launchpad.net/distros/ubuntu/+spec/quieten-grub
Created: 2006-06-19 by MichaelVogt
Packages affected: grub
Grub displays some pretty cryptic message on a normal boot that are visible before usplash kicks in. We want to silence them with a new "quiet" option for grub. It also displays some unnecessary messages in the menu mode that are not needed.
The messages are cryptic and not useful for the average user on a normal boot. They should still be available for the case when something goes wrong (recovery).
- Alice is using Ubuntu but is not a technical user. She always wonders what why so much cryptic stuff is printed in a otherwise so user-friendly distro.
- Tollef likes to see lots of cryptic messages to exactly know what is going on. He always boots without "quiet".
- Jeff has a problem with booting his kernel. The screen is just blank and has no information. He selects "recovery mode" and gets all boot messages from grub (because recovery is not run with "quiet"). This helps him to have enough information to post a bugreport.
The grub source needs to be modified to not print out messages (other than errors/warnings) when the "quiet" option is added. The "update-grub" command needs to be modified to put a "quiet" line in menu.lst to the default kernels but not to the recovery kernels.
We need to evaluate what messages are printed before menu.lst is read and what to do with them. The messages that are not error or warning messages should be hidden by default. Special care most be taken to not remove messages that helps identifying problems in the boot sequence.
The kernel-source needs to be modified to make it quiet for the very early boot sequence on i386 where it currently prints messages about uncompressing itself.
We add a "quiet" option to grub menu.lst command that is put before "root" for the default and that suppresses the output on boot of strings like:
- Filesystem type
- Booting menu line
- echo command
- kernel command
- initrd command
After it finally boots the kernel (the boot command). It should print that it boots now and that user needs to wait a moment to make sure that there is not a long delay between booting and usplash coming up. The text should be: "Booting the operating system now. This can take some time please wait."
The current header line of the grub-menu shows the grub version and the exact amount of memory. This is not very useful for a casual user. It should be removed and only displayed if the user switches to the commandline.
The Ubuntu, memtest86+ menu entry should be renamed back to "Memory test". This regressed some time ago and has not yet been corrected.
We also need to make sure that the very early kernel messages are not displayed as well (like "uncompressing linux; booting linux"). This needs to be done in the kernel. The trouble is that on i386 the kernel at this stage has not even parsed the command line yet, so this needs to be done unconditionally.
The "current, kernel", previous kernel" entries in the menu are missing on current dapper. These are more useful than the versioned entries, since the kernel version number is meaningless to a non-technical user. They are missing because /etc/kernel-img.conf specifies link_in_boot = no. If there is no compelling reason to do this, the symlinks should be kept in /boot instead. We will look into the debian version history to find out why this change was done and see if it is important for us as well.
Code for grub is written in http://librarian.launchpad.net/1644694/quiet.diff from https://launchpad.net/distros/ubuntu/+source/grub/+bug/20736. Most of it is done to implement this spec thanks to ChuckShort.
- Rename option in this patch from "quietboot" to "quiet".
- Remove grub version and available memory from menu.
- Add "Booting the operating system now" message when the "boot" command is issued.
- The kernel needs to be changed to supress the initial uncompress messages in arch/i386/boot/compressed/misc.c, the patch below should take care of this, but needs to be tested and it needs to be checked if that really eliminates the messages.
--- arch/i386/boot/compressed/misc.c.orig 2006-06-22 18:22:33.000000000 +0200 +++ arch/i386/boot/compressed/misc.c 2006-06-22 18:22:59.000000000 +0200 @@ -373,9 +373,7 @@ else setup_output_buffer_if_we_run_high(mv); makecrc(); - putstr("Uncompressing Linux... "); gunzip(); - putstr("Ok, booting the kernel.\n"); if (high_loaded) close_output_buffer_if_we_run_high(mv); return high_loaded; }