Jump to content











Photo
- - - - -

harddisk image format with grub?


  • Please log in to reply
6 replies to this topic

#1 Tedd_79

Tedd_79

    Newbie

  • Members
  • 18 posts
  •  
    Sierra Leone

Posted 12 November 2008 - 09:59 PM

I want to boot DOS with a hard disk image with grub.
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?

#2 xclimbing

xclimbing

    Member

  • Members
  • 36 posts
  •  
    China

Posted 13 November 2008 - 06:34 AM

1. map without --mem option need the dosbase.raw file must be stored continuously.

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:
ls (hd0,0)/
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

5. try:
title msdos71

map --mem (hd0,5)/oses/dosbase.raw (hd0)

map --hook		  #<-- you lost this command.

root &#40;hd0,0&#41;

makeactive

chainloader &#40;hd0&#41;+1

map --harddrives=1

boot

NOTICE: Your menu lost the "map --hook" command.

#3 Tedd_79

Tedd_79

    Newbie

  • Members
  • 18 posts
  •  
    Sierra Leone

Posted 13 November 2008 - 07:35 AM

dosbase.raw was mounted as hda with qemu, partitioned as fat32 and formatted & installed with dos floppy discs.
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

table).

probed C/H/S = 102/1663, probed total sectors = 102816[/codebox]

After this, the usual 'Invalid system disk' message... :cheers:

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?

#4 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 13 November 2008 - 10:00 AM

can you compress and upload your image file to somewhere and let me download it?

#5 Tedd_79

Tedd_79

    Newbie

  • Members
  • 18 posts
  •  
    Sierra Leone

Posted 13 November 2008 - 10:37 AM

Ok, here the link is :

http://www.savefile.com/files/1884414

#6 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 14 November 2008 - 03:37 AM

Two problems:

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 &#40;hd0,5&#41;/oses/dosbase.raw &#40;hd0&#41;

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.

#7 Tedd_79

Tedd_79

    Newbie

  • Members
  • 18 posts
  •  
    Sierra Leone

Posted 14 November 2008 - 04:25 AM

It works with no trouble after your guide..!

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.

I wonder how such a thing happens...? :cheers:
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)
http://www.boot-land...?showtopic=2265

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