10

I'm trying to correct some GRUB2 and Plymouth display problems in 11.10 as part of an ongoing saga. I'm going to run the vbeinfo command to check supported display modes, but unfortunately from what I can tell this command can only be run from GRUB2, and hence the output is only visible while the command is run in it.

I would like to keep a copy of the output for reference or sharing. Is it possible to save this output somewhere I can access it after logging in, and if so, how would I do it? Alternately, if it is not possible to save the output, then why not?

And because I know someone might answer with this: no, I do not have a camera handy to take a picture of my screen (besides my laptop's webcam, which is an awkward solution at best), and I would rather not write it all down on paper if I can help it.

4 Answers4

4

Saving the output of vbeinfo will proof the be not possible without too much work.

Fortunately you can also use hwinfo to list your VBE supported modes using the command sudo hwinfo --framebuffer in a terminal.

Install hwinfo with the command sudo apt-get install hwinfo.

Bruno Pereira
  • 73,643
  • I've just tried this out. It does seem to return similar output to vbeinfo as far as display modes are concerned, but it returns completely different hardware information and it's overall not the same format. That, and having to install additional packages is somewhat inelegant. Thanks for the suggestion, though! – Knowledge Cube Nov 27 '11 at 23:16
  • I have to agree on that, but the steps to get any output of vbeinfo saved will be so much harder to achieve and the results will be the same. – Bruno Pereira Nov 28 '11 at 00:36
3

Grub2 doesnt allow you to save files - from a security point of view and for the reason to prevent corruption to the filesystem from an invalid grub configuration.

The closest you can come to writing information from grub is to save the value of an environment variable which you can subsequently read from the running O/S.

Thus, you can run vbeinfo and then create an environment variable containing the information you want to save.

set myvar="some vbeinformation typed manually"
export myvar
save_env myvar

In the running O/S the file /boot/grub/grubenv will have the environment variable that you have just saved.

You could parse that file for your information. Perhaps easier use the following to list all saved variables.

grub-editenv list

This file - called the environment block is limited to 1024 characters.

Use the following to reset the file:

sudo grub-editenv create

Note from this wiki:

For safety reasons, this storage is only available when installed on a plain disk (no LVM or RAID), using a non-checksumming filesystem (no ZFS), and using BIOS or EFI functions (no ATA, USB or IEEE1275).

From my testing - there is probably a bug lurking somewhere. It can take a couple of tries before the environment block is successfully written to.

fossfreedom
  • 172,746
  • Is there a way to save the entire output without needing manual typing? – Knowledge Cube Nov 30 '11 at 00:45
  • 2
    I've been looking hard for just this. It seems GRUB2 does not have the ability to redirect the output of a command. Whilst the command console appears to look like a bash shell, it doesnt have any redirect ">" type features. About the only "redirect" capability of Grub & Grub2 is to pipe the output of grub through a serial link - I suppose this is for users using hyperterminal or minicom. I suppose that is one way to "capture" the output. Seems like a large hammer to crack your particular nut though... http://www.cyberciti.biz/faq/howto-setup-serial-console-on-debian-linux/ – fossfreedom Nov 30 '11 at 21:18
1

Unfortunately it's unlikely you can save the output from vbeinfo as no file system has been mounted at this stage of the boot process for GRUB2 to save it to.

Kebabman
  • 1,060
0

you can use the built in pager with:

set pager=1
Buckshee
  • 71
  • 3