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-20 23:16
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Troublesome problems with GRUB, everyone consult together DigestI View 46,957 Replies 280
Floor 106 Posted 2004-01-26 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Budian: I just tried the test002 version, but just like test001, it still fails to boot from the NTLDR menu on the small hard disk. I don't know why.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 107 Posted 2004-01-27 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
1。How many hard disks are in the system, and what are the partition formats on each one?

2。How many Windows NT systems are on the machine? What versions are they?

3。How many partitions contain NTLDR?【I suspect it booted another NTLDR boot partition, a kind of misalignment.】

4。Copy the MBR sector, and also the first 16 sectors of the partition containing NTLDR【you can use debug to copy them】, and put them somewhere I can download them.
因为我们亲手创建,这个世界更加美丽。
Floor 108 Posted 2004-01-27 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Whether there is one hard disk or two in the system, as long as it boots from that small hard disk the result is the same. Even whether the GRLDR file exists or not makes no difference (so clearly it is not a GRLDR problem, but a BOOTGRUB problem). The NTLDR and MENU.LST files on the two hard disks are the same, and both are on the C drive of the corresponding hard disk. The small hard disk has C and D partitions, both FAT16 partitions.

However, that small hard disk does not have any Windows NT system at all. It only has a WinNT/2K/XP boot menu for booting DOS, OS/2, booting from floppy, booting from CD, and so on. In other words, NTLDR is only being used as an ordinary boot manager. I wonder whether GRUB for NTLDR being unable to boot in this system is related to that?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 109 Posted 2004-01-27 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Please copy the MBR sector, and the first 16 sectors of the partition containing NTLDR 【you can use debug to copy them】, and put them somewhere I can download them.

I suspect the programs in the boot sectors of your two hard disks are different. The larger 2G disk has a normal boot sector, while the smaller 500M disk has an abnormal boot sector. GRUB for NTLDR needs to use the program in this sector. So we still have to look at what is different in this piece of code.
因为我们亲手创建,这个世界更加美丽。
Floor 110 Posted 2004-01-27 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Budian: after checking, although the boot sectors of the two hard disks are both NT boot sectors, they are indeed different. I have already packaged and uploaded the contents of the MBR sector and the 16 sectors of the primary partition where NTLDR is located that you wanted:
open attachment

Explanation: the HD1???.DAT files inside are sectors from the small hard disk, while the HD2???.DAT files are sectors from the large hard disk.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 111 Posted 2004-01-27 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Already downloaded, working on it now. Thanks.
因为我们亲手创建,这个世界更加美丽。
Floor 112 Posted 2004-01-27 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Version test003 should be OK now, give it a try:

ftp://211.100.7.71/incoming/grub_for_ntldr-test003.tar.gz

I just modified bootgrub a bit.
因为我们亲手创建,这个世界更加美丽。
Floor 113 Posted 2004-01-27 00:00 ·  中国 江苏 南通 电信
初级用户
Credits 162
Posts 14
Joined 2003-12-20 00:00
22-year member
UID 14263
Gender Male
Status Offline
It's like this: everyone can download grub for dos online and then directly use it to boot boot.flp (a BSD 2.88M boot floppy image), and then it can be installed.
This is really a question of how to make a floppy disk image boot under DOS. The grub for dos documentation says it does not support 2.88M floppy disk images, and it seems to specifically

say that it cannot be used to boot a BSD boot floppy image, but I tried it and it really can be done.
My example
One: put grub.exe and boot.flp in the root directory of c:, or you can choose a directory yourself
Two: c:\>grub
Three: grub\>map (hd0,0)/boot.flp (fd0)
Four: grub\>chainloader (hd0,0)/boot.flp
Five: grub\>rootnoverify (fd0)
Six: boot
After that it's the same as using a real floppy, so I won't go into it further.

Note: 1->This has to be done in real-mode DOS (I didn't succeed in a virtual machine)
2->The physical locations of grub.exe and boot.flp on the hard disk should be in the same contiguous disk area (figure out yourself how to do that), otherwise there will be

a prompt saying "file for drive emulation must be in one contiguous disk area".

The text above I copied from www.linuxsir.org. With this method, FreeBSD can be installed under DOS.
I wonder whether this program can be improved further; using it to install FreeBSD is quite a good method. Also, after I boot into grub under XP, I can't carry out the above steps

(that is, the third step)
Floor 114 Posted 2004-01-28 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Budian: I just tried this test003 version, and sure enough it can boot normally now, thanks!

Also, I'd like to ask whether there is any way to disable a hard disk through GRUB commands so that DOS and WIN cannot see it. For various reasons, when I want to disable one hard disk now, I always have to disable it in BIOS, which is rather troublesome, so I hope GRUB can do it directly. Thanks!

By the way, I saw you wrote "Wengier's forum" on that linuxden webpage. Actually, this forum is obviously not mine alone, but everyone's. At that time I joined with other DOS site admins and moderators to build this DOS forum together, so it is called the "United DOS Forum" or "China DOS Union Forum". So this forum is a DOS forum jointly owned and used by everyone (all Chinese speakers), created to benefit the entire Chinese DOS world. Don't you think so?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 115 Posted 2004-01-28 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Brother i659:
GRUB's floppy emulation function can boot any floppy【including LINUX and FREEBSD floppies; in short, floppies for any purpose】. On this point, there are no restrictions at all. However, there are also some restrictions related to operating systems, mainly based on the fact that some operating systems, after taking over control, do not use the BIOS INT13 interface. If that is the case, then some problems may occur, or there may be no problems. The details are as follows:

When this kind of operating system does not use or access the contents of the floppy, it can operate normally, with no difference at all from booting from a real floppy. For example, this is the case for most LINUX floppies and FreeBSD floppies.

When a program in the floppy disk image needs to access the contents of the floppy image itself, access failure will occur. In that case, booting will fail. This is because the user program accesses the real floppy through the operating system【not through the BIOS interface】, but the real floppy is not in the floppy drive, so access fails.

GRUB for DOS 0.1.x generally does not support 2.88M floppies. GRUB for DOS 0.2.0 supports floppy disk images of any size, and also supports emulation of hard disk images of any size. Although the official version of GRUB for DOS 0.2.0 has not yet been released, the current test version is almost equivalent to the official release.

=========

Under XP, if your disk is in NTFS format, you will be unable to access the file (hd0,0)/boot.flp on the disk under GRUB; you can access a file on another FAT32 partition. Put boot.flp on a FAT32 partition, and you will be able to access it under GRUB.

Also, if your boot.flp is already on FAT32, then the reason map fails is that the boot.flp file is fragmented. You can copy several backup copies of boot.flp and see which one has no fragments, then use that one.

This is explained in great detail on the web page:
http://www.linuxeden.com/edu/doctext.php?docid=3006

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

Brother Wengier:

I had also considered the function of disabling disks before, but since windows may not use BIOS, this kind of disabling may not necessarily work. windows 32-bit disk access actually bypasses the BIOS int13 interface.

Disabling disks under DOS may work somewhat better. As for disabling a certain disk, or adding a certain disk, there are three points to consider:

1。In the BIOS data area there are fields for the number of floppies and the number of hard disks. When adding or removing disks, it would be best to adjust these fields.

2。Disk configuration information is stored in CMOS, but it is still best not to touch it.

3。Use the map command to make the disk inaccessible.

As for point 1, since our GRUB sometimes has to re-enter, after making changes we would have to restore it again when re-entering. That is rather troublesome and easy to get wrong, so we will not do point 1 either. Therefore we only use point 3 to implement it. For example, to disable (hd1):

map --disable-chs-mode --disable-lba-mode (hd1) (hd1)

I don't know whether this command works properly; I haven't tested it.

Add a hard disk (hd3):

map (hd2,0)/hard_disk.img (hd3)

Since the number of hard disks in the BIOS data area is not increased, this command cannot actually add an (hd3).

=================

What I said on the web page was rather casual. It seems I need to revise it. Before, I did not understand the general situation of this site.


因为我们亲手创建,这个世界更加美丽。
Floor 116 Posted 2004-01-28 00:00 ·  中国 江苏 南通 电信
初级用户
Credits 162
Posts 14
Joined 2003-12-20 00:00
22-year member
UID 14263
Gender Male
Status Offline
I checked it with blocklist:
blocklist (hd0,6)/boot.flp
(hd0,6)13700944+5760

It shows this, so there shouldn't be any fragmentation, right? (I'm not very sure, to be honest; I don't really understand this area very well)
Floor 117 Posted 2004-01-28 00:00 ·  中国 江苏 南通 电信
初级用户
Credits 162
Posts 14
Joined 2003-12-20 00:00
22-year member
UID 14263
Gender Male
Status Offline
My hard disk has four drives: C, D, E, and F. C, D, and E are all NTFS, and F is FAT32. I followed the method here (with a slight modification)

First: put grub.exe and boot.flp in the root directory of F:
Second: c:\>grub
Third: grub\>map (hd0,6)/boot.flp (fd0)
Fourth: grub\>chainloader (hd0,6)/boot.flp
Fifth: grub\>rootnoverify (fd0)
Sixth: boot


After booting, it prompts for a kernel file. What should I do next?
I don't know how to provide you with this kernel file


The error message is as follows:

>load /kernel
/kernel text=0x257ba8 data=0x32d68+0x3fb78
zf_read: unexpected EOF

elf32_loadexec: archsw.readin failed
load : can't load file '/kernel' : input/output error
Floor 118 Posted 2004-01-28 00:00 ·  中国 江苏 南通 电信
初级用户
Credits 162
Posts 14
Joined 2003-12-20 00:00
22-year member
UID 14263
Gender Male
Status Offline
My hard disk has four partitions, C, D, E, and F. C, D, and E are all NTFS format, and F is FAT32 format. I use ntloader; generally I use it to boot XP (that goes without saying

), and besides that I also use it to boot redhat and debian

ftp://ftp.cosoft.org.cn/incoming/grub_for_ntldr-test003.tar.gz

After downloading the grub for dos program for ntloader from here, and following the instructions, put bootgrub and grldr obtained after extraction into the root directory of c:
Add the following entry to boot.ini:
c:\bootgrub=" boot grub"


After rebooting, choose to enter boot grub

一、 grub\>map (hd0,)/boot.flp (fd0)
二、 grub\>chainloader (hd0,)/boot.flp
三、 grub\>rootnoverify (fd0)
四、 boot

(Note: I have already extracted boot.flp from the downloaded iso file, and put it in the root directory of drive f
It can enter the installer; I haven't tried anything after that, so I don't know whether it can really continue installing. (In the first step:
一、 grub\>map (hd0,)/boot.flp (fd0)
the following information appears:
Autodetect number-of-heads failed. Use default value 2
Autodetect sectors-per-track failed. Use default value 36
but the later steps can still continue)



But I searched for some materials online, and they all say that for a hard disk installation, the downloaded iso file must be extracted to c:\freebsd, otherwise it cannot be installed

, but my C, D, and E are all NTFS format, and only drive F is FAT32 format
Floor 119 Posted 2004-01-28 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is quoted from “Budian”:

“I had also considered disabling the disk function before, but since Windows may not use the BIOS, this kind of disabling may not necessarily work. Windows 32-bit disk access actually bypasses the BIOS int13 interface.
Disabling disks under DOS might work a bit better.”


I know that, but the reason I mentioned that it might also be possible to try disabling the hard disk under WIN is that I have several reasons for it. One important reason is that I want to test things like the effect on WinME startup path settings after disabling the hard disk under DOS and then eliminating the drive-letter interleaving phenomenon. I’ll try the map method you mentioned right away, thank you!

Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 120 Posted 2004-01-28 00:00 ·  中国 江苏 南通 电信
初级用户
Credits 162
Posts 14
Joined 2003-12-20 00:00
22-year member
UID 14263
Gender Male
Status Offline
Perhaps it's a program issue. Under DOS I was using grub for dos 0.1.4 (download address

http://newdos.yginfo.net/dosware/grub/grub014.zip )
and that version had the problem mentioned in the above post, not being able to find kernel.
I just switched to the latest test version grub_t14.exe
( ftp://211.100.7.71/incoming/grub_t14.exe )
and that solved the problem, but there is still the prompt that appears when using ntloader:
Autodetect number-of-heads failed. Use default value 2
Autodetect sectors-per-track failed. Use default value 36

same as in windows xp, but the later steps can continue
‹ Prev 1 6 7 8 9 10 19 Next ›
Forum Jump: