Jump to content











Photo
* * * * * 5 votes

Easy2Boot Development Discussion

grub4dos multiboot multipass usb boot iso

  • Please log in to reply
1396 replies to this topic

#1351 steve6375

steve6375

    Platinum Member

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

Posted 27 November 2019 - 01:36 PM

OK - so did you check the \_ISO\MyE2B.cfg file?

Does it have

set theme=XXXXX

at the bottom of it?



#1352 steve6375

steve6375

    Platinum Member

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

Posted 27 November 2019 - 01:41 PM

Try this

title Change Theme\nChoose a new E2B Theme
if not exist /_ISO/MyE2B.cfg echo ERROR: Please create a large \_ISO\MyE2B.cfg file && pause && configfile (md)0xa000+0x50
set CHOSEN=
errorcheck on
debug normal
graphicsmode 3
clear
echo Pick a Theme...
call /%grub%/pickafile.g4b /_ISO/MYTHEMES .cfg
if "%CHOSEN%"=="" set DONEMENU= && configfile ()/%grub%/menu.lst
echo
echo Overwriting \_ISO\MyE2B.cfg file with \_ISO\MYTHEMES\%CHOSEN%...
set "theme=%CHOSEN:~0,-4%"
# fill (rd) with 0's , 0x82d0 is rd-base mem address, Fn24 is memset - fill memory  <addr> <string> <size>
map (md)0x300+200 (rd) > nul ;; read 0x82d0 > nul ;; call Fn.24  %@retval% 0x00  102400 > nul
if exist ()/_ISO/MYTHEMES/%CHOSEN% dd if=(rd)+1 of=()/_ISO/MYE2B.cfg > nul
if exist ()/_ISO/MYTHEMES/%CHOSEN% dd if=()/_ISO/MYTHEMES/%CHOSEN% of=()/_ISO/MyE2B.cfg > nul
if exist ()/_ISO/MYTHEMES/%CHOSEN% echo -e \nset "theme=%theme%"\n >> /_ISO/MyE2B.cfg
if exist ()/_ISO/MYTHEMES/%CHOSEN% chainloader /grldr
set CHOSEN=
boot

notice that the map (md).... line has changed.

Also, make sure your \_ISO\MyE2B.cfg file is larger than your largest  .cfg file.

 

This seems to work for me and I get the theme set ok.



#1353 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 27 November 2019 - 01:59 PM

Now, It's work !


Edited by War10ck, 27 November 2019 - 02:01 PM.


#1354 steve6375

steve6375

    Platinum Member

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

Posted 27 November 2019 - 02:03 PM

Can't really help you without more details - ' it work' doesnt really help! What worked - what doesn't work?

So take the case of DOS menu

the mnu file under \_ISO\DOS\$$$$CONFIG\xxxxxx.mnu should be executed when the DOS menu is selected.

So what is in it?



#1355 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 27 November 2019 - 02:07 PM

No no it's work, just the WINDOWS MENU doesn't work,

 

the H:\_ISO\WINDOWS\$$$$CONFIG\SetBackground.mnu file:

   !BAT
   if "%MFOLDER%"=="/_ISO/WINDOWS" splashimage /_ISO/MYTHEMES/%theme%/WINDOWS.bmp

 

the path is OK


Edited by War10ck, 27 November 2019 - 02:10 PM.


#1356 steve6375

steve6375

    Platinum Member

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

Posted 27 November 2019 - 02:13 PM

Windows wont work because it is not a menu folder so .mnu files dont work

 

But there is a way. You can have

 

\_ISO\SVR2K8R2.g4b
\_ISO\SVR2012.g4b 
\_ISO\VISTA.g4b
\_ISO\WIN7.g4b 
\_ISO\WIN8.g4b
\_ISO\WIN10.g4b 
\_ISO\SVR2016.g4b 
\_ISO\SVR2019.g4b 
\_ISO\WINAIO.g4b 
\_ISO\WINDOWS.g4b 

 

so make a .g4b file which loads the wallpaper you want for each menu

and use the %theme% variable as in the .mnu file.

 

e.g. \_ISO\WINDOWS.g4b

 

!BAT

splashimage /_ISO/MYTHEMES/%theme%/WINDOWS.bmp



#1357 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 27 November 2019 - 02:27 PM

ahhh ok

 

Like that ?

 

\_ISO\SVR2K8R2.g4b

!BAT
# display new wallpaper
splashimage /_ISO/MYTHEMES/%theme%/XXXX.bmp

 

Finaly, it's the map line in trouble... what we do this line? 

Why we change this compared to your changeTheme.mnu in /EB/docs/ ?

 

-----------

 

I want to thank you for your patience because I am a beginner with your software.
I also buy your first guide but I have not read everything yet !!
Easy2boot is awesome but you have to tame it a little !!

I already have a functional key multiboot with my master in UEFI and legacy and tools like Hiren, medicat, Acronis etc ...

I would also like to thank you for your availability and quick response :)

I'll let you know about the rest ...

Thank you


Edited by War10ck, 27 November 2019 - 02:28 PM.


#1358 steve6375

steve6375

    Platinum Member

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

Posted 27 November 2019 - 02:33 PM

The map line was filling the MyE2B.cfg with spaces

 

 

i.e.

fill MyE2B.cfg with spaces

dd overwrite first  xxxx bytes - but after xxxx bytes we have 300 spaces

Now we try to append an extra line, but grub4dos cannot make a file bigger and so there is no room.

 

MyE2B.cfg

(lines from cfg file) (spaces up to end of file)

 

 

So I change the map command to fill the MyE2B.cfg file with 0 bytes

grub4dos regards 0 as end-of-text marker

so now

echo cccc > /_ISO/MyE2B.cfg

works because the end of text (0 bytes) is in middle of the file.

 

MyE2B.cfg

(lines from cfg file) (0,0,0,0,0,0,0,0,0)

now append set theme line >>>

(lines from cfg file) (set theme=xxx) (0,0,0,0,0,0)



#1359 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 27 November 2019 - 02:41 PM

Everything is explained !!

The xxx.g4b file wok for Windows menu !!!

 

Perfect !!

 

Will this methods change in the next versions or I could do the E2B updates without problems?



#1360 steve6375

steve6375

    Platinum Member

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

Posted 27 November 2019 - 03:14 PM

It shouldn't cause any problems with any future updates.



#1361 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 02 December 2019 - 07:02 PM

Hello Steve,

Thanks for the response.

Other question:

I use the command setmenu --middle-align on my theme with E2BE_Editor, the result is centered but not align like this :

2x0x.jpg

I would like to center menu entries and align them like this :

1sp3.jpg

It's possible to do that on Grub4dos ?

TKS


Edited by War10ck, 02 December 2019 - 07:03 PM.


#1362 steve6375

steve6375

    Platinum Member

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

Posted 02 December 2019 - 07:10 PM

The menu is correct. The menu entries are centred but they won't align because they are different lengths!

How can you centre a line of 20 characters on one line and centre a line of 40 characters on the next line and still have them aligned!

It is impossible!



#1363 steve6375

steve6375

    Platinum Member

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

Posted 02 December 2019 - 07:16 PM

P.S. If you want to, you can make all the menu entries the same length, then they will be aligned.

To do this make a new 'language' folder and then edit the STRINGS.txt file in your new language folder.

Then change the language to your new folder in the MyE2B.cfg file.

See http://www.easy2boot...2b-preset-text/



#1364 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 02 December 2019 - 07:48 PM

I think it was possible to begiining entries on a specific value (center) and align left them because there is plenty of room on the right.

I will test your solution...


Edited by War10ck, 02 December 2019 - 07:49 PM.


#1365 steve6375

steve6375

    Platinum Member

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

Posted 02 December 2019 - 07:53 PM

You can start the menu at any column

Use the editor and set rstart to  a large value or just use the mouse to draw the menu area you want to use.



#1366 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 02 December 2019 - 08:20 PM

Yeah I was tested that but it's not a solution for me because I want to keep border centered on background . (With no border it' s OK I can align left ant center all entries on the e background.)

 

I would like to do this identically that:

1sp3.jpg

 

or that but with menu entries align :

 

2x0x.jpg

 

you said : you can make all the menu entries the same length, then they will be aligned.

 

But I don't see on your link for how to do that or I haven't correctly read the document.


Edited by War10ck, 02 December 2019 - 08:42 PM.


#1367 steve6375

steve6375

    Platinum Member

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

Posted 02 December 2019 - 08:35 PM

Sorry, I don't understand what you are trying to achieve? Can you show an example of what you want?

 

It will be very difficult to use  middle-align and make all menu entries exactly the same length.

 

P.S. The link is correct, see Select a different language heading


Edited by steve6375, 02 December 2019 - 08:36 PM.


#1368 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 02 December 2019 - 08:40 PM

yes :

 

I would like to do keep the border and center menu entries like the image below:

 

1sp3.jpg

 

or that but with menu entries align :

 

2x0x.jpg

 

Like you said: I can make all the menu entries with the same length , then they will be aligned.

Maybetake the biggest menu entries characters and apply it on all entries


Edited by War10ck, 02 December 2019 - 08:43 PM.


#1369 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 December 2019 - 08:55 PM

Quick tip.

 

Open Notepad.

Select a fixed size font, let's say Courier New

Type in it:

 

012345678901234567890123456789012345678901234567890...

Imagine here to sketch some text 51 characters long

And try again - on next line - like I am doing here

All it takes is some fantasy, and some tricks, like

you can use in  some  cases multiple spaces or some

hyphens - or underscores _ or brackets ()  or other

similar non-alphabetic symbols, and use synonyms or

(unneeded) verbose details in the entry in order to

make each line exactly 51 fifty-one characters long

And here is a sample for a couple common boot items
Windows 7 Professional SP1 via chainloader /bootmgr

Windows 8.1 Home ( 32-bits ) September 2012 release

You can also invent new own names for booting items

Ubuntu whatever version "unique underwater unicorn"

 

:duff:

Wonko



#1370 steve6375

steve6375

    Platinum Member

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

Posted 02 December 2019 - 09:05 PM

If you make all the menu entries the same length, then you can use rstart or middle-align.

 

 

But you will need to change all you own menu entries too as well as the language file and have .txt files for all your ISOs, etc too.

 

The menu entries with (x present) will cause a problem though, so you can move the text to the help text line

$$STRm0WI=^Ctrl+I Menu WINDOWS           [Ctrl+I] (%CALL% au total)\nInstaller Windows sur un Disque Dur depuis une image ISO/imgPTN.

change to

$$STRm0WI=^Ctrl+I Menu WINDOWS           [Ctrl+I]\n%CALL% au total\nInstaller Windows sur un Disque Dur depuis une image ISO/imgPTN.


#1371 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 02 December 2019 - 09:09 PM

If you make all the menu entries the same length, then you can use rstart or middle-align.

 

Yes i want to do that but how ? :)

sry I'm tired



#1372 steve6375

steve6375

    Platinum Member

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

Posted 02 December 2019 - 09:16 PM

I told you. You need to create a new language folder

  • copy \_ISO\e2b\grub\FRENCH folder to new \_ISO\e2b\grub\WARLOCK folder
  • edit \_ISO\e2b\grub\WARLOCK\STRINGS.txt
  • change set LANG=FRENCH to  set LANG=WARLOCK in your MyE2B.cfg file (i.e. you language is WARLOCK now and it will use \_ISO\e2b\grub\WARLOCK folder for strings.

 

Do NOT change the FRENCH folder files!



#1373 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 02 December 2019 - 10:27 PM

yeah I understand but in

 

edit \_ISO\e2b\grub\WARLOCK\STRINGS.txt

 

how to edit length ? example ?



#1374 steve6375

steve6375

    Platinum Member

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

Posted 02 December 2019 - 10:36 PM

I already gave you an example

$$STRm0WI=^Ctrl+I Menu WINDOWS           [Ctrl+I]\n%CALL% au total\nInstaller Windows sur un Disque Dur depuis une image ISO/imgPTN.

 

To change the length of this menu entry, just adjust the length in bold type before the first \n

e.g.

$$STRm0WI=^Ctrl+I Menu WINDOWS                        [Ctrl+I]\n%CALL% au total\nInstaller Windows sur un Disque Dur depuis une image ISO/imgPTN.

will make it longer and 

$$STRm0WI=^Ctrl+I Menu WINDOWS   [Ctrl+I]\n%CALL% au total\nInstaller Windows sur un Disque Dur depuis une image ISO/imgPTN.

will make it shorter



#1375 War10ck

War10ck

    Newbie

  • Members
  • 19 posts
  •  
    France

Posted 02 December 2019 - 10:48 PM

pfff ok ok ;;; nooby







Also tagged with one or more of these keywords: grub4dos, multiboot, multipass, usb boot, iso

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users