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 19:01
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Troublesome problems with GRUB, everyone consult together DigestI View 46,925 Replies 280
Floor 181 Posted 2004-02-16 00:00 ·  中国 香港 环球全域电讯国际互联节点
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is quoted from 不点 on 2004-2-16 16:31:32:
The difference is in the header.

GRLDR has only a one-sector header, while GRUB.EXE has 8 sectors of header. The rest of the parts are the same, they are the pre_stage2 file.

GRLDR is not a normal EXE file, nor can it be regarded as a .com file. It cannot be run simply by renaming it to .exe.



Dear TinyBit,

I am sorry to put forward so many questions to you.

But I want to speak from GNU Grub's perspective.

Its aim, may be I am wrong, is to provide a bootloader that can be used independant
of another bootloader, especially MS's bootloader.

Your project may not have this goal. But with further development, it is possible.

For instance, your GRUB.EXE relies on DOS system and your GRLDR relies on bootsector of an active NT Boot Partition.

To speed up your GRUB.EXE and go independent of DOS, I suggest you try the way of Syslinux or BootProg by Alexei A. Frounze at http://alexfru.chat.ru/epm.html

I.e. have an MBR that boots up the Boot Sector and have the Boot Sector that loads
up GRUB.EXE

Syslinux provides the MBR for FAT12/16 for loading a com/exe file

and

BootProg provides the Boot Sector for FAT12/16 that loads up a com/exe file.

Both claims that they can be used in FAT16 HDD.

So to make your project perfect; you may wish to try:

1. make an MBR - your BootGrub already?
2. make your bootsector - for reading in either your GRUB.EXE or your GRLDR
for FAT12/16/32/NT partition

For FAT12/16 partition, BootProg can provide you some source code to model on.

For FAT32/NT partition, it may be a bit time-consuming.

Floor 182 Posted 2004-02-16 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 windrv for this whole speech. I sincerely thank you for your concern.

But I want to speak from GNU Grub's perspective.

Its aim, may be I am wrong, is to provide a bootloader that can be used independant
of another bootloader, especially MS's bootloader.

The purpose of GNU GRUB does not seem to be simply to be independent of other bootloaders. We know GNU GRUB can be installed in the boot sector of a partition, which enables it to chainload and be chainloaded by other bootloaders. I think it is not GNU that wants to be independent of MS's bootloader, but MS that wants to be independent of GNU's bootloader. GNU strives to support MS operating systems (the map command exists in order to support DOS/Windows), while MS seems never to support GNU programs. MS sets up many incompatible barriers so that others cannot communicate with it . Its bootloader originally only wanted to boot its own DOS/Windows, yet we are making it serve our GRLDR, breaking through this incompatible barrier of its own. This is exactly what many end users care about.

Your project may not have this goal. But with further development, it is possible.

Yes, my project has no intention of opposing MS, but strives for compatibility and interoperability with it. Even with further development, it will not deliberately separate from MS, but rather further improve compatibility. I believe the issue of compatibility is a very prominent and important issue today. Just think: how painful communication would be between a person who only knows English and not Chinese, and another who only knows Chinese and not English. The communication between you and me today is a real form of compatibility.

For instance, your GRUB.EXE relies on DOS system and your GRLDR relies on bootsector of an active NT Boot Partition.

Yes, just as I said above, this is not beneficial to MS, nor is it harmful to GNU. It is useful, and that is enough. The West is full of lofty things such as ideals and justice, while Chinese people mostly speak in practical terms, are more constrained by reality, and fewer have the temperament of the West.

To speed up your GRUB.EXE and go independent of DOS, I suggest you try the way of Syslinux or BootProg by Alexei A. Frounze at http://alexfru.chat.ru/epm.html

Thank you for providing this lead. I will find time to study it.

I.e. have an MBR that boots up the Boot Sector and have the Boot Sector that loads
up GRUB.EXE

Syslinux provides the MBR for FAT12/16 for loading a com/exe file

and

BootProg provides the Boot Sector for FAT12/16 that loads up a com/exe file.

Both claims that they can be used in FAT16 HDD.

So to make your project perfect; you may wish to try:

1. make an MBR - your BootGrub already?
2. make your bootsector - for reading in either your GRUB.EXE or your GRLDR
for FAT12/16/32/NT partition

For FAT12/16 partition, BootProg can provide you some source code to model on.

For FAT32/NT partition, it may be a bit time-consuming.

If the goal is to boot GRUB code from the MBR, then we do not need SYSLINUX or BOOTPROG at all. There are more concise and elegant ways to achieve the purpose. The FreeDOS boot loader can be modified to boot the GRLDR file on FAT12/16/32. I am currently doing this. As for GRLDR on an NTFS partition, we can already boot it successfully now. We have spent the least effort and achieved quite considerable results. If you understand that I have done no research at all into the structure of NTFS, and cannot even read any files from an NTFS system, then in such a situation, being able to locate the GRLDR file in an NTFS partition from the MBR and boot it is really a lazy trick. If I were not being lazy, then who knows in what year and month it would be accomplished.

Thank you for your reminders, help, concern, and suggestions all along, and I hope you will continue to help more. Thank you.
因为我们亲手创建,这个世界更加美丽。
Floor 183 Posted 2004-02-16 00:00 ·  中国 香港
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
The following is quoted from 不点 on 2004-2-16 19:14:39:
If the goal is to boot GRUB code from the MBR, then we do not need SYSLINUX or BOOTPROG at all. There are more concise and elegant ways to achieve the purpose. The FreeDOS boot loader can be modified to boot the GRLDR file on FAT12/16/32. I am currently doing this. As for GRLDR on an NTFS partition, we can already boot it successfully now. We have spent the least effort and achieved quite considerable results. If you understand that I have done no research at all into the structure of NTFS, and cannot even read any files from an NTFS system, then in such a situation, being able to locate the GRLDR file in an NTFS partition from the MBR and boot it is really a lazy trick. If I were not being lazy, then who knows in what year and month it would be accomplished.

Thank you for your reminders, help, concern, and suggestions all along, and I hope you will continue to help more. Thank you.

Then will OS/2's HPFS be supported?(HPFS is precisely the predecessor of NTFS)
Off-topic: from beginning to end M$ has also been lazy.....
Just tweak OS/2's kernel and file system a bit and call it their own thing......
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 184 Posted 2004-02-16 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
> Then will OS/2's HPFS be supported?

I have never dealt with HPFS, so I don't know.

> HPFS is precisely the predecessor of NTFS

No wonder the NTFS partitions listed by LINUX's FDISK command show up as HPFS/NTFS. So they are one family!

> Off-topic: from beginning to end M$ has also been lazy.....

Everyone is being lazy. Middle-school math, physics, and chemistry taught me laziness and shortcuts.
因为我们亲手创建,这个世界更加美丽。
Floor 185 Posted 2004-02-17 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
It turns out that the HPFS used by OS/2 originally used partition type code 07, and later MS modified it a little and it became NTFS. In fact, it is just a renamed or upgraded version of HPFS, and the relationship between WinNT and OS/2 is the same way.

As for FAT12, I tried both FAT12 floppies and hard disks in the virtual machine, and GRLDR could not start. Actually FAT12 is very easy to find; ordinary floppy disks are all FAT12. Note: I previously tried using NTLDR on a floppy to call bootsect.dos and it succeeded, but because GRLDR does not currently support FAT12, it still cannot be called successfully for now.
Wengier - 新DOS时代

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

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

Floor 186 Posted 2004-02-17 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
The closer we get to the end, the harder the problem becomes to solve. There seems to be nothing else wrong with the program code of GRLDR. I have checked the program code over and over and found no mistakes. FAT12 ought to be supported already. But I really have not tested the latest GRLDR on a floppy. I am preparing to try it soon.
因为我们亲手创建,这个世界更加美丽。
Floor 187 Posted 2004-02-17 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
不点: I just tried it on a real machine. On a very small FAT12 hard disk partition, NTLDR+GRLDR started successfully! It seems that it now supports FAT12 partitions; before, it was only a virtual machine problem.
Wengier - 新DOS时代

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

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

Floor 188 Posted 2004-02-17 00:00 ·  中国 香港 环球全域电讯国际互联节点
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is quoted from 不点 on 2004-2-16 19:14:39:
Thanks to brother windrv for this whole speech. I sincerely thank you for your concern.

ButIwanttospeakfromGNUGrub'sperspective.

Itsaim,maybeIamwrong,istoprovideabootloaderthatcanbeusedindependant
ofanotherbootloader,especiallyMS'sbootloader.

The purpose of GNU GRUB does not seem to be simply to be independent of other bootloaders. We know GNU GRUB can be installed in the boot sector of a partition, which enables it to chainload and be chainloaded by other bootloaders. I think it is not GNU that wants to be independent of MS's bootloader, but MS that wants to be independent of GNU's bootloader. GNU strives to support MS operating systems (the map command exists in order to support DOS/Windows), while MS seems never to support GNU programs. MS sets up many incompatible barriers so that others cannot communicate with it . Its bootloader originally only wanted to boot its own DOS/Windows, yet we are making it serve our GRLDR, breaking through this incompatible barrier of its own. This is exactly what many end users care about.

Yourprojectmaynothavethisgoal.Butwithfurtherdevelopment,itispossible.

Yes, my project has no intention of opposing MS, but strives for compatibility and interoperability with it. Even with further development, it will not deliberately separate from MS, but rather further improve compatibility. I believe the issue of compatibility is a very prominent and important issue today. Just think: how painful communication would be between a person who only knows English and not Chinese, and another who only knows Chinese and not English. The communication between you and me today is a real form of compatibility.

Forinstance,yourGRUB.EXEreliesonDOSsystemandyourGRLDRreliesonbootsectorofanactiveNTBootPartition.

Yes, just as I said above, this is not beneficial to MS, nor is it harmful to GNU. It is useful, and that is enough. The West is full of lofty things such as ideals and justice, while Chinese people mostly speak in practical terms, are more constrained by reality, and fewer have the temperament of the West.

TospeedupyourGRUB.EXEandgoindependentofDOS,IsuggestyoutrythewayofSyslinuxorBootProgbyAlexeiA.Frounzeathttp://alexfru.chat.ru/epm.html

Thank you for providing this lead. I will find time to study it.

I.e.haveanMBRthatbootsuptheBootSectorandhavetheBootSectorthatloads
upGRUB.EXE

SyslinuxprovidestheMBRforFAT12/16forloadingacom/exefile

and

BootProgprovidestheBootSectorforFAT12/16thatloadsupacom/exefile.

BothclaimsthattheycanbeusedinFAT16HDD.

Sotomakeyourprojectperfect;youmaywishtotry:

1.makeanMBR-yourBootGrubalready?
2.makeyourbootsector-forreadingineitheryourGRUB.EXEoryourGRLDR
forFAT12/16/32/NTpartition

ForFAT12/16partition,BootProgcanprovideyousomesourcecodetomodelon.

ForFAT32/NTpartition,itmaybeabittime-consuming.

If the goal is to boot GRUB code from the MBR, then we do not need SYSLINUX and BOOTPROG at all. There are more concise and elegant ways to achieve the purpose. The FreeDOS boot loader can be modified to boot the GRLDR file on FAT12/16/32. I am currently doing this. As for GRLDR on an NTFS partition, we can already boot it successfully now. We have spent the least effort and achieved quite considerable results. If you understand that I have done no research at all into the structure of NTFS, and cannot even read any files from an NTFS system, then in such a situation, being able to locate the GRLDR file in an NTFS partition from the MBR and boot it is really a lazy trick. If I were not being lazy, then who knows in what year and month it would be accomplished.

Thank you for your reminders, help, concern, and suggestions all along, and I hope you will continue to help more. Thank you.



Dear TinyBit,

Your analysis is correct. And your effort in providing a GRUB FOR DOS /NTLDR is also highly appreciated by all of us. There is no question about this.

Your project has provided a lot of convenience. My suggestion is about how you can perfect your project. This is also about convenience.

Please consider if we could just copy an MBR or MBP = Master Boot Programme =
MBR minus Partition Table minus 55AA --- to the MBR of a hard disk and together with
GRUB.EXE/GRLDR and /BOOT/GRUB files to partitions of FAT12/16/32/NTFS/ext and we can bootup GRUB for starting any operating system, it would be very very convenient. Isn''t it?




Floor 189 Posted 2004-02-17 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Please consider if we could just copy an MBR or MBP = Master Boot Programme = MBR minus
Partition Table minus 55AA --- to the MBR of a hard disk and together with GRUB.EXE/GRLDR
and /BOOT/GRUB files to partitions of FAT12/16/32/NTFS/ext and we
can bootup GRUB for starting any operating system, it would be very very convenient. Isn''t it?

Yes, after the help and discussion from you brothers, I have already realized the importance of this brand-new issue, and I am currently starting to work on it. There are no plans to support ext and similar file systems. I am very unfamiliar with the structure of LINUX file systems, just as I am unfamiliar with NTFS.

I want to finish this matter as soon as possible and go do other things. It is my habit to do more things at less cost. As for things that are difficult, I will set them aside for the time being.
因为我们亲手创建,这个世界更加美丽。
Floor 190 Posted 2004-02-17 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
The following is quoted from Wengier on 2004-2-17 9:17:54:
不点:我刚才到真实机上试了一下,在一个很小的FAT12硬盘分区上,结果NTLDR+GRLDR启动成功!看来现在它已支持FAT12分区了,先前只是虚拟机的问题。


Many thanks. I don't need to go test it anymore.

The program code of pre3 is fairly perfect. According to our earlier goals, it can completely be released as the official version.

Should everyone take a vote to decide whether pre3 should be made the official version?

The disk emulation core of pre3 has gone through about two months with no changes at all. It has had no changes since grub_t10. It is very stable.

As for the work we are currently doing to boot GRLDR from the MBR, that is not very urgent at all, and can be released as 0.2.1.

What does brother wengier think?

Everyone can say what they think.
因为我们亲手创建,这个世界更加美丽。
Floor 191 Posted 2004-02-17 00:00 ·  中国 香港 环球全域电讯国际互联节点
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is quoted from 不点 on 2004-2-17 14:31:05:
The following is quoted from Wengier on 2004-2-17 9:17:54:
不点:我刚才到真实机上试了一下,在一个很小的FAT12硬盘分区上,结果NTLDR+GRLDR启动成功!看来现在它已支持FAT12分区了,先前只是虚拟机的问题。


Many thanks. I don't need to go test it anymore.

The program code of pre3 is fairly perfect. According to our earlier goals, it can completely be released as the official version.

Should everyone take a vote to decide whether pre3 should be made the official version?

The disk emulation core of pre3 has gone through about two months with no changes at all. It has had no changes since grub_t10. It is very stable.

As for the work we are currently doing to boot GRLDR from the MBR, that is not very urgent at all, and can be released as 0.2.1.

What does brother wengier think?

Everyone can say what they think.



Dear TinyBit,

I think naming convention is something you can decide. What is important is about substance.

Floor 192 Posted 2004-02-17 00:00 ·  中国 香港 有线电视
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
The following is quoted from 不点 on 2004-2-17 14:31:05:
The following is quoted from Wengier on 2004-2-179:17:54:
不点:我刚才到真实机上试了一下,在一个很小的FAT12硬盘分区上,结果NTLDR+GRLDR启动成功!看来现在它已支持FAT12分区了,先前只是虚拟机的问题。


非常感谢.我不用再去测试了.

pre3的程序代码比较完美,按照我们先前的目标,完全可以作为正式版发布了.

要不要大家来个投票,决定是否把pre3作为正式版?

pre3的磁盘仿真内核经历了大约两个月而没有任何变化,从grub_t10开始一直没有变化.是非常稳定的了.

至于说我们正在做的从MBR引导GRLDR的工作,完全不是太紧要的,可以作为0.2.1来发布.

wengier兄的意见如何?

大家都可以说说看.

How can this not work?
(fd0)/minix.mnx is Minix 2.0.4's ROOT.MNX+USR.MNX
grub> map (fd0)/minix.mnx (hd1)

Error 38: 鵹

grub> map (fd0)/minix.mnx (fd1)

Autodetect number-of-heads failed. Use default value 2

Autodetect sectors-per-track failed. Use default value 15

grub> map --hook

grub> chainloader (fd1)+1

Error 26: Disk read error

grub>
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 193 Posted 2004-02-18 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
(fd0)/minix.mnx is Minix 2.0.4's ROOT.MNX+USR.MNX
grub> map (fd0)/minix.mnx (hd1)

Error 38: 鵹

Thanks, brother Roy. This error message you posted is a BUG. The description part of the message was omitted. This needs to be corrected.

What the error message means: a floppy image should not be emulated as a hard disk.

grub> map (fd0)/minix.mnx (fd1)

Autodetect number-of-heads failed. Use default value 2

Autodetect sectors-per-track failed. Use default value 15

grub> map --hook

grub> chainloader (fd1)+1

Error 26: Disk read error

grub>

What the error message means: disk (fd1) does not exist. Our emulation cannot increase the number of floppies and hard disks in the system. If the real system has only one floppy drive, then you cannot use (fd1) as a second floppy. You can try this instead:

grub> map (fd0)/minix.mnx (fd0)
grub> map --hook
grub> chainloader (fd0)+1
grub> rootnoverify (fd0)
grub> boot

or

grub> map (fd0)/minix.mnx (fd0)
grub> chainloader (fd0)/minix.mnx
grub> rootnoverify (fd0)
grub> boot

Again, thanks to brother Roy for discovering this BUG in the description part of the error message.
因为我们亲手创建,这个世界更加美丽。
Floor 194 Posted 2004-02-18 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
pre4 adds the missing error message. There are no other changes.

ftp://211.100.7.71/incoming/grub_for_dos-0.2.0pre4.tar.gz

TO brother wengier:

Could this webpage be updated:
http://newdos.yginfo.net/grubdos.htm

(I hope to provide pre4 there for foreign friends to download).

Could this passage on the webpage be revised a little:
GRUB for DOS now supports different sizes of floppy disk images, such as 720KB, 1.44MB, 1.68MB, and even hard disk images! With GRUB for DOS, you can boot your system from floppy boot images without any real bootable floppy disks at all!

Changed to something like:
GRUB for DOS now supports floppy disk images of any size, such as 720KB, 1.44MB, 1.68MB, 2.88MB, and even hard disk images(also with arbitrary size)! With GRUB for DOS, you can boot your system from floppy boot images without any real bootable floppy disks at all!

2.88M is a standard disk size, so it ought to be mentioned specifically.

Also, 0.2.0 includes grub for ntldr and splashimage support; these can be mentioned too.

因为我们亲手创建,这个世界更加美丽。
Floor 195 Posted 2004-02-18 00:00 ·  中国 香港 环球全域电讯国际互联节点
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
‹ Prev 1 11 12 13 14 15 19 Next ›
Forum Jump: