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 16:52
Original Poster Posted 2004-01-11 00:00 ·  中国 四川 南充 电信
初级用户
Credits 141
Posts 14
Joined 2004-01-10 00:00
22-year member
UID 15232
Gender Male
Status Offline
I just used a GRUB virtual image file. After exiting and restarting into XP, I actually found new hardware and saw that a floppy drive B was automatically added.

Floor 2 Posted 2004-01-12 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Thanks.

The cause of this BUG is unknown. This may indicate that GRUB for DOS has modified the CMOS settings.

The grub.exe file of GRUB for DOS 0.2.0 executes the int 13/AX=4b00 command when starting, forcibly exiting the floppy disk and hard disk emulation of the CDROM. It may be that when some BIOS executes int 13/AX=4b00, it also modifies the byte of the number of floppy disks in the CMOS or BIOS data area.

The solution is to not execute the int 13/AX=4b00 command. There is no option provided currently, and the source code must be modified and recompiled.

There should be no problem when installing GRUB to the MBR.

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

Background information:

When we boot DOS from CDROM and run grub.exe, if win98 is started by GRUB.exe, accessing the A: drive when win98 will cause a crash. The reason is that the A: drive is emulated by BIOS, not a real A: floppy drive, but a 1.44M image on CDROM.

When running GRUB.exe, the startup code executes int13/ax=4b00 to exit the emulation of floppy disks, hard disks, etc. on CDROM, which can solve this problem.

However, as you can see, this brings another problem.

The above is just a guess.

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

If there is no other major obstacle at this time, I think, for the time being, keep this int13/AX=4b00.

Or add an option in the next version so that the execution of int13/AX=4b00 can be prohibited with command line parameters.
因为我们亲手创建,这个世界更加美丽。
Floor 3 Posted 2004-01-12 00:00 ·  中国 重庆 电信
银牌会员
★★★
Credits 2,202
Posts 499
Joined 2003-06-12 00:00
23-year member
UID 4876
Gender Male
Status Offline
Hehe, last time I used Vfloppy, after rebooting, XP suddenly had 1 more small floppy - B, heh, exactly the same. : )
一年四季,枫叶红了又红;人生四季,失去的,还能再来吗?—— !
Floor 4 Posted 2004-01-12 00:00 ·  中国 四川 南充 电信
初级用户
Credits 141
Posts 14
Joined 2004-01-10 00:00
22-year member
UID 15232
Gender Male
Status Offline
Yes, after deleting the extra floppy drive and restarting again, the floppy drive B in XP is gone. Thank you for your reply.
Floor 5 Posted 2004-01-12 00:00 ·  中国 四川 南充 电信
初级用户
Credits 141
Posts 14
Joined 2004-01-10 00:00
22-year member
UID 15232
Gender Male
Status Offline
There is another question: When I boot with a real floppy drive, there is a boot: waiting there for 20 seconds, and after pressing F2, a menu comes out. But with the virtual one, it flashes by. I copied knoppix to the hard disk and boot with the image file, so I need to configure the menu about the monitor and select which desktop to enter. Also, I wonder if I can make such a program (or add an option in grub.exe) to use like this: Add c:\grub.dat="grub boot program" in the XP's boot.ini, which is actually equivalent to the boot image of the MBR.
Floor 6 Posted 2004-01-12 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Regarding Knoppix, I don't know what's going on. I guess it's caused by the Knoppix bootloader itself.

Regarding the issue of adding a GRUB entry in the boot.ini of NTLDR, the discussion is as follows:

1. The boot image loaded by boot.ini can only load one sector, that is, the first sector, and the remaining sectors are discarded. So, it's impossible to directly load GRUB's stage2 with it. At most, it can be used to load stage1 or load the MBR.

2. GRUB doesn't support the NTFS file system, so operations need to be done in FAT32.

Well, based on the above two points, you can try the following method :

First, back up your MBR boot sector (512 bytes). Then, install the boot/grub/*.* directory and files of GRUB on the C: drive (in FAT32 format), and install GRUB to the MBR.

At this time, the MBR is already GRUB's code. You save this MBR boot sector as a file c:\grub.dat, and then you can modify boot.ini to be c:\grub.dat="GRUB Boot Program". After modification, you restore the MBR to the original win2000/xp MBR. At this time, the MBR no longer has GRUB's code.

Restart the machine, and there should be a GRUB boot entry in your boot.ini menu, which should be able to start GRUB.
因为我们亲手创建,这个世界更加美丽。
Floor 7 Posted 2004-01-12 00:00 ·  中国 四川 南充 电信
初级用户
Credits 141
Posts 14
Joined 2004-01-10 00:00
22-year member
UID 15232
Gender Male
Status Offline
Thanks, I also thought about the steps you wrote, but my C drive is in Ntfs format, but I just converted the F drive to F32 a few days ago in order not to burn a CD to install Linux. There should be a Grub image on my Linux drive, but can that be used to map a floppy disk?
Floor 8 Posted 2004-01-12 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
As long as there are partitions such as FAT32, ext2 on the hard disk, the above method can be used. All that needs to be done is to place boot/grub/*.* on the FAT32, ext2 partitions supported by GRUB, and there is nothing else. Only versions of grub for dos 0.1.x and later support the function of emulating a floppy disk. The GRUB that comes with general Linux distributions does not support floppy disk emulation.
因为我们亲手创建,这个世界更加美丽。
Floor 9 Posted 2004-01-12 00:00 ·  中国 四川 南充 电信
初级用户
Credits 141
Posts 14
Joined 2004-01-10 00:00
22-year member
UID 15232
Gender Male
Status Offline
I just tried it. First, I used the add startup item function in System Commander 7.05, which writes the MBR file to C:\, but it doesn't start successfully in SC705. However, it succeeds when I write it to boot.ini. Also, in the GRUB installed on the Linux partition, I can execute:
map (hd0,6)/knoppix/boot.img (fd0)
chainloader (hd0,6)/knoppix/boot.img
But I can't execute
rootnoverify (fd0)
It seems like something about BIOS not supporting it? (Sorry, my English is not very good, I didn't understand the meaning for a while.)
Floor 10 Posted 2004-01-12 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
rootnoverify (fd0)

This command always executes successfully and cannot fail. The information it displays is not a failure message.

After executing rootnoverify (fd0), then execute

boot

and that's it.
因为我们亲手创建,这个世界更加美丽。
Floor 11 Posted 2004-01-13 00:00 ·  中国 四川 南充 电信
初级用户
Credits 141
Posts 14
Joined 2004-01-10 00:00
22-year member
UID 15232
Gender Male
Status Offline
I did that, but it shows "boot fail"
Floor 12 Posted 2004-01-13 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
If these two commands
map (hd0,6)/knoppix/boot.img (fd0)
chainloader (hd0,6)/knoppix/boot.img
have no error messages, then it is because the boot.img itself is not suitable for booting using the grub emulation method.

When the boot.img starts a LINUX kernel, if the kernel still needs to read the content of /dev/fd0, it will fail. This is clearly stated on the grub documentation webpage.
因为我们亲手创建,这个世界更加美丽。
Forum Jump: