📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText
Next Previous Contents

3. Hard disk setup

3.1 How do I use my hard disk with dosemu?

First, mount your dos hard disk partition as a Linux subdirectory. For example, you could create a directory in Linux such as /dos (mkdir -m 755 /dos) and add a line like

   /dev/hda1       /dos     msdos   umask=022
to your /etc/fstab. (In this example, the partition is mounted read-only. You may want to mount it read/write by replacing "022" with "000" and using the -m 777 option with mkdir). Now mount /dos. The README.txt says:
  you just can have a Linux directory containing all what you
  want to have under your DOS C:. Copy your IO.SYS, MSDOS.SYS or what
  ever to that directory (e.g. /var/lib/dosemu/bootdir), put

          $_hdimage = "bootdir"


  into your /etc/dosemu.conf, and up it goes. DOSEMU makes a lredir'ed
  drive out of it and can boot from it. You can edit the config.sys and
  the autoexec.bat within this directory before you start dosemu.  Fur-
  ther more, you may have a more sohisticated setup. Given you want to
  run the same DOS drive as you normal have when booting into native
  DOS, then you just mount you DOS partition under Linux (say to /dos)
  and put links to its subdirectories into the boot dir. This way you
  can decide which files/directories have to be visible under DOSEMU and
  which have to be different. Here's a small and incomplete example
  bootdir setup:


         config.sys
         autoexec.bat
         command.com -> /dos/command.com
         io.sys -> /dos/io.sys
         msdos.sys -> /dos/msdos.sys
         dos -> /dos/dos
         bc -> /dos/bc
         windows -> /dos/windows


  There is, however, one drawback, you can't use the DosC kernel
  (FreeDos) for it, because it hasn't yet a working redirector (will
  hopefully be available some time in the future).

3.2 How can I access the hdimage from Linux?

Use mtools. With a line in /etc/mtools.conf like


   drive n:  file="/var/lib/dosemu/hdimage" MTOOLS_SKIP_CHECK=1 \
   MTOOLS_LOWER_CASE=1 MTOOLS_NO_VFAT=1 partition=1 offset=128
you can use the mtools on the hdimage, like "mdir n:". "mcopy n:/config.emu /tmp" copies the config.emu file from the hdimage to /tmp/config.emu. You can edit it there and copy it back. Use a drive letter you find sensible. "N:" is only an example.

3.3 Can I use my stacked/double-spaced/super-stored disk?

At this time, compressed drives cannot be accessed via the redirector (lredir or emufs) on a standard kernel. There is a patch for the kernel to mount compressed files under the name "dmsdosfs". Find it on sunsite.unc.edu and its mirrors

http://sunsite.unc.edu:/pub/Linux/system/filesystems/dosfs/
A good idea is also to look in http://sunsite.unc.edu:/pub/Linux/Incoming for a newer version. The "wholedisk" option in older versions of dosemu is no longer allowed in recent versions, however, a line like
   $_hdimage = "/dev/hda1"
may work, at the risk that you could lose all data in that partition on a dosemu crash. .:: www.nongkhaempolice.com ::. .:: www.elephantjournal.com ::.

If your dos partition is already mounted with write access and you try to run dosemu with partition access, dosemu will print a warning message and abort. This prevents DOS and Linux from making independent writes to your disk and trashing the data on your dos partition(95/8/11).

---------------------

If LILO is installed, the above will not work. However...

Thomas Mockridge (thomas@aztec.co.za) reported (94/8/5) that

To boot dosemu with LILO and Stacker 4.0 I did a little work around... .:: www.thepartyservicesweb.com ::.

1. dd the MBR to a file. (or norton utility, etc., first 512 bytes) .:: osisat.edu.ng ::.

2. Boot dos (from full boot not emu), do a fdisk /mbr, make your dos partition active with (dos) fdisk. [Linux Questions]

3. Copy the new MBR to a file.

4. Replace the original MBR

5. Copy the second MBR to /var/lib/dosemu/partition.hda? (Whichever is your dos partition) [What people say about Recursion]

6. Set dosemu.conf

               disk {partition "/dev/hda? ?"}

7. Start dosemu and and voila! No LILO.

For recent versions of dosemu you need to change the

               disk {partition "/dev/hda? ?"}
line to something like
               $_hdimage = "/dev/hda1"
---------------------

Holger Schemel (q99492@pbhrzx.uni-paderborn.de) reported (94/2/10) that

Works even fine under dosemu with MS-DOS 6.0. If you have problems, then you have to edit the file 'DBLSPACE.INI' manually and change the disk letter to the letter your drive gets under dosemu.

---------------------

Darren J Moffat (moffatd@dcs.gla.ac.uk) also reported (94/3/27)

"...use 6.2 if you can get it!! Just make sure you have a LILO boot disk on hand since dos 6{.2} will change the MBR of the boot HZ."

3.4 Creating your own hdimage file.

The easy way is to use mkdexe - see README.txt for details. The old-fashioned way (I don't know why anyone would want to do it that way any more but here it is, just in case) is as follows:

There is an extra util program called mkfatimage16 which allows for creating a hdimage file headers. The full information is in the manpage (man/mkfatimage16.1) included in your distribution. .:: ml007.k12.sd.us ::.

To create a hard disk image file with a geometry corresponding to that of a real hard disk of 32 megabytes run:

mkfatimage16 -k 32768 > hdimage

This is probably too large for most needs; if you need this much space, consider using the disk redirector."

Usually it is a good idea to format the drive after it. .:: www.socialbookmarkssite.com ::.


Next Previous Contents

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this