GRUB Boot Picture

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
whiteOS
Member
Member
Posts: 29
Joined: Mon Oct 06, 2008 12:38 am

GRUB Boot Picture

Post by whiteOS »

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?
CodeCat
Member
Member
Posts: 158
Joined: Tue Sep 23, 2008 1:45 pm
Location: Eindhoven, Netherlands

Re: GRUB Boot Picture

Post by CodeCat »

Switch video mode and write the picture to video memory?
User avatar
Walling
Member
Member
Posts: 158
Joined: Mon Dec 04, 2006 6:06 am
Location: Berlin, Germany

Re: GRUB Boot Picture

Post by Walling »

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.
whiteOS
Member
Member
Posts: 29
Joined: Mon Oct 06, 2008 12:38 am

Re: GRUB Boot Picture

Post by whiteOS »

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?
User avatar
Walling
Member
Member
Posts: 158
Joined: Mon Dec 04, 2006 6:06 am
Location: Berlin, Germany

Re: GRUB Boot Picture

Post by Walling »

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.
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: GRUB Boot Picture

Post by Jeko »

Maybe you can have a boot picture using the splashimage option. I think there is a patch to do this.
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
whiteOS
Member
Member
Posts: 29
Joined: Mon Oct 06, 2008 12:38 am

Re: GRUB Boot Picture

Post by whiteOS »

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.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: GRUB Boot Picture

Post by Brynet-Inc »

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

[The extension patch has been deactivated and can no longer be displayed.]

[The extension patch has been deactivated and can no longer be displayed.]

Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: GRUB Boot Picture

Post by Jeko »

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?
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
User avatar
Walling
Member
Member
Posts: 158
Joined: Mon Dec 04, 2006 6:06 am
Location: Berlin, Germany

Re: GRUB Boot Picture

Post by Walling »

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: Select all

patch -p0 < patch-file
And how do you use it. Well, it says on the website... follow the link. :)
whiteOS
Member
Member
Posts: 29
Joined: Mon Oct 06, 2008 12:38 am

Re: GRUB Boot Picture

Post by whiteOS »

this how on windows:

Code: Select all

@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?
User avatar
Walling
Member
Member
Posts: 158
Joined: Mon Dec 04, 2006 6:06 am
Location: Berlin, Germany

Re: GRUB Boot Picture

Post by Walling »

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: Select all

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

[The extension patch has been deactivated and can no longer be displayed.]

User avatar
codemastersnake
Member
Member
Posts: 148
Joined: Sun Nov 07, 2004 12:00 am
Contact:

Re: GRUB Boot Picture

Post by codemastersnake »

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?
whiteOS
Member
Member
Posts: 29
Joined: Mon Oct 06, 2008 12:38 am

Re: GRUB Boot Picture

Post by whiteOS »

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.
User avatar
Walling
Member
Member
Posts: 158
Joined: Mon Dec 04, 2006 6:06 am
Location: Berlin, Germany

Re: GRUB Boot Picture

Post by Walling »

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: Select all

--- 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;
        }
     }
Post Reply