Jump to content











Photo
- - - - -

Help customizing grub4dos


  • Please log in to reply
16 replies to this topic

#1 cyrusza

cyrusza
  • Members
  • 8 posts
  •  
    Italy

Posted 05 January 2017 - 04:47 PM

Hello guys,

 

I'm struggling trying to find information to customize grub4dos to get a setup similar to grub2 themes.

 

In particular I have a very simple image 200x200 on grub2 that I place on the upper right corner, aside from the resolution. On grub4dos I found that I can use this line to get a menu that automatically adapt the resolution to the hardware capabilities of the machine:

graphicsmode -1 100:1100 100:1000 24:32 

Thing is, if I create a 1024x768 background manually putting the 200x200 image on a static background, the splashimage doesn't resize automatically when the resolution change.

 

Is there a way to get this kind of effect or is there a way to place the small image on the upper right corner?

 

 

Thanks for the help :)

 



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 05 January 2017 - 06:49 PM

Maybe you want/need the "offset" command?

http://reboot.pro/to...-grub4dos-046a/

 

 

:duff:

Wonko



#3 cyrusza

cyrusza
  • Members
  • 8 posts
  •  
    Italy

Posted 05 January 2017 - 11:58 PM

Maybe you want/need the "offset" command?

http://reboot.pro/to...-grub4dos-046a/

 

 

:duff:

Wonko

 

Oh! Thanks a lot for this, I will read and come back if I need more help  :D



#4 cyrusza

cyrusza
  • Members
  • 8 posts
  •  
    Italy

Posted 06 January 2017 - 01:38 AM

This code works a treat and I don't have to use MENUSETTING. It puts the image in the upper right corner and with setmenu removes the menu border and sets word/line spacing of the items.

graphicsmode -1 640  100:1000 24:32 && set GM=640
graphicsmode -1 800  100:1000 24:32 && set GM=800
graphicsmode -1 1024 100:1000 24:32 && set GM=1024
pause --wait=1
splashimage --fill-color=0x000000
set /A POSX=%GM%-240 && set POSY=20
splashimage --offset=0=%POSX%=%POSY% /grub4dos/stamp-220x160.bmp.gz
color normal=0x07 highlight=0x74 helptext=0x07 heading=0x04 standard=0x07 border=0x00
setmenu --box l=0 --font-spacing=1:3

Now I need only to modify the header and the footer... Any hints?


Edited by cyrusza, 06 January 2017 - 01:55 AM.


#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 January 2017 - 10:02 AM

 

Now I need only to modify the header and the footer... Any hints?

What do you mean "Header" and "footer"?

The text with grub4dos verson and the quick "which key to press" help text?

 

Probably you mean *something like*:

http://www.rmprepusb...o-menu-on-boot-

but more likely you want to experiment with GFX menues. :dubbio:

 

Search on the board for "GFXmenu" and double check:
http://www.easy2boot...x-menu-support/

 

BUT you can also play with these values::
color normal=0x07 highlight=0x74 helptext=0x07 heading=0x04 standard=0x07 border=0x00

See:
http://www.rmprepusb...ts-and-graphics

 

 

:duff:

Wonko



#6 cyrusza

cyrusza
  • Members
  • 8 posts
  •  
    Italy

Posted 06 January 2017 - 11:24 AM

What do you mean "Header" and "footer"?

The text with grub4dos verson and the quick "which key to press" help text?

 

Probably you mean *something like*:

http://www.rmprepusb...o-menu-on-boot-

but more likely you want to experiment with GFX menues. :dubbio:

 

Search on the board for "GFXmenu" and double check:
http://www.easy2boot...x-menu-support/

 

BUT you can also play with these values::
color normal=0x07 highlight=0x74 helptext=0x07 heading=0x04 standard=0x07 border=0x00

See:
http://www.rmprepusb...ts-and-graphics

 

 

:duff:

Wonko

 

Hi Wonko, exactly that  :D

 

I read about gfxmenu but I think that the splashimage solution is more flexible for minimal setups like mine. My setup is only a black background with a stamp and the standard menu with no borders. I found in your link the way to modify the header, but no way to modify the footer... 


Edited by cyrusza, 06 January 2017 - 11:25 AM.


#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 January 2017 - 01:16 PM

Hi Wonko, exactly that  :D

 

I read about gfxmenu but I think that the splashimage solution is more flexible for minimal setups like mine. My setup is only a black background with a stamp and the standard menu with no borders. I found in your link the way to modify the header, but no way to modify the footer... 

Well, if you make a basIc GFX menu it won't be that much different form a plain text with splashimage and "stamp" and what not.

 

What happens if you change the helptext colour?

 

And what if you change its value?

 

Check the Easy2boot, it has some provisions for doing that, you can replicate its behaviour.

http://www.easy2boot.com/

 

Side note/disclaimer, Easy2boot has over the years become probably the best "do everything" boot "suite", but for the same reasons it has become extremely complex with any number of "interconnected" files, so, unless Steve6375 chimes in and tells us how he does it, you will need some time to find out the way it is done.

 

:duff:

Wonko



#8 cyrusza

cyrusza
  • Members
  • 8 posts
  •  
    Italy

Posted 06 January 2017 - 01:21 PM

Well, if you make a basIc GFX menu it won't be that much different form a plain text with splashimage and "stamp" and what not.

 

What happens if you change the helptext colour?

 

And what if you change its value?

 

Check the Easy2boot, it has some provisions for doing that, you can replicate its behaviour.

http://www.easy2boot.com/

 

Side note/disclaimer, Easy2boot has over the years become probably the best "do everything" boot "suite", but for the same reasons it has become extremely complex with any number of "interconnected" files, so, unless Steve6375 chimes in and tells us how he does it, you will need some time to find out the way it is done.

 

:duff:

Wonko

 

I tried, it only changes the color. Ayway I think I found a solution, although it's quite "radical": hex editing the grldr... I suppose it should work if there is no hash/crc check...

 

Yeah noticed about the E2B, there's a lot of stuff there. Thing is I like to learn during the process and grub4dos docs it's so fragmented.


Edited by cyrusza, 06 January 2017 - 01:23 PM.


#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 January 2017 - 01:28 PM

Sure it works, lots of people use that approach.

 

You don't even need to hex-edit it, as you can use grub4dos internal features to patch it, I believe this is what Steve6375 does in Easy2boot.

 

:duff:

Wonko



#10 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 06 January 2017 - 01:35 PM

type

help setmenu  for help

 

you may want to look at setmenu --keyhelp and --help to change the position and colour of the menu entry help text.

 

--help is for the menu entry help text, --keyhelp is for the grub4dos help text (e.g. 'press c for command, e for edit' that you get when you don't use /n(help text) in a title or iftitle line).

 

you can use setmenu --ver-off to remove the version header

 

For the grub4dos title, I cover this over in E2B (so it will still work with 0.4.5c)

set HCOLOUR=0133
set HPAD=\x20  \x20
set HBTM=3502
set HEADING=\x20                EASY2BOOT V1 - MAIN MENU                   \x20
set HELPTEXT=Visit www.easy2boot.com
set HEADPOS=0000
set HP=0000 $[0004]                                                                \necho -n -e -P:
write (md)0x220+1 !BAT\necho -n -e -P:%HP%%%^HEADPOS% $[\x25HCOLOUR\x25]%HPAD%\x25HEADING\x25\necho -n -P:%HBTM% $[\x25FCOLOUR\x25]%HELPTEXT%\0 > nul
initscript (md)0x220+1
set HP=

basically, we write a blank line to the top (HP) and then write another line to the same line or a different line (HEADPOS) depending on where you want your own heading to appear.

 

HPAD shifts the heading over to the right, it can be set to nothing if you don't need it.

 

http://www.rmprepusb...orials/grub4dos


Edited by steve6375, 06 January 2017 - 02:49 PM.


#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 January 2017 - 02:35 PM

@Steve

I was referring to the "footer":

set HELPTEXT=Visit www.easy2boot.com

what will happen if it is not defined (or a space)?

 

Or, if you prefer the:

# display the grub4dos heading and cover up grub4dos version text
write (md)0x220+1 !BAT\necho -n -P:0000 $[0133] \0
initscript (md)0x220+1

here:

http://www.rmprepusb...c-grub4dos-menu

does it overwrite just the "header" (grub4dos version text) or also the "footer" (helptext)?

 

:duff:

Wonko



#12 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 06 January 2017 - 02:45 PM

a normal grub4dos menu has no footer???

 

I create the footer by writing a line to a position on the screen using -P:[0864] to position the text.

 

sorry, I missed out that you need to set HBTM to something too

set HBTM=3502

which sets the position of the footer text.



#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 January 2017 - 03:09 PM

a normal grub4dos menu has no footer???

The OP used "footer" to mean the "helptext", you know the thing that normally goes:

Use the (arrow up) and (arrow down) keys to highlight an entry.  Press ENTER or 'b' to boot.

Press 'e' to edit the commands before booting or 'c' for a command line.

 

What he wants is to have that message not shown.

 

:duff:

Wonko



#14 cyrusza

cyrusza
  • Members
  • 8 posts
  •  
    Italy

Posted 06 January 2017 - 03:13 PM

Ahahah sorry, I'm new to grub4dos so I need to learn the naming convention  :D

 

I tried your code steve and it changes the help text, but not fully. It just replaces part of the string. What actually happen is that I get the following:

 

Visit www.easy2boot.com keys to highlight an entry.  Press ENTER or 'b' to boot.

Press 'e' to edit the commands before booting or 'c' for a command line.


Edited by cyrusza, 06 January 2017 - 03:13 PM.


#15 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 06 January 2017 - 03:13 PM

That is what is changed by --keyhelp  - it will appear under the menu area normally if no title help text after \n has been defined in the menu.

 

Just set it to a line off the screen like line 87 or something



#16 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 06 January 2017 - 03:14 PM

Ahahah sorry, I'm new to grub4dos so I need to learn the naming convention  :D

 

I tried your code steve and it changes the help text, but not fully. It just replaces part of the string. What actually happen is that I get the following:

 

I don't think it is changing the keyhelp text, it is just overwriting it.

 

If you don't want the text to appear, I use for 0.4.6a

setmenu --keyhelp=61=0xe && setmenu --ver-off


#17 cyrusza

cyrusza
  • Members
  • 8 posts
  •  
    Italy

Posted 06 January 2017 - 03:17 PM

 

I don't think it is changing the keyhelp text, it is just overwriting it.

 

If you don't want the text to appear, I use for 0.4.6a

setmenu --keyhelp=61=0xe && setmenu --ver-off

 

Got it. You and Wonko are awesome  :lol:






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users