![]() |
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:19 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » The problem of virtualizing two floppy drives in grub of DOS. |
| Printable Version 1,868 / 11 |
| Floor1 Qlin | Posted 2005-03-21 00:00 |
| 初级用户 Posts 11 Credits 131 | |
|
Because of some reasons, I need to virtualize two floppy drives in grub of DOS. The process is as follows.
map (hd0,0)/boot.flp (fd0) map (hd0,0)/kern.flp (fd1) chainloader (hd0,0)/boot.flp chainloader (hd0,0)/kern.flp rootnoverify (fd0) boot After that, it still doesn't work. Still can't read kern.flp. How to solve it?? PS. What software under Windows can modify floppy disk image files (*.flp)?? Thanks |
|
| Floor2 不点 | Posted 2005-03-21 00:00 |
| 银牌会员 Posts 1,115 Credits 2,491 | |
|
The chainloader command determines which boot sector is used to boot the operating system, so the chainloader command is only effective if used once. If this command is used multiple times, only the last one will take effect, and those chainloader commands before it are all useless.
For disk emulation, these two commands are correct: map (hd0,0)/boot.flp (fd0) map (hd0,0)/kern.flp (fd1) If using version 0.4.0, you can add the --mem parameter to use the emulation function of the memory disk. Note that the above commands only specify that the emulated disks are fd0 and fd1, and do not specify which sector is used to boot your operating system. Guessing from your file names, you may want to boot from boot.flp, so you should do this: chainloader (hd0,0)/boot.flp rootnoverify (fd0) boot This should be fine. |
|
| Floor3 不点 | Posted 2005-03-21 00:00 |
| 银牌会员 Posts 1,115 Credits 2,491 | |
|
But still need to add one point. In version 0.4.0, we have added two very important map command parameters:
map --floppies=M map --harddrives=N These two commands specify the number of floppy drives and the number of hard drives recognized by the BIOS. For your situation, it should be like this: map (hd0,0)/boot.flp (fd0) map (hd0,0)/kern.flp (fd1) map --floppies=2 chainloader (hd0,0)/boot.flp rootnoverify (fd0) boot Among them, map --floppies=2 is only needed before boot. Besides, there are no other requirements. It can be placed at the front or at the end, which is all right. |
|
| Floor4 Qlin | Posted 2005-03-21 00:00 |
| 初级用户 Posts 11 Credits 131 | |
|
Haha. Thanks, Brother Budian
|
|
| Floor5 Qlin | Posted 2005-03-21 00:00 |
| 初级用户 Posts 11 Credits 131 | |
|
Is there any limit to the number specified by the commands `map --floppies=M` and `map --harddrives=N` that indicate the number of floppy drives and hard drives recognized by the BIOS? For example, is there a limit like not exceeding two? Thanks.
|
|
| Floor6 Qlin | Posted 2005-03-21 00:00 |
| 初级用户 Posts 11 Credits 131 | |
|
Brother Budian. According to your prompt, I carried out the following operations.
map (hd0,0)/boot.flp (fd0) map (hd0,0)/kern.flp (fd1) chainloader (hd0,0)/boot.flp rootnoverify (fd0) boot But it still doesn't seem to work. I wonder what the reason is.?? Thanks. |
|
| Floor7 不点 | Posted 2005-03-21 00:00 |
| 银牌会员 Posts 1,115 Credits 2,491 | |
|
The specified number of floppy disks cannot exceed 2, and the specified number of hard disks cannot exceed (I kind of forgot, probably) 100 or so.
> But it still doesn't seem to work. I don't know what the reason is..?? Thanks. "Inoperable" in which aspect? Is it unable to boot? Or some other problem, you didn't describe in detail. As long as after booting, the control can be smoothly handed over to the boot code of boot.flp, this is the success of GRUB for DOS. As for the operating system you boot later, such as linux or BSD, etc., since these operating systems switch from real mode of CPU to protected mode, after that, these operating systems no longer use simulation, because they no longer use int13. That is to say, once such an operating system is successfully booted, you can no longer access our virtual floppy disk. Only during the boot process of the operating system, that is, during the period before the operating system gains control, our simulation still works. |
|
| Floor8 Qlin | Posted 2005-03-21 00:00 |
| 初级用户 Posts 11 Credits 131 | |
|
Thanks, Brother Budian.
So that's how it is. My ideal situation is. First boot from drive A, then read the kern from drive B. It seems it's not possible, though. |
|
| Floor9 不点 | Posted 2005-03-22 00:00 |
| 银牌会员 Posts 1,115 Credits 2,491 | |
|
Dude, you might be using BSD. Whether it's LINUX or BSD, neither currently supports real-mode BIOS interrupt calls. But on the other hand, protected mode can definitely support real-mode interrupt calls, which can be called a "real-mode compatibility layer." Windows 98 has such a compatibility layer, so Windows 98 can smoothly access the RAM disk we mapped through int13. Note that Windows 98 is also a protected-mode operating system. Windows NT/2K/XP/2003 are all protected-mode operating systems as well. The difference is that they removed the real-mode compatibility layer, that is, a certain DLL real-mode compatibility driver file. Suppose a company writes such a driver for Windows NT/2K/XP/2003, then Windows NT/2K/XP/2003 can also support all the concepts of real mode, including entering real-mode DOS like Windows 98 from within Windows NT/2K/XP/2003 without restarting Windows. It's just that Microsoft deliberately doesn't do it, and other companies don't want to go to the trouble to do it for it.
The same logic applies to LINUX and BSD. There are no real-mode compatibility drivers in these operating systems originally, but a compatibility layer can definitely be added to them. Of course, this is all low-level system operation, which will be more troublesome, but there are no substantial difficulties. =============== Under the current circumstances, maybe you can get around the above restrictions with a little workaround. For example, put all your files on drive A: and make drive A: itself very large, say 2.88M. Or, if it's not enough, just make it 50M or 1000M. After being emulated by GRUB4DOS, the boot program of drive A: gains control. This boot program loads the kernel and initrd on drive A: into memory. When the kernel gains control, there's no need to read the floppy disk anymore because all the data of the floppy disk (except the kernel) is in initrd, which is already in memory. I haven't used BSD, but I'm very clear that this method works for LINUX. |
|
| Floor10 Qlin | Posted 2005-03-22 00:00 |
| 初级用户 Posts 11 Credits 131 | |
|
According to the above, I made the following attempts..
The system situation is. There are two primary partitions on the hard drive, and in grub it is shown that the first one is hd0, 0 and the second one is hd0, 2. I extracted the freebsd iso file to the second primary partition (hd0, 2). My idea is to virtualize the second primary partition as drive A, and then boot from drive A. Then the following operations were carried out: map (hd0,2)+1 (fd0) chainloader (fd0)+1 rootnoverify (fd0) boot But after running chainloader (fd0)+1, the computer will beep continuously and then crash. Is there any mistake in my approach like this? Why can't it succeed..? Thanks. |
|
| Floor11 不点 | Posted 2005-03-22 00:00 |
| 银牌会员 Posts 1,115 Credits 2,491 | |
|
The file system of your partition, if it is not a Microsoft format like FAT/NTFS, the partition emulation function you are using cannot be used.
You can change to the file emulation function: map (hd0,2)+xxxxxxxx (fd0) map --hook chainloader (fd0)+1 rootnoverify (fd0) boot When xxxxxxxx is 1, it is to call the partition emulation function, and when xxxxxxxx is equal to the total number of sectors in the partition, it is to call the file emulation function. In addition, you are missing an important map --hook command. |
|
| Floor12 Qlin | Posted 2005-03-23 00:00 |
| 初级用户 Posts 11 Credits 131 | |
|
Thank you, not click brother.... The problem is solved. Ha ha..
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |