Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Perhaps you can get further help on #grub on irc.freenode.net or irc.gnu.org. –  Anonymous Nov 8 '11 at 20:15
    
Will not hwinfo --framebuffer display the same in a tty? Do you need to do it with vbeinfo? –  Bruno Pereira Nov 27 '11 at 3:26

3 Answers 3

up vote 3 down vote accepted

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.

share|improve this answer
    
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! –  WarriorIng64 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 0:36

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.

share|improve this answer
    
Is there a way to save the entire output without needing manual typing? –  WarriorIng64 Nov 30 '11 at 0:45
1  
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... cyberciti.biz/faq/howto-setup-serial-console-on-debian-linux –  fossfreedom Nov 30 '11 at 21:18

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.

share|improve this answer
    
the boot folder and its contents are actually visible to grub2 console - you cannot write to it though. –  fossfreedom Nov 28 '11 at 23:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.