China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 19:50
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Question: How should I get started learning to use grub for dos View 3,465 Replies 15
Original Poster Posted 2004-04-26 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
Question: How should I get started learning to use grub for dos
Floor 2 Posted 2004-04-26 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
Question: I downloaded http://newdos.yginfo.net/grubdos.htm ---- “-GRUB for DOS 0.2.0 pre6 New!” then after extracting it with winrar3.x, I ran it under drive C c:\>GRUB and it hung the machine. Did I do something wrong?


Floor 3 Posted 2004-04-26 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Brother, what you're saying is a bit too scary, isn't it? At most it should error out and exit, it shouldn't hang the machine, right? Your mouse and keyboard should still be usable, right?

Are you running it under DOS, or under windows? grub.exe requires running under real-mode DOS, it cannot be run in a windows DOS box. Take a look at the README file included with it. In win2000, you can use the grub for ntldr included there.
因为我们亲手创建,这个世界更加美丽。
Floor 4 Posted 2004-04-27 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline



I tried it under the same conditions





1. Using the downloaded “GRUB for DOS 0.2.0 pre6 New!” really does hang the machine (black screen, with only a "_" symbol at the upper left)
2. Other versions work, and the screen can come up, but I don't really know how to use it. Under GRUB >, running HELP gives prompts I don't really understand, all in EN
3. Could I trouble the moderator to give me a few pointers? I've read the GRUB posts on the forum, but as a beginner I feel there isn't a tutorial......
4. I'm really a newbie, experts please help your little brother


yub_cn@163.com waiting for a reply

----------------------------------------------------------------------------------------------------------













Floor 5 Posted 2004-04-27 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
What you reported may be a BUG, thanks for the report. But your report still isn't very detailed. Here:

http://ipdown.com/grub4dos/

you can find many download links, including articles on GRUB for dos. 【Many versions of GRUB for dos can be downloaded from cosoft's FTP site】.

You only said that pre6 can't run, but you didn't say whether pre4, pre3, etc. can run. That way, I can't determine exactly which version introduced the BUG.

The GRUB for DOS articles mentioned above were written by me. Before reading those materials, you need to understand GNU GRUB first. Please search for Chinese materials on GRUB in a search engine. For example, you can search on www.google.com.

---------------------

Supplement: BUGs in GRUB for dos are getting harder and harder to find. On the other hand, if one is still found, solving it may also be rather difficult. The BUGs found at the very end are precisely the BUGs only a very small number of people run into. So if this BUG can't be solved, that would be very unfavorable to that small number of people, maybe unfair, but there's no way around it. If the BUG can't be solved, then this BUG may remain in future new versions as well. So I hope to solve BUGs as much as possible; that is also the top priority.


因为我们亲手创建,这个世界更加美丽。
Floor 6 Posted 2004-04-28 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Because of the difficulty of pinpointing BUGs in the final stage, I want to say a little more about my thoughts.

I think everybody should be mobilized to solve BUGs together. That may sound funny, but it actually makes sense. For example, brother yub's situation is very likely related to his hardware, such as some nonstandard behavior in the motherboard, that sort of thing. The most likely kind of problem is when executing an int instruction, which is an instruction related to the motherboard BIOS. I have no way to solve that kind of problem, because I can't debug on brother yub's machine. If that kind of problem happened on my machine, I would roughly solve it like this:

1. First print out the dosstart.S program from grub for dos onto paper.

2. Use debug, or better yet a debugger like GRDB, to open grub.exe for debugging, single-step through execution, and when you hit an int instruction use the p command to execute it. Then see exactly which int instruction fails during execution. During single-stepping you can compare against the source code on paper. Then you'll know which statement in the source code has the problem. When reporting the BUG, if you can point out the faulty statement, the problem may become very easy to solve.

-------------------

As for debugging, here's a lazy method. First use p200 to see whether you can hit the hang; if not, continue with p200, and keep track of how many numbers were used.
If one run hangs, next time reduce the number and use p100.

You can also mix p and t.

Using this method, you can quickly find the statement that causes the hang.
因为我们亲手创建,这个世界更加美丽。
Floor 7 Posted 2004-04-28 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
TO : Brother Budian
(thanks again for the reply)
A# About the hardware: old machine: Compaq DESKPRO EB /SP series PⅡ333
I also added -- two NICs: 3C509- ISA ~ SMC E_Ⅱ- PCI ,
I also replaced -- video card: Zhongling ATI-7500 / SD RAM HY--128M (original factory)
Others: sound card-ESS and BIOS (Phoenix) ...... untouched

About software: 【Many versions of GRUB for dos can be downloaded from cosoft's FTP site】
I tried GRUB for DOS 0.2.0 pre4 and GRUB for DOS 0.0.8 / 0.1.4 / GRUB_T15 and they didn't hang, I just don't know how to use them to make a boot menu, but pre6 doesn't work. I haven't tried the others
As for debug... it's not that I don't want to do it, the expert explained it in great detail, but I'm too much of a newbie, I just don't understand debug so it's no use......


B# As for GOOGLE.COM mentioned by the boss, in Simplified Chinese aside from finding Budian, there is almost nothing; I haven't searched EN, and even if there is, it wouldn't help me......

I read the few articles at http://ipdown.com/grub4dos/ mentioned by the boss,
but I still don't know how to use it to make a menu boot. If there is something on how to use it, boss, could you post one in this thread or start another thread?

Boss, when will "grub for ntldr" have an official release? Looking forward to it. Will it be easier to use than grub for dos, with a graphical interface?

C# I've been hanging around the forum for 15 days (always during the day), but I haven't seen expert moderator Wengier. Could someone teach me how to make a boot menu with GRUB? Thanks for Budian's enthusiasm. As for whether it's a BUG or not, that's beyond us newbies, we just want to know how to use it......
---------------------------------------------------------------------------
My QQ :110126688, YUB_CN@163.COM



















Floor 8 Posted 2004-04-29 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
This is brother yub's first contact with grub for dos, and he ran into difficulty and a BUG right away, so we ought to show concern and support. Unfortunately, I regret that I don't have much time and work keeps me busy. I hope brother yub can forgive me. Thanks for your detailed description of the BUG. I care a lot about BUG issues, so let me explain as follows:

pre4 once qualified to serve as an official release, because it was already fairly stable. Later, brother tmpid reported that pre4 could not run, so I modified a small number of threshold values so that brother tmpid's motherboard could pass the checks.

From pre4 to pre6, there were no substantial modifications. It was only changed from 0xe0000000 to 0xc0000000, that is, before it was considered that only interrupt vectors above 0xe0000000 were BIOS interrupt vectors, but now it is considered that all interrupt vectors above 0xc0000000 are BIOS interrupt vectors, in other words, the check was relaxed.

So if pre4 can run, pre6 ought to run smoothly too. I suspect the problem brother yub encountered may be due to something in the download/extraction process, not a substantive problem. Also, the latest grub.exe file is here:

http://ipdown.com/grub4dos/grub.exe

This is a version newer than pre6, but basically equivalent to pre6. The improvements made will not affect your usage. So you can download it and try it.

grub for ntldr has already been integrated into the grub for dos pre? version, you just didn't notice it. Check the README for grub for dos pre6 and you'll know.

At
http://www.google.com/
type in "grub 入门", and you can find a classic GRUB article, very basic, which you can read.

grub originally could only run in a linux environment; grub for dos extends it to DOS. The introductory article mentioned above may involve a small amount of linux, but it is still understandable. Even without any linux knowledge, you can understand it. It is a must-read article. Here are several addresses for that article:

LinuxSir.Org - Introduction to GRUB
http://www.linuxsir.org/bbs/showthread.php?s=&threadid=74728&highlight=%D0%C2%C4%DA%BA%CB

http://www.chinaunix.net/forum/viewtopic.php?t=66853
因为我们亲手创建,这个世界更加美丽。
Floor 9 Posted 2004-04-29 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
> I just don't know how to use it to make a boot menu

boot/grub/menu.lst in grub for dos is a menu file. Just modify it a little and it becomes your own menu file.
因为我们亲手创建,这个世界更加美丽。
Floor 10 Posted 2004-04-29 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
TO : Brother Budian
(thanks a third time for the reply)

Oh, I came at 11:3x and the expert had already left, what a pity. I hope the forum will have more experts warmly helping newbies like us, so we can all make progress together

I'll go download and try what the boss said this afternoon, and I'll report the results right away. Thanks for the "introduction" link. I'll go study it, and if there's anything I don't understand I'll ask the experts again. See you this afternoon
Floor 11 Posted 2004-04-29 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
TO : Budian, and other friends on the forum

Before reporting back, let me say a bit more about my PC. The friend who assembled this PC for me said: I hope an expert can find an antique COMPAQ DESKPRO EB/SP to take a look at,
because the “Phoenix BIOS” is quite different, and maybe that's the reason for my hang.

The following is the approximate content of what my friend who assembled the PC said in his own words---(but I don't understand what he's saying, I hope what was mentioned above can help the developer, solve the problem, and benefit the end user)

“The BIOS-IRQ settings on the EB/SP are very unusual. In the last column of the settings menu, besides automatic PnP-IRQ, the machine also lets the user (me) change the remaining IRQs: 9, 10, 11, and assign them directly to different cards (NICs and other added devices)”

Both the boss and my friend mentioned “interrupts”. I don't know what interrupts are, so after searching GOOGLE.COM -- for things about interrupts, it may help friends reading this thread who are also getting started with DOS. If what the experts call “interrupt vectors” is not what is described below, experts please correct me:

IRQ stands for Interrupt Request, meaning "interrupt request" (hereafter called IRQ). The function of IRQ in the computer we use
is to carry out hardware interrupt request actions, used to stop the working state of the related hardware.
  Understanding IRQ  Interrupts in a computer can be divided by the source of the signal into hardware interrupts and software interrupts. Hardware interrupts are mostly issued by peripheral devices and the computer system controller, while software interrupts are generally produced by software commands. Among hardware interrupts there are also "maskable interrupts" and "non-maskable interrupts". As the name suggests, maskable interrupts can be either accepted and processed or deferred (that is, masked) depending on the system's needs; non-maskable interrupts directly
activate the corresponding interrupt handler, and they cannot and will not be delayed. The IRQ interrupts we commonly talk about are maskable hardware interrupts.

IRQ allocation table
Interrupt 0 System timer
Interrupt 1 Keyboard
Interrupt 2 Programmable interrupt controller
Interrupt 3 com2
Interrupt 4 com1
Interrupt 6 Floppy disk controller
Interrupt 7 Parallel port 1
Interrupt 8 System cmos/clock
Interrupt 12 ps/2 mouse
Interrupt 13 Math coprocessor
Interrupt 14 First ide controller
Interrupt 15 Second ide controller
    In earlier computer systems, each hardware device's IRQ was controlled by an interrupt controller chip 8259 or 8259A (now this chip is mostly integrated into other chips)
. At present there are 16 IRQ groups in total; after removing one IRQ group used for bridging, in fact there are only 15 IRQ groups available for hardware use. And each of these IRQs has its
own recommended configuration (see the IRQ allocation table).
   From the table above we can see that only 5, 9, 10, and 11, a total of 4 interrupts, are unoccupied and can be used by users for newly added hardware devices. Among them the video card must
occupy one interrupt exclusively, and the sound card generally occupies two interrupts, used respectively for the MIDI interface and WAVE playback.






Floor 12 Posted 2004-04-29 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
Floor 13 Posted 2004-04-29 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
Floor 14 Posted 2004-04-30 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Thanks to brother yub for such a detailed report. In return, I will also try my best to help you and give you some convenience 【within my ability】.

First, you downloaded
http://ipdown.com/grub4dos/grub.exe
and it can run, so now we can rest easy. Because it is not really different from pre6. As long as it can run, pre6 should also be able to run. Taking a step back, even if pre6 cannot run, that doesn't matter, because we can use
http://ipdown.com/grub4dos/grub.exe
as pre7 or as the official release.

All right, at this point, this problem is considered solved. As for the interrupts you mentioned, there is no need to discuss them for the time being.
----------------
It is normal for GRUB for DOS to show 639K of conventional memory. Newer BIOSes have an extended BIOS data area at the top of 640K. This extended BIOS data area usually occupies 1K of memory, but can occupy as much as 4K.

The size of the extended BIOS data area used by your BIOS is 1K, so your conventional memory displays as 639K. This is not caused by a virus, so don't worry. Therefore, for your questions 1#, 2#, 3#, and 4#, there is no need to worry too much. DOS may display 640K, because DOS sometimes moves the extended BIOS data area to the low end of memory. In fact, the extended BIOS data area still exists, it's just not at the top of 640K. In that case, DOS's mem command may show that you have 640K of conventional memory. This is only a matter of how it is calculated, so there's no need to think about it.

5#: GRUB.EXE alone is enough. Of course, you can also refer to the menu.lst file. It is just an example file; the version doesn't matter, any menu.lst can be used as a reference.

6#: GRUB for NTLDR contains two files, one is BOOTGRUB, the other is GRLDR. These two files need to be placed in the root directory of drive C:, together with files like BOOT.INI and NTLDR. You only need to modify BOOT.INI according to the README instructions, and then you can use it.
因为我们亲手创建,这个世界更加美丽。
Floor 15 Posted 2004-04-30 00:00 ·  中国 广东 云浮 联通
初级用户
Credits 124
Posts 9
Joined 2004-04-05 00:00
22-year member
UID 21770
Gender Male
Status Offline
TO : Budian
(expert, thanks for the hard work, still working at 0:44, thanks)

Usage questions:
1# If menu.lst and GRUB.EXE are not placed under C:\>, but placed under the root directory in a newly created directory, such as C:\BOOT>, is that okay?
2# What are the functions of the two files stage1 and stage2?
-------------------------------------------------------------------
yub_cn@163.com


Forum Jump: