OSDev.org
https://forum.osdev.org/

GRUB Boot Picture
https://forum.osdev.org/viewtopic.php?f=1&t=18255
Page 1 of 2

Author:  whiteOS [ Sat Oct 25, 2008 6:39 pm ]
Post subject:  GRUB Boot Picture

I have been looking for a way to show a picture during boot like Ubuntu or most OS. I heard there is a way using GRUB but I cannot recall. Any hints?

Author:  CodeCat [ Sat Oct 25, 2008 6:48 pm ]
Post subject:  Re: GRUB Boot Picture

Switch video mode and write the picture to video memory?

Author:  Walling [ Sat Oct 25, 2008 7:19 pm ]
Post subject:  Re: GRUB Boot Picture

You can patch GRUB to support graphical themes. I think GRUB2 will support it natively. But booting your OS will still be in text mode. I agree with CodeCat.

Author:  whiteOS [ Sat Oct 25, 2008 7:27 pm ]
Post subject:  Re: GRUB Boot Picture

I just want graphical boot screen. GRUB has VBE functions built-in, why would I build a vesa driver? Any one using GRUB to load an image at boot? Link, Sample, Hint?

Author:  Walling [ Sat Oct 25, 2008 9:48 pm ]
Post subject:  Re: GRUB Boot Picture

whiteOS wrote:
I just want graphical boot screen. GRUB has VBE functions built-in, why would I build a vesa driver? Any one using GRUB to load an image at boot? Link, Sample, Hint?

You still need the setvbe patch or a similar patch. AFAIK support for the Multiboot video fields newer made it into GRUB Legacy.

Author:  Jeko [ Sun Oct 26, 2008 5:32 am ]
Post subject:  Re: GRUB Boot Picture

Maybe you can have a boot picture using the splashimage option. I think there is a patch to do this.

Author:  whiteOS [ Sun Oct 26, 2008 10:36 am ]
Post subject:  Re: GRUB Boot Picture

Anyone know where I get grub 0.94 vbe patch. this link dead: http://www.smk.co.za/software/vbe-grub/ the site runs but link to patch is dead.

EDIT: Jeko, thank you for suggestion. That is what i remember i heard now. this was a while ago i heard so hearing that made it come to mind. yes, i think the vbe patch is the same as you suggested. i keep looking.

Author:  Brynet-Inc [ Sun Oct 26, 2008 1:42 pm ]
Post subject:  Re: GRUB Boot Picture

whiteOS wrote:
Anyone know where I get grub 0.94 vbe patch. this link dead: http://www.smk.co.za/software/vbe-grub/ the site runs but link to patch is dead.

I mentioned this to him on his blog, I'm sure he'll get around to fixing it.. until then I'll attach the patches here.

Note; It cannot set a "boot image" as requested by the OP, that's a different patch.. it's typically found in the repositories of Linux distributions.

Looking back though, I realize I forgot to add the *.texi files as mentioned in the ChangeLog, whoops, not sure what happened to them. ;)

Have fun.

Attachments:
vbe_grub-0.97.patch [8.6 KiB]
Downloaded 217 times
vbe_grub-0.94.patch [9.03 KiB]
Downloaded 173 times

Author:  Jeko [ Sun Oct 26, 2008 2:20 pm ]
Post subject:  Re: GRUB Boot Picture

Brynet-Inc wrote:
whiteOS wrote:
Anyone know where I get grub 0.94 vbe patch. this link dead: http://www.smk.co.za/software/vbe-grub/ the site runs but link to patch is dead.

I mentioned this to him on his blog, I'm sure he'll get around to fixing it.. until then I'll attach the patches here.

Note; It cannot set a "boot image" as requested by the OP, that's a different patch.. it's typically found in the repositories of Linux distributions.

Looking back though, I realize I forgot to add the *.texi files as mentioned in the ChangeLog, whoops, not sure what happened to them. ;)

Have fun.


How can I apply the patch? And to use it, must I change something in my menu.lst?

And where can I find the patch for the splashimage?

Author:  Walling [ Sun Oct 26, 2008 5:03 pm ]
Post subject:  Re: GRUB Boot Picture

Jeko wrote:
How can I apply the patch? And to use it, must I change something in my menu.lst?

Try something like this:
Code:
patch -p0 < patch-file

And how do you use it. Well, it says on the website... follow the link. :)

Author:  whiteOS [ Sun Oct 26, 2008 8:27 pm ]
Post subject:  Re: GRUB Boot Picture

this how on windows:

Code:
@echo off
set PATH=path_to_patch.exe;%PATH%
chdir path_to_patch.exe
patch.exe -p0 < file.patch
pause


any luck finding splashimage patch for 0.94 grub?

Author:  Walling [ Sun Oct 26, 2008 11:03 pm ]
Post subject:  Re: GRUB Boot Picture

whiteOS wrote:
any luck finding splashimage patch for 0.94 grub?

I found a patch for GRUB 0.97 in the Debian source files. I attached it. Be aware that it conflicts with the setvbe patch, but it's only two lines of code, so you can easily fix it. You also need automake in order to create a successful build using the Debian patch. I never used automake before. I just read the Debian patch script and saw what it did. I hope you can get automake for Windows (Cygwin?). Well, I did something like this:
Code:
tar xzvf grub-0.97.tar.gz  # Extract GRUB source code.
patch -p0 < grub_0.97-27etch1_debian_graphics.patch
patch -p0 < vbe_grub-0.97.patch
# Here I fixed the patch conflict. Use your favourite editor.
mkdir grubinst  # Folder for installing GRUB files.
cd grub-0.97/
aclocal-1.9
automake-1.9
autoconf
./configure --disable-auto-linux-mem-opt --prefix=../grubinst
make
make check
make install
cd ../grubinst/lib/grub/i386-pc/  # Here you find the built GRUB stages.

That's it! It works for me (you just need a 640x480 14-color .xpm image). The vbeset and vbematch exists as well, although they don't seem to work. When I use vbematch it displays "vbematch <resolution>" when loading my kernel, but it doesn't change the resolution or anything. The built-in vbeprobe command also gives me an error. Strange. :? I have only tested in Bochs/QEMU. I need to test it on a real computer.

Attachments:
File comment: Patch to add splashimage support for GRUB 0.97, found in the Debian source files.
grub_0.97-27etch1_debian_graphics.patch [59.43 KiB]
Downloaded 49 times

Author:  codemastersnake [ Mon Oct 27, 2008 4:42 am ]
Post subject:  Re: GRUB Boot Picture

I have a question!

Can't we just use the grub supplied with various distributions to make another floppy drive grub bootable by using grub-install command?

Author:  whiteOS [ Wed Oct 29, 2008 2:31 pm ]
Post subject:  Re: GRUB Boot Picture

Walling wrote:
although they don't seem to work. When I use vbematch it displays "vbematch <resolution>" when loading my kernel, but it doesn't change the resolution or anything. The built-in vbeprobe command also gives me an error. Strange. :? I have only tested in Bochs/QEMU. I need to test it on a real computer.


try setting this line at the end of your menu.lst:

vbeset 0x117

that should be 1024X768X16 mode, and it works for me. I of course see nothing sense i no have vbe address mapped, still trying to find a way to get address from grub.

Author:  Walling [ Wed Oct 29, 2008 4:00 pm ]
Post subject:  Re: GRUB Boot Picture

Snake wrote:
Can't we just use the grub supplied with various distributions to make another floppy drive grub bootable by using grub-install command?

Many distributions enable splashimage, but I haven't seen any use the vbeset patch for Multiboot kernels. Why should they? They only have to load the Linux kernel :shock: I have seen some distributions (openSUSE) that just pass a VBE mode number as a kernel argument and then it is up to the kernel to set the VBE mode.

whiteOS wrote:
try setting this line at the end of your menu.lst:

vbeset 0x117

that should be 1024X768X16 mode, and it works for me.

Does it work for you in Bochs/QEMU too? I have to try on a real machine, but I just had the time yet. The only pc I have (IBM X41 laptop) does not have a cd-drive, so I have to install the patched GRUB in order to test it. I will eventually.

whiteOS wrote:
I of course see nothing sense i no have vbe address mapped, still trying to find a way to get address from grub.

Hmm... it seems the vbeset patch isn't "finished". It does not transfer the VBE info to the kernel. Look in the patch file. There's a comment saying "give it to the kernel", but no code:
Code:
--- grub-0.97/stage2/boot.c     Tue Mar 30 11:44:08 2004
+++ grub-0.97/stage2/boot.c     Thu Nov 23 20:26:17 2006
@@ -87,6 +87,13 @@
            }
          type = KERNEL_TYPE_MULTIBOOT;
          str2 = "Multiboot";
+
+      /* Check to see if the kernel wants a video mode */
+         if ( (flags & MULTIBOOT_VIDEO_MODE) != 0 )
+         {
+               // ... give it to the kernel
+         }
+
          break;
        }
     }

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/