I was trying to expand dosubcd.img to ~10Mb so that I can put more files in. I tried to "Change format...->select custom image format" in WinImage and expended dosubcd.img to ~10Mb. I re-zipped dosubcd.img to dosubcd.igz in /images. But now FreeDos is no longer bootable. Any help would be greatly appreciated!!!

If you find that a 1.44MB or 2.88MB disk image is not enough you can grow the image and still be able to boot off this image. Images as large as 10MB have been successfully deployed. The procedure to grow you image is as follows:

* Start with a working bootable 1.44MB or 2.88MB image * Use the mkfloppyimg.sh or newmkfloppyimg.sh script from http://people.cs.uchicago.edu/~gmurali/ ... loads.html to grow the image size. * When booting it with MEMDISK or mounting it using mtools, dont forget to specify the non-standard geometry (which is given my the scripts). * Now that you have more space you are free to add more stuff to the image.

- The output should be: dosubcdhd.img.tar.bz2: OK.- Extract dosubcdhd.img out of dosubcdhd.img.tar.bz2. It is a hard disk image of 25MiB.

Code:

bzip2 -dc dosubcdhd.img.tar.bz2 | tar xvf -

- Make a directory inside ~/dosubcdhd, also called dosubcdhd (~/dosubcdhd/dosubcdhd/):

Code:

mkdir dosubcdhd

- Make you root (on ubuntu sudo su, on slax maybe su only (I never used slax so see for yourself how to gain temporary root acces)- Mount the hard disk image into your filesytem with the following commands

- Now you can copy files to the image file by copying files into ~/dosubcdhd/dosubcdhd/.- If you have copied all the files that you want to copy to the image, write zeros to the empty space of the hard disk image, so you can compress the image better.

Icecube, thank you so much for spending this significant amount of time to solve my headache. And you are a real good doctor^_^

I have downloaded dosubcdhd.bz2. After I run bunzip2 dosubcdhd.bz2, what I got is a file called "dosubcdhd" instead of "dosubcdhd.img". I tried to rename it to .img file, but Slax doesn't allow me to mount this .img to a folder. So I got stuck here, not knowing how to "Extract dosubcdhd.img out of dosubcdhd.bz2. It is a hard disk image of 25MiB."

The "dosubcdhd" file I got is 25MiB, so i think i got the right file, but just don't know how to deal with it.

Download it again and follow every instruction.
If you have done the bzip2 -dc dosubcdhd.img.tar.bz2 | tar xvf - step, you should get an image file dosubcdhd.img.

Code:

md5sum dosubcdhd.img

The output of the previous command should be: a37b854149b4649e763661419c647abf dosubcdhd.imgIf not, there is something wrong with the download.

Use this file as a hard disk image for booting in a virtual machine (e.g. in qemu, virtualbox, vmware). It should boot (It worked for me). If this works, stop the virtual machine and go further with the instructions.

Test the file again in a virtual machine when you have added your files and you have unmounted the image.

If you gzip the image file, rename the gzipped file to dosubcd.igz when you copy it to /images of the ubcd folder.

I tried Imdisk in Windows XP, but when I mounted dosubcdhd.img, its file system could not be recognized.

I tried WinImage and added files to dosubcdhd.img, its not bootable from UBCD.

I tried to mount the image in SLAX following your instruction, SLAX said ./dosubcdhd is busy. When I opened the ./dosubcdhd, nothing was there.
Neither was 'mount -o loop' working, too.

I am not familiar with the DOS emulator too>_< If there's any chance, could you please tell me what emulator you are using and how do you emulate your image file and see if it's bootable? Thank you very very much for your time~~~~

Image file offset (for non-raw disk image file formats):32256 (in bytes)(this offset is needed to tell Imdisk to skip the mbr and the first sector of the harddrive image, after this 32256 bytes the partition with freedos "begins. In linux the "losetup -o 32256 /dev/loop0 dosubcdhd.img" command skips this bytes also.In this case (and in general also), the first partition starts at sector 63. Knowing the sector size (standard is 512 bytes), we can easily calculate the offset in bytes to the first partition: 512 * 63 = 32256.)

Device type: Harddisk volume

I added two files (12 MiB total size) and tested the image. It worked for me.

hoohooslax wrote:

I tried WinImage and added files to dosubcdhd.img, its not bootable from UBCD.

I have never used it, but normally it should work with this program also. It is able to modify harddisk images. I haven't test it, it is shareware so you can use it only 30 days for free which sucks. Use Imdisk instead. I have tested it and it works definitely.

Quote:

* Supports the creation of large images of removable and hard disks under Windows NT and Windows 95. Large images (> 2.88 MB) are not loaded into memory, read and write operations are done directly on image files.

hoohooslax wrote:

I tried to mount the image in SLAX following your instruction, SLAX said ./dosubcdhd is busy. When I opened the ./dosubcdhd, nothing was there.Neither was 'mount -o loop' working, too.

Try it again. I have just copied al the instructions, that I have written down in the first post, to the terminal on a different PC. And everything worked. Are you sure that you didn't cd to ./dosubcdhd two times before mounting the image? It can be, however that slax doesn't support every command.Try the next:

Code:

ls /dev/loop*

The output should be something like this (the number of /dev/loop[number] can differ). If you don't get any output, slax doesn't have a loop device and my tutorial is useless for you. /dev/loop0 /dev/loop2 /dev/loop4 /dev/loop6/dev/loop1 /dev/loop3 /dev/loop5 /dev/loop7

hoohooslax wrote:

I am not familiar with the DOS emulator too>_< If there's any chance, could you please tell me what emulator you are using and how do you emulate your image file and see if it's bootable? Thank you very very much for your time~~~~

I don't use a DOS emulator. I use QEMU, which is virtual machine (available for linux, windows, Mac OS X, OpenSolaris). Normally it is only a command line tool ,but for linux at least in ubuntu you can use "Qemu Launcher" or "Qemulator" as GUI for QEMU. "Qemu Manager" is a GUI for QEMU if you use windows.
Download QEMU:
See: http://bellard.org/qemu/download.htmlQemu Manager (GUI for Qemu for windows):
See: http://www.davereyn.co.uk/download.htmAdd the harddrive image as hard disk to QEMU.

I hope that this explanation helps and that you can get the image working. I checked the whole tutorial and it worked perfect for me. After adding files to the image, the image is still bootable in my case so normally it should work. I added 2 files to it thought Imdisk and 1 via linux and it was always bootable. I tested the tutorial on 2 different pc's. If you have problems, don't hesitate to ask.

@as702
Hoohooslax tried to do it with winimage and didn't succeed.
[quote=hoohooslax]I tried WinImage and added files to dosubcdhd.img, its not bootable from UBCD. [/quote]
So probably winimage isn't that simple at first glance.

"ImDisk Virtual Disk Driver" is probably the easiest way to add files to an existing image in windows because the image just appears in explorer as extra drive letter.

QEMU can be run without admin privileges (useful for on an usb stick), but it is slow. If you have admin privileges you can install KQEMU (linux) or QEMU Accelerator (windows), which makes it possible to run user mode code directly on the host computer's CPU, and using processor and peripheral emulation only for kernel mode and real mode code, which speed up the the process significantly..

Quote:

KQEMU

Fabrice BelQEMU Acceleratorlard also wrote a Linux kernel module (with preliminary ports to FreeBSD and MS Windows) named KQEMU or QEMU Accelerator, which notably speeds up x86 emulation on x86 platforms. This is accomplished by running user mode code directly on the host computer's CPU, and using processor and peripheral emulation only for kernel mode and real mode code. KQEMU also supports a kernel emulation mode in which portions of kernel mode code run on the host's CPU.

Unlike KVM, KQEMU can execute code from many guest OSes even if the host CPU does not support hardware virtualization. KQEMU supports both x86 and x86_64 CPUs. As a future development[3] for KQEMU there are plans to support the hardware(CPU) based virtualization extensions introduced by Intel VT and AMD-V families of processors. The increased speed is not expected to be significant so perhaps more important is the plan to include support of SMP for "guest" OS.

yes, but he hadn't tried my explicit method (i had a similar problem).

whatever works, best of luck to him(?).

Qemu sounds interesting. i'll admit, i did try it out shortly after the post (thanks for the link btw). i agree, it is rather slow and a bit more cumbersome to get up and running than the aforementioned alternatives (at least on windows platform).

vmware is probably the fastest i've come across thus far (albeit it's a bit of a mess). for bog standard unix/linux/dos/winpe bootdiscs, i tend find vpc2007 is quite robust.

@as702
VirtualBox is also a very good emulator. It runs on Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD. It is comparable in speed with VMware and you don't have to register to get a key. I use VirtualBox to run Windows on Ubuntu and it is fast enough for me.
http://www.virtualbox.org/

I use qemu-launcher most of the time to test a simple iso like ubcd or a small live linux distro because it is very easy to select the amount of ram to use and the iso you want to boot without to edit a complete virtual machine like you have to do with vmware, virtualbox and Qemu (Qemu Manager).

Thanks a lot as702! Your method works! But when I tried to expand the 11M image, it didn't boot again! Do I need to change the c, h, s value accordingly? If you have a clue, please let me know.

Also, I tried to download the 50MB image from the link you provided. I use WINRAR to unzip it to fd500000.ima. However, I couldn't make change to this file in WinImage Unregistered version. Could you please tell me how do you make it editable? Many Thanks!!!

Thanks a lot as702! Your method works! But when I tried to expand the 11M image, it didn't boot again! Do I need to change the c, h, s value accordingly? If you have a clue, please let me know.

no worries, pal. when you say "expand" do you mean you're trying to change the image size in winimage? if so, then i'm not sure since whenever i've tried this method the image always fails to boot (winimage can prove buggy). what i usually do is resort to downloading the image size i need from the link i provided.

c,h and s values typically go as follows:

for 005760

Quote:

c=240 h=4 s=36

for 115200

Quote:

c=240 h=8 s=36

for 050000 it would be:

Quote:

c=2 h=255 s=63

i've tested the 50mb image with these settings and can confirm it DOES work. give it a shot.

Quote:

Also, I tried to download the 50MB image from the link you provided. I use WINRAR to unzip it to fd500000.ima. However, I couldn't make change to this file in WinImage Unregistered version. Could you please tell me how do you make it editable? Many Thanks!!!

hmmm...you could try registering your version of winimage. other than that i'm not too familiar with what else is out there.

Thanks man! You nailed it! I wonder where do you get the number of the cylinders? I tried to go to Change Format->select custom image format, but it only shows heads and sectors, no info about cylinders?

Icecube:

Thanks for all the tips and tools you provided. They all help me a lot. I enjoy using imgdisk a lot! Many thanks!

as702:Thanks man! You nailed it! I wonder where do you get the number of the cylinders? I tried to go to Change Format->select custom image format, but it only shows heads and sectors, no info about cylinders?

Code:

capacity = cylinders * number of heads per cylinder * number of sectors per head * 512

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum