./configure --enable-preset-menu=../preset_menu.lst
Edited by nguyentu, 11 March 2018 - 12:53 AM.
Posted 11 March 2018 - 12:47 AM
./configure --enable-preset-menu=../preset_menu.lst
Edited by nguyentu, 11 March 2018 - 12:53 AM.
Posted 11 March 2018 - 03:15 AM
No, unless this ahas also changed lately..This is the preset_menu.lst file. Grub4dos also has an option to embed other files instead.
./configure --enable-preset-menu=../preset_menu.lstI noticed that Grub4dos will load the configuration file (default is /menu.lst) on the first partition (hd0,0). If this file does not exist, it will load the embedded configuration.
configfile /boot/grub/menu.lst
configfile /grub/menu.lst
if "%@root%"=="(ud)" && calc *0x82A0=*0x82b9&0xff
if "%@root:~1,1%"=="f" && find --set-root --devices=f /menu.lst && configfile /menu.lst
find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
configfile http://b.chenall.net/menu.lst
Posted 11 March 2018 - 03:36 AM
@Wonko:
I see an embedded configuration file that contains:
timeout 1
Ok, if you think that Grub4dos will load the embedded configuration file first, you will see the following menus for 1 second.
find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst commandline reboot halt
Posted 11 March 2018 - 04:00 AM
Look, download this file:
http://dl.grub4dos.c...a-2018-03-03.7z
Extract from the archive grldr and grub.exe.
Open grldr in a hex editor, go to offset 0x04E50C.
Copy from there to the end of the file.
Paste in a text editor.
This is the result:
pxe detect configfile default 0 timeout 1 title find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst errorcheck off configfile /boot/grub/menu.lst configfile /grub/menu.lst if "%@root%"=="(ud)" && calc *0x82A0=*0x82b9&0xff if "%@root:~1,1%"=="f" && find --set-root --devices=f /menu.lst && configfile /menu.lst find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst configfile http://b.chenall.net/menu.lst errorcheck on commandline title commandline commandline title reboot reboot title halt halt
You can do the same with grub.exe, the offset in that case is 0x051F0C
As said until recently the embedded menu was loaded FIRST THING, but EVEN IF now a menu.lst on (hd0,0) is attempted to be loaded (which I still doubt), it DOES NOT CHANGE the issue[1], IF that menu.lst is missing, the embedded one will be executed.
Wonko
[1] The issue is about the "phoning home", not about the particular conditions in which it can be triggered.
You can download the http://b.chenall.net/menu.lstjust fine, here it is:
Posted 11 March 2018 - 04:08 AM
Posted 11 March 2018 - 04:14 AM
Sure.If you have two different /menu.lst files, then put each file on each partition. Then boot grub.exe or grldr from the second partition, what /menu.lst file will be executed?
The first one that will be found.
Drives in the line:
find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
are looked for as:
(hd0,0)
(hd0,1)
(hd0,2)
...
But AGAIN, that is not at all the issue at hand.
Wonko
Posted 11 March 2018 - 04:21 AM
I modified some files in the source code to change the name (and path) of the default configfile (/menu.lst) and the embedded configuration.
Posted 11 March 2018 - 04:44 AM
I modified some files in the source code to change the name (and path) of the default configfile (/menu.lst) and the embedded configuration.
Of course we can modify the HEX code (0x2017 for path and filename).
Ok that's enough.
Original thread pinned and locked:
http://reboot.pro/to...bedded-menulst/
Wonko
Posted 11 March 2018 - 10:48 AM
AFAIK, The standard embedded menu is always executed first. It has
configfile
as the second line. This command will attempt to load \menu.lst from the current boot partition only.
If the file does not exist then the first menu entry in the embedded menu will be executed.
The http entry does seem rather strange (and I'm not sure under what circumstances it would ever work?).
I have raised an Issue...
https://github.com/c...4dos/issues/170
Posted 11 March 2018 - 10:58 AM
Well I'm sorry, I do not see the second line configfile command.
Edited by nguyentu, 11 March 2018 - 11:02 AM.
Posted 11 March 2018 - 11:01 AM
configfile is the second line in the menu (from the top) - it is not in a menu entry.
It executes automatically
The first 4 lines are executed immediately, the 2nd line is the one that loads \menu.lst in normal situations.
pxe detect configfile default 0 timeout 1
Posted 11 March 2018 - 11:07 AM
P.S. The configfile command will load /menu.lst (default path) when first executed.
However, if say
configfile /steve/menu.lst
is run, then the simple command of
configfile
will load /steve/menu.lst again (i.e. the path is remembered).
Posted 11 March 2018 - 11:08 AM
Posted 11 March 2018 - 12:11 PM
Yep, that is what I also wonder.The http entry does seem rather strange (and I'm not sure under what circumstances it would ever work?).
I have raised an Issue...
https://github.com/c...4dos/issues/170
0 members, 0 guests, 0 anonymous users