Boot messages in linux

Viewing Linux Boot Messages

! Note !
I may try some things to get a better view
of boot messages on my Linux system(s).
A few more notes and lists may be added,
if/when I re-visit this page in the future.

(to showing various boot messages — and the Grub2 boot menu)

In 2015, I was still using the Ubuntu 9.10 Linux operating system (the 2009 October release, ‘Karmic Koala’) — with the Grub 2 boot system — on my main desktop computer.

Using the ‘right-SHIFT’ key, which is supposed to cause the Grub2 menu to show up during bootup (according to https://help.ubuntu.com/community/Grub2), DID NOT WORK (for me) — on my desktop system (which is running Ubuntu 9.10 — with NO dual-boot to MS Windows).

Since I am running no other operating system on this computer, Grub2 defaults to not showing the Grub2 menu (as documented in the section https://help.ubuntu.com/community/Grub2/Setup#Specific_Entries). Instead, the bootup process proceeds immediately into the kernel bootup sequence — although the documentation says that the (right) SHIFT key should allow for showing the Grub2 menu, even in the case of running just one operating system.

In case this is of any help to other Linux Grub2 users, here is what I did to get the boot messages (kernel and ‘init.d’ messages) to show — AND allow for bringing up the Grub2 menu with the right-SHIFT key:

In the ‘grub’ file, I changed the line

GRUB_CMDLINE_LINUX_DEFAULT=»quiet splash»

GRUB_CMDLINE_LINUX_DEFAULT=»»

AND I changed the commented line

I saved the ‘/etc/default/grub’ file — along with a backup to the file ‘/etc/default/grub_2015apr24’ — using the ‘gedit’ text editor’s save-file options.

Then I ran the command ‘update-grub’. This put appropriate changes in the file ‘/boot/grub/grub.cfg’. I could see the changed lines by using the command

diff grub.cfg grub.cfg_ORIG

Then I shutdown and booted up again.

Now, after some BIOS boot messages, I can hold down RIGHT-SHIFT (in a 6 second interval of time?) and the Grub2 menu shows up (for up to 10 seconds).

At the Grub2 menu, I can press Enter to go into the default Linux boot up. Boot messages now show — instead of about 20 seconds of looking at a small Ubuntu logo in the middle of the screen — until an Ubuntu login-screen appears.

By the way, on my Ubuntu 9.10 machines, ‘grub-install -v’ shows

grub-install (GNU GRUB 1.97~beta4)

The ‘right-SHIFT’ key may work for some Linux-Grub2 users, to show the Grub2 menu, without ‘grub.cfg’ changes like those above.

I found that on my Acer netbook computers, the ‘right-SHIFT’ key DID cause the Grub2 menu of Ubuntu 9.10 to display — with NO ‘grub.cfg’ changes. The difference may be that the netbook computers are using an Intel video/graphics controller, while my desktop is using an AMD video/graphics controller.

So some Linux-Grub2 users (perhaps AMD and/or Nvidia graphics users) may need to change the statement

(or comment this statement) in order to enable the right-SHIFT key to show the Grub2 menu.

AND, for essentially all Linux-Grub2 users, changing the line

GRUB_CMDLINE_LINUX_DEFAULT=»quiet splash»

GRUB_CMDLINE_LINUX_DEFAULT=»»

Читайте также:  Child returned status 2 linux

should cause the kernel and ‘init.d’ scripts’ boot messages to be displayed. However, the boot messages ‘zip by’ — a lot of them disappear at the top of the screen. Hence I say that I had ‘partial success’.

Right-SHIFT works in certain cases : (reiterating what was said above)

I indicated that I changed the Grub2 statement ‘GRUB_HIDDEN_TIMEOUT=’ from zero to non-zero in order to be able to use the right-SHIFT key to get boot messages to show.

I found out that, on my Acer netbook computer, I did not need to change ‘GRUB_HIDDEN_TIMEOUT=0’ for the right-SHIFT key to force boot messages to show.

The Acer netbook uses an Intel Atom chip and Intel video graphics (with associated video configuration files and driver software), while my desktop computer uses an AMD chip and ATI Catalyst video graphics (with associated video configuration files and driver software).

It appears that, depending on the type of video graphics that Grub2 users have, the right-SHIFT key may or may-not work for you — to get boot messages to show on screen.

Changing the text size for kernel and ‘init.d’ boot messages :

I pointed out above that I was able to set the Grub2 variable ‘GRUB_GFXMODE’ to control the text size that Grub2 uses, for example, in showing the Grub2 boot menu and the Grub2 edit-prompt.

in the ‘/etc/default/grub’ file — followed by using the ‘sudo update-grub’ command — worked nicely for my monitor.

However, the ‘GRUB_GFXMODE’ parameter does not affect the size of the text used for messages coming from the kernel and from various bootup scripts in the ‘/etc/init.d’ directory.

Some forums have suggested the following for early versions of Grub2 — but this did not work for me.

In the file ‘/etc/grub.d/00_header’, try a ‘set gfxpayload’ statement like

set gfxpayload=1280x1024x32

set gfxpayload=1280×1024

No luck for me. I may continue to do web searches on keywords such as kernel boot messages text size and init.d boot messages text size to find a method of reducing the text-height of the boot messages coming from the kernel and from the ‘init.d’ scripts.

The GNU GRUB Manual 2.00 says that if the ‘gfxpayload’ variable is set, «it controls the video mode in which the Linux kernel starts up, replacing the ‘vga=’ boot option».

The GRUB manual goes on to say that ‘gfxpayload’ «may be set to ‘text’ to force the Linux kernel to boot in normal text mode, ‘keep’ to preserve the graphics mode set using ‘gfxmode’, or any of the permitted values for ‘gfxmode’ to set a particular graphics mode (see ‘gfxmode’).»

Some forums, like this (at askubuntu.com) or this (at cyberciti.biz) indicate that (although the ‘vga=’ option was deprecated about the time that Grub2 was released) statements like

GRUB_CMDLINE_LINUX_DEFAULT=»vga=791″

GRUB_CMDLINE_LINUX_DEFAULT=»vga=0x318″

[ ‘0x318’ is hex for decimal 792. ]

may still work in early versions of Grub2.

I may try this in my early version of Grub2 and report back here on the results.

GRUB_CMDLINE_LINUX_DEFAULT=»vga=791″

into the ‘/etc/default/grub’ file and ran ‘update-grub’. Now I get nice, smaller-sized text for the kernel messages and the messages coming from the ‘init.d’ scripts.

Читайте также:  Как открыть образ linux

For reference, here is a ‘VGA Resolution and Color Depth Reference Chart’ from a www.pendrivelinux.com page, in case that page goes dead.

Depth 800×600 1024×768 1152×864 1280×1024 1600×1200
8 bit vga=771 vga=773 vga=353 vga=775 vga=796
16 bit vga=788 vga=791 vga=355 vga=794 vga=798
24 bit vga=789 vga=792 vga=795 vga=799

I probably could have used some other values associated with 1024×768 resolution — such as 773 or 792. And since my monitor and graphics card supports 1280�1024, I probably could have used values such as 775, 794, or 795 — which may have given an even smaller font.

I *AM* getting a ‘vga=791 is deprecated’ message line, near the start of the boot messages — as indicated in this 2009 Ubuntu forum post. But I can live with that.

If the ‘deprecated’ message gets annoying, I may try to eliminate it by use of a ‘gfxpayload=’ statement, as suggested in the ‘deprecated’ message that is mentioned in the 2009 Ubuntu forum post. But it is not totally clear to me where the ‘gfxpayload=’ should be placed.

does not make it clear what ‘before linux command’ means.

I tried ‘set gfxpayload=1280×1024’ once already, as mentioned above — in ‘/etc/grub.d/00_header’, followed by the ‘update-grub’ command. But it did not work for me.

GRUB_CMDLINE_LINUX=»gfxpayload=1024x768x24,1024×768″

— as mentioned in the 2009 Ubuntu forum post above — would work. That may be my next attempt, if the ‘deprecated’ message becomes really annoying to me. In the 2009 Ubuntu forum post, ‘Ubuntist’ claimed that all was ‘sweetness and light’ after he used that form.

For later versions of Grub2, the environment variable setting statement

GRUB_GFXPAYLOAD_LINUX=

may be used in the ‘/etc/default/grub’ file to cause the ‘gfxpayload’ variable to be set to one of the several values mentioned in the Gnu ‘GRUB Manual 2.00’ pages on gfxpayload and gfxmode — namely, ‘text’, ‘keep’, or a ‘gfxmode’ value such as ‘auto’ or ‘widthxheight’ or ‘widthxheightxdepth’.

Slowing-down Fast-moving Boot Messages (and looking in log files) :

In response to a 2004 forum question at linux.questions.org, someone said:

«You can stop the ‘init.d’ messages scrolling by hitting ‘Ctrl-s’. They continue again with ‘Ctrl-q’.

Also ‘shift-pgup’ and ‘shift-pgdown’ should scroll the contents of the screen in the console.

I may try these key-combinations on my desktop Ubuntu 9.10 system — which is installed on a home-built PC with an AMD motherboard with an AMD/ATI video/graphics controller. Hopefully, the AMD video/graphics system will respond to these key combinations, as described above.

I plan to report the results here.

Note that the 2004 forum post above suggested looking for the boot messages in the files ‘/var/log/syslog’ and ‘/var/log/messages’.

On my Ubuntu 9.10 system, I have both ‘syslog’ and ‘messages’ log files. In fact, I can see the following files in /var/log:

Here is a full list of the files in /var/log — for Ubuntu 9.10 — along with typical file sizes (in bytes) and with ownership userids.

Unfortunately, not all the bootup messages — from the ‘init.d’ scripts (and maybe from the kernel) — are recorded in the various log files in the directory /var/log.

Читайте также:  Linux date установка времени

I have looked for various strings that I have seen in boot messages on the screen and have not been able to find some of those strings in any of the log files in /var/log.

I may continue to do web searches on keywords such as init.d boot messages log file to find if there is a way of finding (most of) the ‘init.d’ boot messages in log files.

An OLD (not recommended) way of putting boot messages in a log file :

In a 2008 blog post at an Ubuntu blog, the following (not recommended) advice was presented.

«If you want to enable boot logging, open a terminal and type the following:

sudo gedit /etc/default/bootlogd

Change BOOTLOGD_ENABLE to yes.

Some people at the ‘HOWTO: Log Boot Messages’ thread at ubuntuforums.org have marveled that ‘yes’ is not the default in ‘/etc/default/bootlogd’.

For example, Marcos.Rufino said:

BUT at post#28 in that thread, ‘pseudonym’ says:

«The info ‘dmesg’ gives you is not the same as what ‘bootlogd’ used to give you. Instead, it’s essentially the same log info as you find in /var/log/messages or /var/log/syslog — i.e. kernel messages.

At post#46, ‘dougie173’ says — in response to a comment that you can find boot logs in the ‘messages’, ‘messages.1’, ‘messages.2’, . files in /var/log/ :

«Unfortunately [not all] the console [boot] messages [are] in there.

I need to see the full details as there are some unsavory messages that flash past too quick to see and they are not logged in ‘/var/log/messages’.

‘dougie173’ did not get a response to this ‘how to increase the verbosity’ query.

In post#47, ‘petteriIII’ says:

«It hasn’t been mentioned yet, so I’ll mention it here. For me at least, when /var/log/boot.log is enabled, it doesn’t get everything, just the early messages. To see the later stuff, press Ctrl+Alt+F1 after Ubuntu has finished starting up. To get back to your regular screen, press Alt+F7.

As of 2015 May 18, I may continue to look for (better) ways to show and examine Linux boot messages — especially the messages coming from the ‘init.d’ scripts. (Most of those messages are probably written to a ‘sysout’ or ‘syserr’ file in a ‘console’, and NOT to a log file.)

Bottom of this
Viewing Linux Boot Messages page.

To return to a previously visited web page location, click on the Back button of your web browser a sufficient number of times. OR, use the History-list option of your web browser.
OR .

Page was created 2015 May 18.

Page was changed 2015 May 22.
(Described use of ‘vga=791’.)

Page was changed 2018 Sep 02.
(Added css and javascript to try to handle text-size for smartphones, esp. in portrait orientation.)

Page was changed 2018 Dec 13 and 14.
(Minor changes. Mostly text highlighting. Also some changes to improve text formatting when the browser window is in portrait form.)

Источник

Оцените статью
Adblock
detector