PDA

View Full Version : DOS Question in Knoppix (resolved)



Cuddles
01-24-2004, 01:39 AM
First of all, Knoppix HD Installed, v3.3

I have a DOS 4GL Database Program, it has to run in a specific directory right off of the C:\

Now, the questions:

I have "copied" the tree structure off the original C: under Win98, i.e. the specific directory the program exists, and must run in, and under.

1) How do I "paste" the "extracted" directory onto Linux, so that it mimics being under its original, and expected directory, C:\isys ?

2) How do I run the program, in the isys directory, as a DOS app, under Linux/Knoppix? ( program is isys.exe )

I wouldn't care about a simple DOS application this much, but it holds all of my books, music, DVD's, and VHS movies, not to mention my complete history, and current activity, of my checkbook, savings, and investments. ( so, it is kinda important )

Thanks, even if this is a simp question, I haven't a clue how to do it, my newbieness in Linux is really new in the Wine and DOS arena.

Cuddles

tearinghairout
01-24-2004, 01:59 AM
Hi Cuddles

First of all... Happy New Year! both Western and Chinese. I have been off air for a while because I have moved to Australia.

How did you "copy" the original tree structure? Is the original directory tree on your old machine, or have you managed to get it onto your new machine?

There are a several ways of copying directory trees around. You can use the commands tar, or cpio or even just cp -r. However, if you have an existing fat partition, why don't you just mount it up somewhere and use it as is?

As for running the program, have you tried using Wine (or more probably wineconsole)? It emulates various Windows'es but I believe that it can run DOS apps in the same way that Windows can. The first time you run it, it will ask you to configure things like "which part of your directory tree should be treated as C:\" etc.

Regards
THO

kelmo
01-24-2004, 06:16 AM
Try a package called 'Dosbox'. I use it to play some classic old games like Leisure Suit Larry. The instuctions are straight forward. Just mount the DOS partition within dosbox and give it a go. (apt-get install dosbox, love debian)

Cuddles
01-24-2004, 04:27 PM
Ok, here's the scoop...

One hard drive only, all Linux - 39 gig partition of Linux ext3 file system, (yeah yeah, I know) 2.0 gig partition of Linux Swap = 41 gig hard drive. No FAT.

The original file system, from the old system was "pruned" off by placing it on a CD-RW - since the days of DOS, when this program was made, everything the program needs is in its own directory, not like the WINDOZE days of everything is everywhere. So, all I need to do is get this "pruned" C:\ISYS directory onto a drive that "looks" like c:\isys to the program and it should run.

The problem is, I don't have a DOS partition on my new system to put it, the new system is strictly a Linux OS.

I do not have the INSTALL for the original program, nor do I want to use an install, because the database program has advanced way past the "learning" point of the original. This database program is one of those AI type programs. ( in other words, it learns, and creates artificial synaptic connections through using the software, and it has advanced beyond the point it comes installed as. Get the idea why I don't want to install it, and why, if at all possible, I want to just return it back to its current state? )

Hey THO :!: How ya doing? Long time no see :D Australia :?: Must be nice :!:

Thanks for any help on this issue, I guess, before I made the "big" leap to Linux only, I should have thought of all of its consequences, hmmmmm ?
Cuddles

tearinghairout
01-24-2004, 10:48 PM
Cuddles

To start off with I think you want to do something along the lines of the following. But make appropriate substitions of values for your system.


mkdir /somepath/isys

mount /dev/cd /mnt/cd

cp -r /mnt/cd/isys /somepath/isys

This has copied your files onto your machine.

Now you need to play around with the various emulators to see which works best for you. You can try wine, dosbox, dosemu (www.dosemu.org) and there are probably others.

Making /somepath/isys "look like" C:\ISYS is the responsibility of the emulator program, and as such is probably configured differently in each case.

Wine comes with a nice gui interface that helps you set up the drive mappings, but I think that in order to run applications you also need to have installed the MS operating system files.

The dosemu documentation does say that it comes with something called FreeDOS if you no longer have your MSDOS disks.

Disclaimer: I've never actually done any of this myself, so this is all theoretical, based on reading man pages and HOWTO's.

Good luck
THO

CrashedAgain
01-25-2004, 01:54 AM
Here's another possible:
Use QTparted to create a fat or vfat partition. (QTparted will have to be run using Knoppix running from CD.) Then copy your dos stuff to the new partition, mount it (maybe calling it 'C' although I don't think this will matter) then try running the dos app with wine.
(I have used Qtparted with no loss of data but of course nothing is guaranteed)
You may be able to read the data &/or convert it to a readable format.

Cuddles
01-25-2004, 01:58 AM
THO,

I created the "emulated" C:\ structure under the Linux file system, and attempted to add the ISYS directory, and changed the access properties for allowing all the users to read/write to it...

Tried using Wine, and you are right -=- Wine lets you direct what the C: will look like, but failed in an attempt to fire off the exe program - Wine complains that a version of Windows does not exist. So that won't work...

As for a version of DOS - sheesh, I don't have a version of DOS - I always used the DOS from within Windoze. Unless I try and find an old old old version of DOS, like around version 3.x or something - but those disks came on 5 1/4" floppies, and who has one of those drives anymore :?:

I can't imagine that Knoppix/Linux hasn't come across this issue before.
Cuddles

fingers99
01-25-2004, 02:42 AM
Never used it but I'm sure there's at least one DOS emulator available for Linux.

http://www.dosemu.org/

And isn't there FreeDos?

http://www.freedos.org/

Alternatively, you may be able to export the data from your DOS database into something like MySQL........

kelmo
01-25-2004, 02:46 AM
In dosbox the DOS drive is any path mounted to a letter. i.e mount your pruned directory structure to a drive letter within dosbox and execute the program.

nmcphillips
01-25-2004, 05:20 AM
I am pretty sure I still have a copy of MSDOS 5.0 around here someplace if you need it Cuddles.

Cuddles
01-25-2004, 04:07 PM
Kelmo, tried DosBox, it didn't work -=- my program fires up, and must be doing some kind of check, at the beginning, and locks up with a display of the 8x87 fpu and memory available - and freezes. Can't imagine why - the program is back in the 1987's - so checking for a DOS version, or something else, can't be an issue. I think it may be checking for something that is "known" in a DOS install.

I think I'm going to have to bite the bullet, cut my Linux partition down a few gig, and place a small Win98 partition on the drive, just to get this DOS program to run.

Either that, or do what Fingers99 suggested, first try the two suggested DOS emulators, and then, God forbid, have to scrub the whole Nueral Net program, and export the data (somehow), and find something else.

Oh well, Thanks for all the help...
Cuddles

Razor-X
01-25-2004, 04:59 PM
Hmmmm, this is odd. Way back when, when I had my Knoppix install, I downloaded tons of windows games into a folder under my home directory, and WINE played them fine. Maybe DOSBox is finicky, but I think the problem is that DOSBox doesent support the game correctly. You can also try DOSEmu, and if yor really set on making a partition, don't install an OS on it. Give about 100 MB to a FAT partition and just run it from there, or if it truly can't work in Linux..... awww MAN.

fingers99
01-25-2004, 06:51 PM
I did a little searching and there are certainly people out there busily dumping 4GL stuff into MySQL.

A Google or joining the MySQL list would probably give you the answers.

This (going to MySQL) would be my approach. Of course, you may need to get the thing running in order to do the dump!

tearinghairout
01-26-2004, 02:08 AM
Razor-X, Perhaps you also happened to have a copy of Windows somewhere on your hard disk? Wine needs access to all the various Windows DLL's in order to run anything.

fingers99, whilst it is easy to take data from one backend database and shove it into a different one, the difficult is re-implementing the functionality of the application that sits in front of the database. ISYS is not a backend SQL database engine, it is an application program.

Cuddles, I would have a try with DOSEmu first. If you don't happen to have a copy of MSDOS, then use the copy of FreeDOS that comes with DOSEmu.

THO

Cuddles
01-26-2004, 02:55 AM
THO,

I think the problem with the program, why it is dieing, is it expects to read all of its data files, as a DOS file system :?: Which means that if it is being emulated, it won't work.

I tried, and failed - almost thought I scrambled my whole Knoppix install - to create a DOS partition using qtparted. I booted to the CD, tried running qtparted, and thought that what I wanted to do was: 1) decrease the size of my Linux Swap (2.0gig), down to 500meg, and 2) insert a DOS partition of the available free space from resizing the Swap (1.5gig)

Qtparted seemed to go through all the motions, but the displays never changed to the values I was tring to set them too. i.e. Linux Swap never changed from 1.999gig down to 500meg. And then I couldn't figure out how to "insert" a new partition. After I thought I screwed up my complete hard drive install of Knoppix, I quit qtparted, and tried to reboot into Linux, fortunately, I didn't do anything that messed around with Knoppix, and it booted fine. But all the partitions are the same as they were, no changes.

Problem is that inside qtparted, my hda reports that I have my first partition as Linux Ext3, as the primary and hda1, then hda2 as a secondard, and under -=- indented -=- I have hda5 as my Linux Swap. I tried to resize the Swap, and it didn't change, and I tried to resize the secondard (which has the swap under it), and it didn't work. I don't want to resize the EXT3 partition, if at all possible, I would want to increase it, considering that "it" is my main file system for Linux. It just won't work.

My above attempt was to gain a partition that I could make into a FAT or VFAT partitioned drive, and load a "striped down" Win98 into it. Then load my ISYS program onto the VFAT partition, and possibly run the ISYS program directly from Wine. But, I am seriously affraid of screwing up my Linux install. Not to mention, wouldn't LILO go haywire when I get another OS installed without it being setup for it???? In essence, I am installing Windoze AFTER installing Knoppix, which is kinda the "reverse" of the normal order.

I looked at DOSEmu, and got completely lost - before getting the program - I looked at its install and HOWTO - and about half way through the documentation, I didn't have a clue what I was doing, or how I was going to do it. So, I bailed out.

I think what the problem is, is, Linux is too powerful for a little small town girl like me. I can get it to run, and I can get around in it, enough to do somethings, but, when it comes down to doing stuff like this, I think I should have just stuck with (yuck, puke) Windows. As someone said in another post, Windows does everything for you, you don't have to deal with CFDisk, or QTParted, or having to work out your Linux and Swap partitions, or even if you didn't realize that, maybe, you should have kept a small partition for Windows, or the size of the Swap isn't right, etc... ( this is being said as a "true blue" noob, here )

And, when I look in these Forums, all I see is my noob questions, and my need to be "hand holded" through stuff that "I KNOW" how to do in Windows, and am completely lost doing here in Linux. I am getting better, I have setup new users, groups, configurations, done updates and upgrades, and installed numerous packages. But, stuff like this, is what drags me down. It should work, but it doesn't, and when I think I have a direction for resolving it, I can't do it. I know they have "on-the-fly" partition managers, used a few, with extreme scariedness, in WinNT. But, this is scary stuff. I have only been running for just under two months, completely, on Linux. I could easily scrub my hard drive, repartition it again, the RIGHT way, and then go back through everything all over again - but - what am I going to do after I have been running more likely in years? Reformat, and reinstall? Not a good option, and not something that should need to be done.

So,
I guess what I need is: Why did QTParted seem to go through the motions of resizing a partition, and not do anything? How do I resize the Swap down to 500meg, considering that in QTParted, my swap resides under a SECONDARY partition, do I resize the SWAP part, or the SECONDARY part? How do I "add" a DOS/WIN partition after gaining the space from the resize of the Swap? How do I get that partition setup as a Win drive, and still keep LILO from blowing away my "real" boot into Linux?

I hope my thinking is going somewhere here, my theory is: If Wine won't work with the above, I can possibly setup LILO (later) to boot to the WinOS partition, and get the program working that way. (am I getting better here?)

Thanks to all, for past, current, and future assistance. ( I don't want to give up my Linux :D )
Cuddles

fingers99
01-26-2004, 03:10 AM
I hope my thinking is going somewhere here, my theory is: If Wine won't work with the above, I can possibly setup LILO (later) to boot to the WinOS partition

I'm not sure you can get Lilo to do that, but can get Grub to.

Why not (instead of using qtparted), run cfdisk from the CD.

You can then delete the swap partition, split it up how you like, use it to format the drives and so on.

What you're trying to do is pretty difficult, so I'd not be hard on yourself.

If all else fails, consider getting hold of another (small or cheap) HD or borrow one -- everyone seems to have 2gig hard drives lying around collecting dust -- and pop a DOS onto that. If this thing ran from windows, then, IIRC, DOS 6.2 should run it fine.

Razor-X
01-26-2004, 03:23 AM
AS I can see, QTPartED can't resize swap partitions (multiple cases of the same) is somseone has done that successfully, sue me. So, just use cfdisk, what's so scary about that? I mean on my old (pathetically old) comp I did a debian install, which I did the partitioning using cfdisk, and (unfortunately) did not install X right, thats how I learned Linux, experimentation through BASH.

Cuddles
01-26-2004, 04:00 AM
Scary = Repartitioning a LIVE hard drive.

Scary is also HOT SWAPPING interface cards inside your computer - thats what I mean by scary.

( of which, both of these things should not be done )

You don't pull out computer cards, from inside your computer, while it is booted, and running. And this whole thing about re-partitioning while it contains data on it, is scary. I guess it isn't as scary as it COULD BE, I can always start from scratch again. I haven't gotten too much data/programs/configs on the new system that I couldn't just start again, but the whole thing of resizing a hard drive data partitions while stuff, and is being used, is something, I would think, is not for the faint of heart.

I think I am going to take your idea Fingers99, I actually have two 2 gig hard drives (was wondering where I was going to be able to use them), I'll just pop one of them into the new system. Boot to the Win98 CD, and install to the 2 gig hard drive....

OOOPS -=- just a thought :!: If I install Win98 with its install CD, won't that mess up the boot, or is it the MBR?, for LILO and Linux???? I don't want to boot Win98, I want to always boot Linux, but need to install Win98 though. Doesn't Win98 change the MBR, or at least, will it change what LILO and Linux need to let me continue to boot into Linux???

I think I am going with this "other" hard drive idea, it is less costly, has less chances of failure, and -=- if I can figure out, ahead of time, the changes that a new hard drive, with Win98, is going to do to my current Linux install - I think that will be this weeks project.

So, answers need to be for the following:
Install 2gig hard drive as new device - hd? - install Win98 to that device, not to boot to it, and still allow Linux/Knoppix to boot as it is currently. Then I can try to use Wine, or even DOSEmu, with this drive, from within Linux OS. If all else fails, I can boot to the second hard drive, with a limited Windows install, just to run on LOUSEY PROGRAM - shessh, what is the World coming to? When you got to jump through all these hoops and rings, just to get one durn DOS program, DOS (shessh), to run????

Awaiting ideas, and thoughts on this one...
Cuddles
Fingers99 - just a thought - If I used CFDisk to delete, and then re-add the Linux Swap partition, doesn't Knoppix do some kind of "formatting" to the Swap during the installation? The Linux Swap isn't just a partition without any form of formatting is it? During the install of Knoppix it did do something, when it asked what the Swap partition was, so, if I delete the Swap, and then re-add it, wouldn't I need to do what the install did, to the new partitioned Swap??? Just a thought

fingers99
01-26-2004, 06:34 AM
To the last point, don't worry too much about swap. A 2.4 kernel will run (so Mandrake fans inform me!) without swap. That can be sorted out later. (Anyway, once you have that old 2gig drive in there and have done whatcha gotta do with the DOS prog you can turn it into a nice /home partition so you can reload Knoppix on the old drive without wrecking it.

As to the order of the hard drives: Windows always expects to be the first HD on the first IDE channel: hda. So, that's where you should install it.

As long as you've got a boot floppy you'll be able to get into Knoppix (and as long as you have a CD, you'll be able to fix it).

Go for it, girl! I'm off to bed!

kelmo
01-26-2004, 07:58 AM
Cannot resize swap partition while in use. 'noswap' at boot prompt should help.

Cuddles
01-26-2004, 02:36 PM
Ok, Ok, you guys have given me the courage here... I'm going to attempt to resize my swap today, probably make the freed up swap space into a DOS/VFAT partition, and try using that. If at all else fails, I can always reclaim it back to Linux later. I will also look at the installation of the 2gig hard drive, if the DOS partition doesn't work...

Thanks everyone :D
Cuddles

gowator
01-26-2004, 03:43 PM
I had a couple of progs I couldn't let go and ran them through vmware.
You can get a 30 day trail license, its pretty expensive 399 I think but great SW. You can install an actual DOS (I can post the images if you like) inside the vmware session.....

rumour has it that the serial no for vmware is at alstalavista.box.sk or somewhere :D
This will allow you to kick off without rebooting to run the neural nw stuff.

Cuddles
01-26-2004, 04:17 PM
I think I did a boo-boo, or something...

Went into CFDisk, through booting from the CD, with a noswap cheatcode...

In cfdisk, I blew away the Linux Swap (2.0 gig)...
***** added a primary partition of 1.7 gig - as type Win9x Fat32 (LBA)
***** added a primary partition of 500 meg - as type Linux Swap

Rebooted back into Knoppix, on the hard drive, and took a look at my DiskFree - no swap, no FAT partition, only my hda1...

Went into MEMORY from within Info Center - no swap, and under PARTITIONS - all I show is hda1...

Decided to see what Linux did find... Shelled out to a Root, and did a dmesg - upon scrolling through my output - I now have a hda1, hda2, and a hda3 - hda1 is my original partition that Knoppix was installed into, hda2 (I think, is my FAT32), and hda3 is now my Linux Swap partition.

Knoppix (used to) thinks my Swap is supposed to be on hda5 -=- but now its hda3 - can this be "repointed" ???

Also, how do I go about getting hda2 into being a formatted DOS ????

( I already read in the man pages for cfdisk, dos 6.x versions require you to do some kind of "dd" command on the partition, to blank out the first 512 bytes, so that DOS Format can handle it, so, I guess I need to do this dd command on my hda2 partition )

SO, my current wish list is:
How do I get my Linux Swap happy again (since the hda3 is now down to 500 meg) ?
How do I get my Win9x FAT32 (LBA) active, and formatted ?

BTW - I have a Win98 Boot Disk, floppy, so I can boot to a Windows 98 DOS prompt, and get format, or fdisk, or sys, or whatever - I also will use the boot floppy to get my DOS program copied off the CD-ROM and onto this hda2 partition, once it is formatted for DOS.

I think, unless I buggered it already, I think I am getting close to completion here :D
Cuddles

windos_no_thanks
01-26-2004, 07:02 PM
How do I get my Linux Swap happy again (since the hda3 is now down to 500 meg) ?



mkswap /dev/hda3

Then edit /etc/fstab (change hda5 to hda3)



How do I get my Win9x FAT32 (LBA) active, and formatted ?

BTW - I have a Win98 Boot Disk, floppy, so I can boot to a Windows 98 DOS prompt, and get format, or fdisk, or sys, or whatever - I also will use the boot floppy to get my DOS program copied off the CD-ROM and onto this hda2 partition, once it is formatted for DOS.

I think, unless I buggered it already, I think I am getting close to completion here :D
Cuddles
This is probably where M$ will try to bite you again. Windoze is a "jealous" operating system, it wants to be on the first partition... Don't remember how to deal with that, anyone else ?

Cuddles
01-26-2004, 11:48 PM
Thanks Windos_No_Thanks - I got the Swap working (and at 500meg) Woooo-hoooooo :!:

One hurdle over...

Now the final one...

I need to get a DOS partition, formatted, with DOS - using a Win98 Boot Disk. I can boot to the floppy and run FORMAT - but I haven't a clue what drive letter it will/would be? Usually a format requires the drive letter after it. ( I do remember a few things still about Windoze/Dos )

I don't need to install windoze, I am just going to get DOS up and running, from the Windoze recovery disk - "Startup Disk" floppy.

I have forgotten so much of Windows/Dos since starting in Linux - I don't think in drive letters anymore - just hda#, hdc#, etc...

Again, I used cfdisk to create the DOS Primary partition on a Linux/Linux Swap hard drive - I need to get the DOS partition into (probably) a Win98 VFAT32 (LBA) format...

I'm gettin close here, I can feel it :D
Cuddles

Stephen
01-26-2004, 11:57 PM
It should be drive C: dos cannot see the other partitions on the drive and do not forget the /s to transfer the system files when you format (format C: /s) and you may need to use dos's fdisk to set the partition as the active one.

Cuddles
01-27-2004, 12:38 AM
Stephen, first of all, thanks for the response... Now for the questions....

I shouldn't need to add the system files, I don't want to boot it, I just want to have a "native" DOS partition to use for my "finiky" program. All I want on the partition is a DOS format, and its format structure. My thinking on my DOS program is that it is "somehow" finding something wrong with the files being "translated" or "emulated" from a Linux OS over to DOS, I am hopeing that by setting up a DOS file system for the program, it will run in DosBox, or DOSEmu, etc... In DosBox it just froze at the initialization processing of the program.

Do I need to set the partition to active? I already have my Linux partition set to active, pardon my stupidity, especially if this is a real SIMPLE question, but, what "exactly" does the active do? and worse yet, can you have more than one active on a single hard drive? ( I know, its probably a very simple/stupid question, hey, can ya tell I'm a long standing Windows USER??? (ha ha ha) :D )

Lastly, drive C: ??? Here is my drive maping, as it stands now:

Primary - Linux partition - active - boot - 39gig
Primary - Win9x FAT32 (LBA) - 1.7+/- gig
Primary - Linux Swap - 500meg

I did go into fdisk, and it shows NON-DOS on the first partition, DOS on second, and NON-DOS on the third.

Considering I used only cfdisk to do all of this, does fdisk need to get involved in this? Will doing a Format C: perform the format ONLY on the DOS (or second) partition? I'd hate to screw up my Linux after all of this work?

Thanks for all the help, :)
Cuddles

Stephen
01-27-2004, 02:19 AM
Dos can only format a dos partition so that should be alright. But now that I am looking at the layout you have, dos/windows only expects one primary and the rest extended partition on the drive you have when installing and using the drive so I do not think it is going to work well if you try to install on a drive with 3 primary partitions. Your probably better off just putting in the spare drive you have as hda move the drive in there to hdb after having installed win98 to the hda boot with Knoppix CD mount the / partition of the knoppix install (sudo mount /dev/hdb? /mnt/hdb?) and edit the lilo.conf to change the root= to be for hdb? leave the boot=/dev/hda and uncomment the example at the bottom of the file for the other OS boot from /dev/hda1 then use sudo chroot /mnt/hdb?/ /sbin/lilo -v to write the lilo to the mbr of the win98 new drive and you will be able to boot both from that lilo screen and you have to change all the /dev/hda? entries in the /etc/fstab on the knoppix drive to /dev/hdb?. Replace the ? with the appropriate partition number(s).

windos_no_thanks
01-27-2004, 04:59 AM
Hmm, if it doesn't need to be a bootable filesystem I guess you could try this first:


mkdosfs -F 32 /dev/hda2

Cuddles
02-02-2004, 05:22 PM
I got my DOS (finicky) program to run - FINALLY :!:

I tried Wine, hated that I didn't have Windos installed...
I tried DosBox, the program didn't like it...
I tried a second hard drive, with Win98 installed...
***** Wine wouldn't run a DOS program...
***** DosBox, again, the program didn't like it...

THE FINAL SOLVE (to this long standing hatered of a DOS program and Linux)
1) Win98 installed on a second hard drive ( I don't think I had to have it this way, since, I mapped a DOS drive letter through Linux's device mount point)
2) apt-get and install both DosEmu and FreeDos - set up a drive mapping for drive D: to my mount point of my Linux device mounted Win98 hard drive.

AND THE DOS PROGRAM RUNS PERFECTLY :!:

YES, YES, and triple YES -=- Cuddles is doing the "happy dance" all around the room :mrgreen:

This thread is finally resolved, and I want to thank everyone, for all the help, and my DOS program thanks you all too :D

Cuddles

tearinghairout
02-02-2004, 06:48 PM
Yaaaaaaaaay
I'm glad you finally managed to solve this one, you certainly put a lot of effort into it.
I tend to be a bit more lazy, and by now I would have just said "Ah sod it, I'll just setup a dual boot and boot Windows when I need to run that program".

Anyway, Congratulations on a job well done! :D

Cuddles
02-03-2004, 03:57 AM
Thanks TearingHairOut, you did a lot of "hand holding" for me through all of this...

And a (personal) Thank you to everyone in this thread:

:!: Windos_No_Thanks :!:
:!: Stephen :!:
:!: GoWater :!:
:!: Kelmo :!:
:!: Fingers99 :!:
:!: Razor-X :!:
:!: NmcPhillips :!:
:!: CrashedAgain :!:

and lastely, but not least,

:!: TearingHairOut :!:

This resolve is more to all of your help, and can't be a "single" accomplishment :D
Thanks,
Cuddles