Mail Archives: djgpp/2009/01/14/21:03:43
Hi,
On Jan 14, 1:21 am, "Rod Pemberton" <do_not_h DOT DOT DOT AT nohavenot DOT cmm> wrote:
> "Rugxulo" <rugx DOT DOT DOT AT gmail DOT com> wrote in message
>
> news:fed9d4c7-d6a7-4780-bc31-7bdd66aed79b AT r40g2000yqj DOT googlegroups DOT com...
>
> > Well, as mentioned, QEMU + QEMU-IMG + FreeDOS + BasicLinux + FAT12
> > floppy .IMG to save to (which you can extract files from for DOS)
> > might work with the pre-compiled i386-moss-gcc. Okay, so that's a
> > long, roundabout method, but it works.
>
> Well, I was thinking of a few things along those lines. In addition to
> "mounting" .iso and FAT images, QEMU should be able to "mount" a DOS
> directory with the "fat:<DOS path>" option to hda/hdb, i.e., the
> mysteriously not well documented if at all vvfat option (see QCOW on
> Wikipedia...). I also thought about using .iso images such as FreeDOS and
> Linux. The problem is that under Linux it's easy to add to and extract from
> images, just use "mount" with the appropraite options and standard copy
> utilities. But, with Windows there is no default way to add to or extract
> from images. The ability to *both* add to or extract from is usually only a
> feature of compression programs for the specific compression format.
> However, the ability to extract from many image types is widely available
> with many programs such as WinZip/PkZip, 7-Zip, IsoBuster, DJGPP
> cpio/rpm/tar/gzip, etc. So, while it's easy to extract from such images,
> it's not so easy to insert files. E.g., how do you add to a FAT12.img or
> Linux.iso?
Adding to a FAT12 image can be done in various ways, e.g. using G.
Vollant's Extract or Alexei Frounze's IMGCPY (found in his FAT lib).
But I typically prefer using a FAT12 .img and mounting it via Linux on
QEMU, then just copying as needed (with fat:/blah if necessary). Maybe
TIMAGE10.ZIP helps too in DOS, I forget.
Dunno about adding to .ISO, even IZarc (Win32) only extracts, not sure
about 7-Zip, almost definitely the same. I guess the only real way is
to create another .ISO from MKISOFS or whatever (which Alexei also has
pre-compiled for DOS in his FAT lib):
http://www.winimage.com/extract.htm
http://alexfru.narod.ru/os/fat/fat.html
http://www.frontiernet.net/~fys/zips/fat-2006-12-03.zip (mirror)
ftp://garbo.uwasa.fi/pc/diskutil/timage10.zip
> If QEMU-IMG allows one to add to images, instead of just
> creating blank images, I missed that. It seems QEMU is where the "mounting"
> options are and it only supports a handful of filesystem types (no ext2).
> Maybe I need to research the Linux "cloop" option to see what it does. Or,
> perhaps, the "raw" option is sufficient... So, anyway, I don't currently
> know of any utilities or QEMU options that will do so. As I understand it,
> the MOSS files have to be decompressed and inserted into a directory in
> BasicLinux's FS.IMG, which is probably ext2 gzipped. I can handle the gzip.
> I'm not sure what to do with the ext2 under Windows and without Linux
> available...
I've never tried QEMU-IMG very much, only a handful of times, and only
then for HD images for guest OSes (e.g. ZipSlack, which lacks libc5,
BTW).
There is supposedly an ext2 driver for Windows, but I'm not sure where
or which versions it supports (as I never used it). :-/
Just try this: create a small (50 MB) HD image via QEMU-IMG,
"format" and "sys c:" it via FreeDOS to make it FAT, use the -hdb fat:/
mydir/blah QEMU option to let you read from your host OS (e.g. put the
BasicLinux .ZIP there as well as the MOSS Linux cross-compiler), then
just use normal DOS tool (e.g. DJTAR) to unpack the BasicLinux .ZIP
from D:\ to that HD image. Then you should be able to boot BasicLinux
on top of FreeDOS and then mount D:\ drive (/dev/hdb1 or whatever) in
Linux and "cd / ; tar xvzf /tmp/moss-0.90-bin-linux.tar.gz ; export
PATH=/usr/local/i386-moss/bin:$PATH" and then type "gcc -v" and see
what happens. (Should work. At least it did for me.)
> So, while the compression method is standard, the filesystem
> isn't for Windows. I.e., I could uncompress it, but not add files to it.
> Now, if I had a floppy disk drive in this machine, I could use a FAT12 image
> with QEMU and then copy to and from a floppy or ramdisk using that image to
> add to and extract from it, perhaps using say partcopy.exe to move the image
> back and forth. This assumes that BasicLinux supports FAT12 and can mount
> it.
It can. FAT12 is pretty ubiquitous.
P.S. Since you're interested in OSes, have you ever tried OctaOS? (Not
trying to wear you out or start yet another tangent, heh, just that it
does some cool stuff):
http://octavio.vega.fernandez.googlepages.com/octaos
- Raw text -