PavelRadzevich / grub4dos-chenall

Automatically exported from code.google.com/p/grub4dos-chenall
0 stars 0 forks source link

Suggestion: fallback vga mode support #92

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Not a bug, but a feature request (I might implement this myself with a little 
help).

Summary:
----
I'm using grub4dos to start an kernel+initrd from the Windows bootmgr. The 
initrd starts Xorg and runs a GUI on startup.

The copying of grub4dos+kernel+initrd, and the modification of the BCD store 
are done automatically, just like Ubuntu's WUBI does. 

The GUI needs a 1024x768@32bpp mode, and about 10% of the machines I've tried 
don't support this as a standard VESA mode. In this case, 16bpp at the same 
resolution would be acceptable ...

... but neither the linux kernel, nor grub support something like "vga=792 
vga_fallback=791" as options, and adding this to grub seems the easiest of the 
two.
----

So I have these questions about the grub4dos sources:
- in which file is the kernel commandline parsed ?
- where could I store the vga_fallback value, if present ?
- would modifying mode_set (in video.S) to try with the fallback mode be enough 
?

Thanks!

Original issue reported on code.google.com by har...@gmail.com on 14 Jun 2012 at 2:55

GoogleCodeExporter commented 8 years ago
I suppose you may use 

setvbe 1024x768x16

and then the kernel command with its arguments followed by the initrd command.

And the source code needn't change.

Original comment by tinyb...@gmail.com on 15 Jun 2012 at 4:12

GoogleCodeExporter commented 8 years ago
Thanks for the reply, it was spot-on. The issue can be closed, I ended up 
adding a fallback entry:

=====
title Image-1024x768x32
setvbe 0x118 || fallback --go 1
kernel /... vga=792

title Image-1024x768x16
setvbe 0x117
kernel /... vga=791
=====

Something like 

mode=792
setvbe 0x118 || set mode=791
kernel /... vga=$mode

would have been even easier but as far as I know, assigning custom variables 
isn't supported.

Original comment by har...@gmail.com on 16 Jul 2012 at 10:41

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hmm, vga=%mode% actually works. I wish I had tried this.

Original comment by har...@gmail.com on 16 Jul 2012 at 10:52

GoogleCodeExporter commented 8 years ago

Original comment by tinyb...@gmail.com on 23 Oct 2012 at 6:44