Jump to content











Photo
- - - - -

Bootable DOS CD


  • Please log in to reply
14 replies to this topic

#1 coyote

coyote
  • Members
  • 5 posts
  •  
    United States

Posted 25 October 2009 - 12:17 AM

I downloaded an MS-DOS 6.22 Bootable CD Image

I used MagicISO to merge in my additional files, and burn the CD.

Here is the puzzle:

1. I can examine the resulting (MS-DOS 6.22 + new files) CD-ROM from Windows XP - it has the new files on it.

2. With when I boot the CD-ROM, MS-DOS 6.22 boots up OK, but there is no sign of the new files.

p.s. if I get this working, I want to modify the AUTOEXEC.BAT to run an executable (I'll look for next, or I'm open to advice on how to create it) to automatically reboot the computer. (I'm trying to get it into a reboot loop for testing a hardware issue.)

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 25 October 2009 - 08:31 AM

I downloaded an MS-DOS 6.22 Bootable CD Image

I used MagicISO to merge in my additional files, and burn the CD.


Used it HOW?

There are two ways to "add files" to a bootable DOS CD:
  • enlarge (up to a maximum of 2.88 Mb) the El-Torito Floppy emulation image and add files to it <-files WILL be visible from DOS
  • add the files on the "normal "CD filesystem" <-files WON'T be visible from DOS unless MSCDEX.EXE is loaded (if iso-level is 4 you will need SHSUCDX instead)

For reboot, take your choice:
have a look at the given links to make a DOS floppy image/bootable DOS CD in a different way:
http://www.boot-land...?showtopic=9402
then get the reboot apps here:
http://www.boot-land...?...=9402&st=15

More generally, .ISO editing tools tend to do "strange things, it is always advisable to start from scratch and rebuild the .iso form the ground up.

:cheers:

jaclaz

#3 coyote

coyote
  • Members
  • 5 posts
  •  
    United States

Posted 26 October 2009 - 03:55 AM

[*]enlarge (up to a maximum of 2.88 Mb) the El-Torito Floppy emulation image and add files to it <-files WILL be visible from DOS
<snip>
More generally, .ISO editing tools tend to do "strange things, it is always advisable to start from scratch and rebuild the .iso form the ground up.

I've tried it every way I can (with both Nero and MagicISO). I've put the bootable image into a folder and built a new ISO. I've enlarged the image. I don't want to admit defeat!

#4 sanbarrow

sanbarrow

    Silver Member

  • Developer
  • 788 posts
  • Location:Germany - Sauerland

Posted 26 October 2009 - 04:19 AM

AFAIK neither Nero nor MagicIso can enlarge the boot-image.
Have a look at Winimage instead - that can handle floppy-images

#5 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 October 2009 - 08:50 AM

I've tried it every way I can (with both Nero and MagicISO). I've put the bootable image into a folder and built a new ISO. I've enlarged the image. I don't want to admit defeat!


The whole point I was trying to make was that you should NOT use MagicISO, nor Nero, as you probably won't be able to have something working. :confused1:

I gave you some alternate ways, Winimage (SHAREWARE) will work allright for recreating a (bigger) DOS image, as sanbarrow pointed out, then you can use Nero though of course the suggested app of choice is IMGBURN or mkisofs.exe.

jaclaz

#6 Immortal

Immortal

    Member

  • Members
  • 39 posts
  •  
    United States

Posted 27 October 2009 - 11:09 AM

[quote name='coyote' date='Oct 25 2009, 12:17 AM' post='82518']
I downloaded an MS-DOS 6.22 Bootable CD Image

I used MagicISO to merge in my additional files, and burn the CD.

Here is the puzzle:

1. I can examine the resulting (MS-DOS 6.22 + new files) CD-ROM from Windows XP - it has the new files on it.

2. With when I boot the CD-ROM, MS-DOS 6.22 boots up OK, but there is no sign of the new files.
___________________________________________________________
@coyote

Try to download a bootable cd ISO (not img)
Google " MS-DOS Bootable CD Images ISO "

I'm using Magic-ISO and have no problems adding extra
files or folders to the ISO. Only remember saving the new
ISO with a new name.

If you want to "see" your NTFS partition download
and install Avira NTFS4DOS Personal (it's free) here:
http://www.free-av.c...s_personal.html

Run the program and it will try finding a floppy but you
can choose an usb-stick instead. Some files will be copied
to the usb. Add these files to your ISO with MagicISO.
Save and reboot with your cd. Some files will be at "A" but
the "main" files you will find on "S" or "R" (CD)!

I can add some pics later if something is unclear.

Ps. If you have it, add the "old" NC to the ISO and your "job" will be much easier :-)

#7 tikbalang

tikbalang

    Newbie

  • Members
  • 26 posts
  •  
    Philippines

Posted 27 October 2009 - 02:03 PM

the bootcd you have is using floppy emulation, with a floppy boot image that is not loading a cdrom driver for dos. get a floppy bootdisk that loads cdrom drivers and use that as the bootimage for the cd iso.

#8 Immortal

Immortal

    Member

  • Members
  • 39 posts
  •  
    United States

Posted 27 October 2009 - 05:06 PM

the bootcd you have is using floppy emulation, with a floppy boot image that is not loading a cdrom driver for dos. get a floppy bootdisk that loads cdrom drivers and use that as the bootimage for the cd iso.

______________________________________________________

Did you read my message JUST before yours?
It says: Do NOT use an img-images=Floppy
Use an ISO-image=CD/DVD

One pic is from MY iso while booting
The other shows how to add files/folders into
the ISO using MagicISO :-)

Attached Thumbnails

  • ScreenHunter_004_copy.jpg
  • ScreenHunter_005_copy.jpg


#9 coyote

coyote
  • Members
  • 5 posts
  •  
    United States

Posted 28 October 2009 - 06:15 PM

Some files will be at "A" but the "main" files you will find on "S" or "R" (CD)!

that was it, thanks! (the drive is at "R"; I had only checked halfway up the alphabet.)

the PC now will reboot if at the A: I manually type r:\reboot
but I still can't get it to reboot automatically. I've tried adding a variety of lines to the AUTOEXEC.BAT (which now reads
MSCDEX.EXE /D:banana /L:R
but nothing works. here are some of the things I've tried adding...

R:
CD/
REBOOT.EXE
....
R:
CD/REBOOT
REBOOT.EXE
...
PROMPT $p$g
PATH=R:
R:\REBOOT;REBOOT.EXE
...
PROMPT $p$g
PATH=R:
R:\REBOOT
REBOOT.EXE
...
it always just leaves me at A:
how do I automatically execute reboot.exe?
it appears to still be using the original AUTOEXEC.BAT (which I replaced[!], but) which is still appearing under A: with a filedate of 5-26-99.

thanks in advance!

#10 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 October 2009 - 07:24 PM

@Immortal
You might want to tone it down a bit :confused1:, tikbalang was replying to OP, not to you.

@coyote
You should try reading and understanding a bit about CD booting.

This is a god start point:
http://www.nu2.nu/bootcd/

The autoexec.bat that will actually be used is the one inside the el-torito floppy emulation image (your simulated drive A:\ when the CD boots).

You need to extract the el-torito floppy emulation image, mount it in a Virtual Disk, modify the autoexec.bat in it (optionally adding REBOOT.COM to the floppy image) and replace the floppy image inside the .iso.

BTW the toolset I pointed you to have three files in it:
  • REBOOT.COM
  • poweroff.exe
  • SHUTDOWN.COM

NO REBOOT.EXE among them.

:unsure:

jaclaz

#11 coyote

coyote
  • Members
  • 5 posts
  •  
    United States

Posted 29 October 2009 - 04:00 AM

@coyote
You should try reading and understanding a bit about CD booting.

sorry, I'm sure you're right, thank you jaclaz.

This is a good start point:
http://www.nu2.nu/bootcd/

I just studied that page in full. I wish I could say I understood much of it. But I did read it carefully for the first time (over the years every time I looked at that page it intimidated me).

The autoexec.bat that will actually be used is the one inside the el-torito floppy emulation image (your simulated drive A:\ when the CD boots).

I think I'm understanding now that the (bootable DOS) ISO that I've been downloading and modifying and burning, is *not* the same as the "emulation image". so now...

You need to extract the el-torito floppy emulation image, mount it in a Virtual Disk, modify the autoexec.bat in it (optionally adding REBOOT.COM to the floppy image) and replace the floppy image inside the .iso.

how do I get at the "el-torito floppy emulation image"? will it manifest itself to me when I "mount" the bootable DOS ISO? (if so, what ap should I use to mount the bootable DOS ISO?)

NO REBOOT.EXE among them.

right, sorry, I've been testing with a reboot.exe I got elsewhere.

thanks to all for your patience and help! I've never felt this clueless. as unbelievable as this will sound, I'm a computer programmer.

#12 Immortal

Immortal

    Member

  • Members
  • 39 posts
  •  
    United States

Posted 29 October 2009 - 06:42 AM

@coyote
You want to edit the "autoexec.bat" inside the ISO, right?

Just open your ISO with MagicISO and extract the ”autoexec.bat”.
Then you can edit the file and when done put it back to the ISO with MagicISO. Remember to save the ISO with a new name.

#13 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 29 October 2009 - 11:30 AM

@coyote
Let's see if I can help you with the basics.

Once upon the time PC's ONLY had floppy disk(s).
The BIOS since day 0 "knows" how to boot from a floppy disk.
Later hard disks came, and code was added to boot from hard disks.
Later hard disks started growing in size, creating all kind of troubles.
Later yet CD-ROMs came out.
Later again the idea of making this new media bootable came out.
THREE different ways were devised to achieve that:
  • El Torito Floppy Emulation
  • El Torito No Emulation
  • El Torito Hard Disk emulation
From bottom to top:
Method #3 is VERY rarely used, it is basically a small hard disk image spanning over the whole size of the CD, only compatible with a relatively small number of BIOSes.
Method #2 is used normally in all Microsoft "install media" for their Operating Systems, in the various PE's, by grub4dos, etc, it basically consists in a "special" bootsector code that replaces and can be considered equivalent to a partition bootsector on a hard disk, it is more "compatible" than the above, but still some (VERY old) BIOSes won't support it.
Method #1 is used normally in DOS based CD's, it is the most compatible, basically it creates TWO "devices", a "virtual" floppy disk - that normally get's the A: or B: drive letter and a "normal", "non-bootable" CDROM volume. You can think of it as a partitioned hard drive where first partition is active and bootable and the second one is not.

The "peculiarity" of this kind of CD is that if you boot from it you will see TWO volumes, first one as a floppy and second one as a CD (respectively A: and R: in your case).

If you access it from an already booted system you will ONLY see the second part of it, i.e. the R: volume.

Put aside for the moment magiciso or whatever iso editing tool and try open the .iso image with 7-zip.

You will see all the files you would normally see in R: and a folder [BOOT].
Inside the folder [BOOT] you will see a file, that could be named something like Bootable_2.88M.img or Bootable_1.44M.img, it will be either 2,949,120 or 1,474,560 bytes in size.
Open the file with 7-zip and you will see that it has the contents of the A: drive (when the CD is booted).

What you have in your hands is a "container" (the .iso file) containing a CDFS filesystem (the things you see as R:\) AND another "container" (the Bootable_1.44M.img) containing a FAT12 filesystem (the things you see as A:\ ).

BIOS boots->loads the Bootable_1.44M.img (mapping it as if it were a floppy and gives it letter A: ->DOS boots->reads the AUTOEXEC.BAT and CONFIG.SYS in A:->if provisions are made in them to load MSCDEX or SHSUCDX (the special drivers DOS needs to access a CDFS volume) it maps the "rest of the CD" as R:\

On the other hand, when opening the .iso with 7-zip you may find in the [BOOT] folder a file, possibly named no_emulation.img, exactly 2048 bytes in size.
If this is the case, it is a no-emulation CD (type #2 in the list above) and all the DOS files are in the CDFS filesystem (what you see as R:\).

BIOS boots->loads the no-emulation.img->"something" is loaded to access a "virtual disk" of some kind containing DOS (examples are memdisk, grub4dos, diskemu)->DOS boots->reads the AUTOEXEC:BAT and CONFIG.SYS in the "virtual disk"->if provisions are made in them to load MSCDEX or SHSUCDX (the special drivers DOS needs to access a CDFS volume) it maps the "rest of the CD" as R:\


I hope the above clears a bit more the matter.

:confused1:

jaclaz

#14 coyote

coyote
  • Members
  • 5 posts
  •  
    United States

Posted 05 November 2009 - 03:41 AM

@jaclaz
first, a million thanks for the excellent explanation of an advanced subject!

Put aside for the moment magiciso or whatever iso editing tool and try open the .iso image with 7-zip.

aaaah! yes, I see...

a folder [BOOT]

containing

something like Bootable_1.44M.img

how do I modify the contents of that folder [boot], specifically the .img inside [boot]?

the only thing I can seem to do is to "see" [boot] and the .img inside it when I open the .iso image with 7-zip.

7-zip won't let me extract the contents of the .iso which [boot] lives inside of, or the .img inside [boot]. and the other tools I've tried (MagicISO, WinImage) won't even let me "see" [boot] inside of the .iso.

so near but yet so far...I want to modify the .img inside of [boot] now that I can see it!

#15 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 05 November 2009 - 09:05 AM

Basically you don't modify it.

7-zip will only allow you to extract (copy to) the .img anywhere on your hard disk.

Then you need a tool for managing the actual .img,

Typically you can use Winimage (Shareware) or IMDISK or VFD (Freeware).

The first one has an "archive like" interface in which you can add or delete files, the second ones create a Virtual floppy disk that gets a drive letter assigned and behaves exactly like a real floppy would do.

Then, once you modify the .img as you wish, you need to recreate the .iso.

The recommended way is to create a new .iso from the .img and the other files you have.

Normally used tools are mkisofs.exe or in this case of a "normal" El-Torito Floppy Emulation .iso, I would suggest IMGBURN.

On the other hand, if you have one of those .iso editing tools, all of them should be able to inject the new.img overwriting in the "old" .iso the "old" .img.

I am not familiar with MagicIso, but it seems to me rather straightforward to use to extract or re-add a .img floppy image:
http://www.magiciso....howto/howto.htm


jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users