Mailing List Archive

memdisk hd images
How does one make a HD image? Floppy images are easy enough, but to have to
create a hdimage, you need MBR and partitions, etc... I want to create a
10MB DOS HD and boot it, how would I do this with Linux?

Thanks.
memdisk hd images [ In reply to ]
Egan Ford wrote:

> How does one make a HD image? Floppy images are easy enough, but to
have to
> create a hdimage, you need MBR and partitions, etc... I want to create a
> 10MB DOS HD and boot it, how would I do this with Linux?
>


By far the easiest way is to use DOSEMU, if you have a DOSEMU setup. I
usually set up the disk image I'm working on as the second harddrive in
DOSEMU. Note that DOSEMU puts a 128-byte header on its hard disk
images; it needs to be stripped off (dd if=dosemuimg of=rawimage bs=128
skip=1) -- a future version of MEMDISK might be able to detect and
ignore it.

Unfortunately, there are otherwise no good tools to make a disk image
from Linux; there is no tool to make an MBR (the one shipped with
SYSLINUX unfortunately doesn't work) and mkdosfs doesn't work too well
on a non-floppy image.

For that reason, you're probably better creating a "large floppy" image
instead.

-hpa
memdisk hd images [ In reply to ]
Thanks, I figured as much and used DOSEMU to create the image, however I
didn't strip off the first 128 bytes.

Questions:

1. When I tried to boot my 16MB DOSEMU created HD image, memdisk did not
recognize the S/H/C data, was this because of the 128 bytes? (I updated
mkfatimage16 to output the S/H/C to compensate, then added to my conf file).

2. Do you think you might support compressed HD images? gzip?

3. How would I create a "large floppy"? I tried 2.88 with no success (I
could not find a IBM DOS 2.88 boot sector and I do not have a 2.88 drive).

Thanks.

> -----Original Message-----
> From: syslinux-admin@zytor.com [mailto:syslinux-admin@zytor.com]On
> Behalf Of H. Peter Anvin
> Sent: Monday, January 21, 2002 8:37 PM
> To: syslinux@zytor.com
> Subject: Re: [syslinux] memdisk hd images
>
>
> Egan Ford wrote:
>
> > How does one make a HD image? Floppy images are easy enough, but to
> have to
> > create a hdimage, you need MBR and partitions, etc... I want
> to create a
> > 10MB DOS HD and boot it, how would I do this with Linux?
> >
>
>
> By far the easiest way is to use DOSEMU, if you have a DOSEMU setup. I
> usually set up the disk image I'm working on as the second harddrive in
> DOSEMU. Note that DOSEMU puts a 128-byte header on its hard disk
> images; it needs to be stripped off (dd if=dosemuimg of=rawimage bs=128
> skip=1) -- a future version of MEMDISK might be able to detect and
> ignore it.
>
> Unfortunately, there are otherwise no good tools to make a disk image
> from Linux; there is no tool to make an MBR (the one shipped with
> SYSLINUX unfortunately doesn't work) and mkdosfs doesn't work too well
> on a non-floppy image.
>
> For that reason, you're probably better creating a "large floppy" image
> instead.
>
> -hpa
>
> _______________________________________________
> SYSLINUX mailing list
> Submissions to SYSLINUX@zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
memdisk hd images [ In reply to ]
Egan Ford wrote:

> Thanks, I figured as much and used DOSEMU to create the image, however I
> didn't strip off the first 128 bytes.
>
> Questions:
>
> 1. When I tried to boot my 16MB DOSEMU created HD image, memdisk did not
> recognize the S/H/C data, was this because of the 128 bytes? (I updated
> mkfatimage16 to output the S/H/C to compensate, then added to my conf file).
>


Yes, that would be because the 128 bytes; strip them off and it should work.


> 2. Do you think you might support compressed HD images? gzip?


Not likely any time soon.


> 3. How would I create a "large floppy"? I tried 2.88 with no success (I
> could not find a IBM DOS 2.88 boot sector and I do not have a 2.88 drive).


You can use the boot code from any other bootsector; mkdosfs will create
the superblock properly. (MS-DOS confusingly puts the superblock in the
boot sector; you have to keep the boot sector code and the superblock
information separate...)

-hpa
memdisk hd images [ In reply to ]
> > 3. How would I create a "large floppy"? I tried 2.88 with no
> success (I
> > could not find a IBM DOS 2.88 boot sector and I do not have a
> 2.88 drive).
>
>
> You can use the boot code from any other bootsector; mkdosfs will create
> the superblock properly. (MS-DOS confusingly puts the superblock in the
> boot sector; you have to keep the boot sector code and the superblock
> information separate...)
>
> -hpa
>

I know so little about DOS, how would I go about doing this?

Thanks.
memdisk hd images [ In reply to ]
Egan Ford wrote:

>
> I know so little about DOS, how would I go about doing this?
>


The superblock information is kept in bytes 3-61 in the boot sector.
Those need to be preserved; the remaining bytes are the boot sector proper
that should be copied from whatever version of DOS you're using.

Under DOSEMU you can of course just run "SYS".

-hpa