中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 03:18
47,811 topics / 349,897 posts / today 0 new / 48,256 members
GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » [Help Needed]Is there a way to change the location of the default boot menu file for Grub for NTLDR?
Printable Version  2,654 / 12
Floor1 Climbing Posted 2004-09-10 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
I know that grub for ntldr (i.e., grldr) is set in boot.ini by default as:
c:\grldr="Start Grub"
After this grub is started, it searches for (hd0,0)/boot/grub/menu.lst as the default boot menu. But suppose my NT system is installed in (hd0,1) and menu.lst is in the (hd0,1)/boot/grub directory. Then how should I set boot.ini so that grldr can start the menu.lst I specified?
I imagined it should be set like this:
c:\grldr="start Grub" configfile=(hd0,1)/boot/grub/menu.lst
But unfortunately, it doesn't work.
Also, please ask the grub experts not to be stingy with their advice!
Floor2 不点 Posted 2004-09-10 00:00
银牌会员 Posts 1,115 Credits 2,491
Currently, GRLDR does not support command-line arguments. However, the latest few versions have included Chris's findroot and presetmenu patches, allowing it to boot the menu.lst file under (hd0,1).

When GRUB starts, it first searches for the /boot/grub/menu.lst file in each partition on the hard disk. If it fails, it then continues to search for the /boot/grub/menu.lst file on the floppy disk. And it uses the first found menu.lst file as the menu.

If the above process fails, it repeats the search process with /boot/menu.lst as the file name.

If the above process also fails, it repeats the search process with /menu.lst as the file name.

Should this be sufficient? (By the way, a special thanks to Chris for the wonderful patches!)
Floor3 Climbing Posted 2004-09-11 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
After applying Chris's patch, do I need to add any parameters during compilation? I am using the Chinese version of Grub 0.95 downloaded from http://159.226.20.15/grub_chs/ for compilation. In theory, this source code should include all patches, and indeed there is the findroot command in the command line mode, but I always get the "File not found" prompt when running this command. Also, my menu.lst is in the (hd0,1)/boot/grub directory, but it can't be found at all during startup. I don't know where the problem is.
Floor4 不点 Posted 2004-09-11 00:00
银牌会员 Posts 1,115 Credits 2,491
The Chinese version is handled by Gandalf. You should ask him for detailed information.
Floor5 Climbing Posted 2004-09-12 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
Thanks, I'll try again.
Floor6 gmy Posted 2004-09-12 00:00
版主 Posts 392 Credits 1,113
The following is a quote from Climbing's post on September 10, 2004, at 9:32:11:

I know that grub for ntldr (i.e., grldr) is set in boot.ini by default as:
c:\grldr="Start Grub"
After this grub starts, it will search (hd0,0)/boot/grub/menu.lst as the default boot menu. But suppose my NT system is installed in (hd0,1) and menu.lst is in (hd0,1)/boot/grub directory, then how should I set boot.ini so that grldr can start the menu.lst I specified?

I imagined it should be set like this:
c:\grldr="start Grub" configfile=(hd0,1)/boot/grub/menu.lst

But unfortunately, it doesn't work.

Also, please ask the great grub experts to give advice!

Edit all paths in GRLDR in hexadecimal.
Floor7 Climbing Posted 2004-09-13 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
The following is a quote from gmy's post on 2004-9-12 20:03:02:
>
Edit all paths in GRLDR in hexadecimal.


Tried it, no good!
Floor8 Climbing Posted 2004-09-13 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
Dear Tinybit, can you modify grldr to support boot parameters? I think this shouldn't be too complicated, because NTLDR supports passing boot parameters. If grldr supports boot parameters, then the problem in the top post will be easily solved.
Floor9 不点 Posted 2004-09-13 00:00
银牌会员 Posts 1,115 Credits 2,491
Previously, there was consideration to add support for GRLDR command line, but it seemed not easy, so later CHRIS's findroot and preset menu patches were adopted.

This is basically sufficient, try to use this method. If it is really not enough, we can discuss again.

grub for dos 0.2.0 pre12 fully supports this dynamic search process. You can give it a try.
Floor10 Climbing Posted 2004-09-14 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
Don't click. Through ./configure --help I have found that the compilation parameter for the preset menu should be: --enable-preset-menu=FILE. By referring to your written help, I have also clarified the usage of findroot. There are two questions to ask: 1. Should FILE in --enable-preset-menu=FILE be similar to this: (hd0,1)/boot/grub/menu.lst? If I compile grub like this, will grub change the default (hd0,0)/boot/grub/menu.lst to (hd0,1)/boot/grub/menu.lst? Then this compiled version will only be suitable for some special machines (the machines where menu.lst is placed in (hd0,1)/boot/grub), but not suitable for other machines (the machines where menu.lst is placed in partitions other than (hd0,1)). 2. Are the findroot command (and find) only usable in the interactive interface of grub, of course, on the premise that there is no default menu.lst for support. For example, my grub defaults to finding (hd0,0)/boot/grub/menu.lst as the default boot menu. If this file is not at that location, after starting grub, it directly enters the interactive interface. At this time, I can only manually enter: findroot /boot/grub/menu.lst
configfile /boot/grub/menu.lst to start the menu system. And now what I want to solve is that no matter where my menu.lst is in the partition (assuming it is fixed at /boot/grub/menu.lst), as long as I start grub, it will automatically search for /boot/grub/menu.lst in each partition and use the first found file as the default menu to boot. I wonder if grub for dos 0.2.0 pre12 supports this kind of search method?
Floor11 不点 Posted 2004-09-14 00:00
银牌会员 Posts 1,115 Credits 2,491
Just compile according to the compile file in the release of grub for dos 0.2.0 pre12.

I have compiled presetmenu into it. findroot has been changed to find --set-root.

The find command can be used in the menu and also in the command line.

You don't need to do anything, just download and use pre12.
Floor12 不点 Posted 2004-09-14 00:00
银牌会员 Posts 1,115 Credits 2,491
And now what I want to solve is that no matter which partition my menu.lst is in (assuming it is fixed at the /boot/grub/menu.lst location), as long as I boot grub, it will automatically search for /boot/grub/menu.lst in each partition, and take the first file found as the default menu to boot. I wonder if grub for dos 0.2.0pre12 supports this kind of search method?
----------------
Yes, it is fully supported. No settings are required. It automatically searches for /boot/grub/menu.lst by default. It first searches all partitions of the hard disk, and then all floppy disks. The first one found is used.
Floor13 Climbing Posted 2004-09-14 00:00
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
Don't click,
Hey, I contacted Einstein/Gandalf/useronce on the Wuyou Boot Forum and you on the DOS Union Forum, and you're also in contact on the United DOS forum, which really wastes too much energy.
With the help of Gandalf, I have generally figured out the working principle of the Chris patch. I have seen the grub-0.95-patch4-findroot patch. You should have made simple modifications based on the Chris patch. I'm not very familiar with linux, so I don't know how to apply the patch to the source code. It should be using the diff command. It seems I can only hope that Gandalf will continue to release the grub source code with your pre12 patch applied and then recompile it.
In short, thanks.
The link to the post I discussed with Gandalf (useronce) on the Wuyou Boot Forum is:
http://bbs.wuyou.com/cgi-bin/topic.cgi?forum=34&topic=4225&show=0
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023