Having GRUB set video mode?
Having GRUB set video mode?
Is this possible? I saw some mention of it in thier documentation but I didn't know much about it in general. Can anyone elaborate on this?
Regards,
Nelson
Regards,
Nelson
Re:Having GRUB set video mode?
The multiboot spec does define some parts of the multiboot header for telling the loader what display mode to use, but it doesn't seem to work. I think there are other ways though.Nelson wrote: Is this possible? I saw some mention of it in thier documentation but I didn't know much about it in general. Can anyone elaborate on this?
Regards,
Nelson
srg
Re:Having GRUB set video mode?
Grub currently doesn't support changing the VESA mode, but you can grab a patched version that does here:
http://djm.co.za/spoon/grub/grub.php
I've been using it for a few days, works well. It also fills in the multiboot header information for the current mode.
I don't know why this isn't included in the grub, they have support for probing and testing vesa modes, just not setting it before jumping into protected mode.
Eddie
http://djm.co.za/spoon/grub/grub.php
I've been using it for a few days, works well. It also fills in the multiboot header information for the current mode.
I don't know why this isn't included in the grub, they have support for probing and testing vesa modes, just not setting it before jumping into protected mode.
Eddie
Re:Having GRUB set video mode?
It's not included because it doesn't correctly switch back to normal text mode if something goes wrong during the loading of everything.
And I don't think they're too interested since it was shot down on two occasions as well as on a further patched version of my patch. Further development on GRUB is finished and GRUB2 has begun.
And I don't think they're too interested since it was shot down on two occasions as well as on a further patched version of my patch. Further development on GRUB is finished and GRUB2 has begun.
Re:Having GRUB set video mode?
;)my os floppy image, use fat12 grub file from spoon.
http://freehost10.websamba.com/jicama/jicama/floppy.rar
http://freehost10.websamba.com/jicama/jicama/floppy.rar
Re:Having GRUB set video mode?
cool! I wonder how many people do use it.
I mentioned to the grub maintainers that I thought it would help out new hobby OS developers a lot as it would make the whole switching to VESA mode a non-issue. There would be a lot more pretty OS's to look at.
I mentioned to the grub maintainers that I thought it would help out new hobby OS developers a lot as it would make the whole switching to VESA mode a non-issue. There would be a lot more pretty OS's to look at.
Re:Having GRUB set video mode?
isn't it possible to switch using a module? I dunno if they are executed while in real mode.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Having GRUB set video mode?
modules are not executed: they're loaded. period.
Re:Having GRUB set video mode?
Oh, I guess I'll either
A) use that patched GRUB
B) write my own loader
or use a prewritten one.
A) use that patched GRUB
B) write my own loader
or use a prewritten one.
Re:Having GRUB set video mode?
Hi,
This "thunk" code does a bit of memory juggling, switches the CPU back to real mode and then starts the normal kernel/boot image (that GRUB loaded as a module).
This means the normal kernel/boot code ends up at a specific address and is started in real mode - the same as it would have been setup by normal boot code (e.g. 1440 KB floppy boot sector, DOS boot utility, etc).
Because you're always starting in real mode there's no problems with using the BIOSs to setup video - I generate a list of possible modes and let the user scroll through the list to select (and test) any video mode (I've actually got a full graphical boot menu in 640*480 that uses the BIOS video and keyboard).
Cheers,
Brendan
I use my own loaders and normal/unpatched GRUB. The trick I use with GRUB is to load the normal kernel/boot image (that GRUB thinks is a module), and also load some "thunk" code (that GRUB thinks is the kernel).Nelson wrote: Oh, I guess I'll either
A) use that patched GRUB
B) write my own loader
or use a prewritten one.
This "thunk" code does a bit of memory juggling, switches the CPU back to real mode and then starts the normal kernel/boot image (that GRUB loaded as a module).
This means the normal kernel/boot code ends up at a specific address and is started in real mode - the same as it would have been setup by normal boot code (e.g. 1440 KB floppy boot sector, DOS boot utility, etc).
Because you're always starting in real mode there's no problems with using the BIOSs to setup video - I generate a list of possible modes and let the user scroll through the list to select (and test) any video mode (I've actually got a full graphical boot menu in 640*480 that uses the BIOS video and keyboard).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.