harddisk image format with grub?
Posted 12 November 2008 - 09:59 PM
my harddisk image file 'dosbase.raw' is booted well with qemu.
the file was made with qemu-img.exe tool in 'raw' format.(size is exactly 50x1024x1024 bytes.)
in my 'menu.lst', the code is:
[codebox]title msdos71 map --read-only (hd0,5)/oses/dosbase.raw (hd0) chainloader --load-length=512 (hd0,5)/oses/dosbase.raw rootnoverify (hd0) map --harddrives=1 boot[/codebox]
This was copied from README_GRUB4DOS.txt.
(Emulates an image file as the first hard disk and boot DOS from it)
But if I select msdos, it gives me an error.
(invalid system disc? as when you boot a unformatted hard disk.)
Then, is it a wrong image format?
Posted 13 November 2008 - 06:34 AM
2. if the dosbase.raw is a whold hd's image or just a partition image?
3. after map --hook, you can try go into the command line of grub4dos, and use:
to test if you can see the files on the partition.
4. make sure you are using the most recent release of grub4dos. check it at : http://grub4dos.nufans.net
title msdos71 map --mem (hd0,5)/oses/dosbase.raw (hd0) map --hook #<-- you lost this command. root (hd0,0) makeactive chainloader (hd0)+1 map --harddrives=1 boot
NOTICE: Your menu lost the "map --hook" command.
Posted 13 November 2008 - 07:35 AM
Therefore I 'think' it is whole hd's image..
And 'map --hook' line was not in the code in README file, so I don't know if we need it, because I don't understand the code fully.
The command 'ls (hd0,0)/' shows my MSDOS files in the hard disk image, both with your code and my code+'map --hook' command.
And my grub4dos version is from 2008-11-08, I think it's enough, but I'll check again..
Ah, the thing most important, here's the warning message when I run your code:
[codebox]Warning: total_sectors calculated from partition table(102816) is greater than the number of sectors in the whole disk image (102400). The int13 handler will disable any read/write operations across the
image boundary. That means you will not be able to read/write sectors
(in absolute address, i.e., lba) 102400 - 102815, though they are
logically inside your emulated virtual disk(according to the partition
probed C/H/S = 102/1663, probed total sectors = 102816[/codebox]
After this, the usual 'Invalid system disk' message...
Thanks for the help.
I can boot my DOS floppy booting image in grub, according to the README file, but not hard disk image.
If anyone has been able to do it, can he tell his hard disk image format, and his code, please?
Posted 13 November 2008 - 10:00 AM
Posted 14 November 2008 - 03:37 AM
1. This image has a CHS issue. The partition table used H=16, S=63, but the BPB of the first partition used H=10, S=63. Qemu seems to use H=10, S=63 thus no problems occurred. So the image is actually H=10, S=63. Hence, we should use this instead:
map --read-only --heads=10 (hd0,5)/oses/dosbase.raw (hd0)
2. Your DOS could work fine with grub4dos, but your Config.sys and autoexec.bat have issues. I tried to delete those two files, and DOS booted ok.
Posted 14 November 2008 - 04:25 AM
I wonder how such a thing happens...?
This image has a CHS issue. The partition table used H=16, S=63, but the BPB of the first partition used H=10, S=63. Qemu seems to use H=10, S=63 thus no problems occurred. So the image is actually H=10, S=63.
It was not something I can solve myself...
Thanks for your work & effort, tinybit. It was much help.
EDIT: this is very late, but I found this thread:
Boot with grub4dos a DOS image, (for BIOS updating, for example)
and I think my thread could be sticked to it. But what the administrator think is important...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users