delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/01/14/21:03:43

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: TRYING TO MAKE EXE RUN ON FRIENDS MACHINE
Date: Wed, 14 Jan 2009 17:51:19 -0800 (PST)
Organization: http://groups.google.com
Lines: 106
Message-ID: <06631d19-297f-4622-b8e8-9f2b5fc8c892@a12g2000pro.googlegroups.com>
References: <cc2668db-926c-41e1-9836-5a42a1210ed6 AT s9g2000prg DOT googlegroups DOT com>
<9941ccce-87a6-4ace-9f78-9b15710643bd AT x8g2000yqk DOT googlegroups DOT com>
<gjve0m$2rt$1 AT news DOT tornevall DOT net> <4563e62e-7382-4c6a-b986-d4c8a8ff9d47 AT i18g2000prf DOT googlegroups DOT com>
<0541cc98-689c-4e6c-ae02-d6f5a1b4a9cb AT l37g2000vba DOT googlegroups DOT com>
<gk54mb$i0$1 AT news DOT tornevall DOT net> <886d17b9-399f-48ed-ac4d-45ca11d3879f AT s20g2000yqh DOT googlegroups DOT com>
<gk5qld$euh$1 AT news DOT tornevall DOT net> <d0ac44e3-772a-44f7-9528-2d6f3f6f1a2c AT h20g2000yqn DOT googlegroups DOT com>
<gk6cuo$qor$1 AT news DOT tornevall DOT net> <eec87f79-da47-45ca-9f26-b55dc37ba7ab AT e3g2000vbe DOT googlegroups DOT com>
<gkahb5$ecb$1 AT news DOT tornevall DOT net> <59d15676-685a-4ad8-a43a-7715035abbaa AT f3g2000yqf DOT googlegroups DOT com>
<gkj2p9$r5j$1 AT news DOT tornevall DOT net> <fed9d4c7-d6a7-4780-bc31-7bdd66aed79b AT r40g2000yqj DOT googlegroups DOT com>
<gkk3fk$fqi$1 AT news DOT tornevall DOT net>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1231984279 3255 127.0.0.1 (15 Jan 2009 01:51:19 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Thu, 15 Jan 2009 01:51:19 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: a12g2000pro.googlegroups.com; posting-host=65.13.115.246;
posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5)
Gecko/2008120122 Firefox/3.0.5,gzip(gfe),gzip(gfe)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id n0F20ANF029486
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019