Menu

#212 Invalid Opcode (VirtualBox)

freedos12
closed
nobody
None
5
2019-12-19
2018-05-05
mcandre
No

Hi, I am trying to install FreeDOS in a virtual machine using VirtualBox, but a few seconds after I press Enter to begin the installation process, I get an infinite scrolling list of "Invalid Opcode" errors.

I'm using FreeDOS 1.2, in VirtualBox 5.2.10, in macOS 10.13 High Sierra.

1 Attachments

Discussion

  • Anthony Williams

    There's some weird BIOS bug (quirk?) in some computers that requires a different approach for booting CDs (.iso). I don't remember the details, but you should use the other .iso instead, and see if that helps.

    Thus, if you're using "legacy" under VirtualBox, download the normal boot CD image instead. (Notice "excluding" below.)

    More immediate help is available on the freedos-user mailing list.

    http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/
    FD12README.md

    • Bootable CD-ROM
    • Most virtual machines (including VirtualBox)
    • Most 486 or better computers
    • Alternate Legacy CD-ROM
    • Virtual Machines (excluding VirtualBox)
    • Most computers that support CD booting.
     
  • Anonymous

    Anonymous - 2018-05-12

    I have the same problem. When I opened it in VirtualBox, I get infinite invalid opcodes. I even redownloaded it, and nothing different. So I mashed F5 to skip config.sys and autoexec.bat, and I ran setup.bat. I partitioned and formatted the drive. Gave me an error about not finding the installation package. Please help.

     
  • Jim Hall

    Jim Hall - 2018-05-13

    Which CDROM image did you use? Because some older computers (on real hardware) have problems with modern boot methods, we provide two different CDROM images. They are both the same, except in which boot method they use.

    The “standard” CDROM image should work on most computers and PC emulators. Use this one:
    http://www.freedos.org/download/download/FD12CD.iso

    If that one is giving you the invalid opcode errors, you may need the “legacy” CDROM image instead. That's here:
    http://www.freedos.org/download/download/FD12LGCY.iso

     
  • Anonymous

    Anonymous - 2018-05-14

    I have the same issue. Tried both "standart" and "legacy" images.
    FreeDOS 1.2
    Virtualbox 5.2.12 r122591.
    Arch Linux, Debian Stretch.

     
  • Jim Hall

    Jim Hall - 2018-05-14

    I remembered invalid opcode errors would appear when installing on older physical hardware, not on VirtualBox. We even have a VirtualBox install guide on the wiki. You might make sure your settings match the settings in the VirtualBox install guide:
    http://wiki.freedos.org/wiki/index.php/VirtualBox

    The error probably comes from JEMM386, and can be solved using /NOINVLPG to avoid using the INVLPG opcode.

    On physical hardware, invalid opcode usually comes from AHCI in the BIOS, and the solution is usually to use legacy IDE. Check if your VirtualBox is emulating AHCI in the BIOS, and if you can change it.

    After install, you have an option to load FreeDOS without drivers, to see if JEMM386 is the problem. Instead, you could try pressing F8 when the FreeDOS installer boots. F8 will let you trace CONFIG.SYS and AUTOEXEC.BAT. Or you could press F5 to skip CONFIG/AUTOEXEC entirely. The CDROM installer should(?) still work without CONFIG.SYS, but I think you'd want to run AUTOEXEC after you get to a command prompt, so it can set the environment variables needed for the install.

     
  • Jim Hall

    Jim Hall - 2018-05-14

    An alternative solution I've seen mentioned elsewhere is adding the raw parameter to memdisk in the boot menu.

    When you boot the FreeDOS install CDROM, when you get the get the first "Welcome to FreeDOS 1.2" boot menu, press Tab when you're on "Install to harddisk" and add 'raw' (without quotes) to the kernel command line, then press Enter to boot.

    From this:
    KERNEL /boot/syslinux/memdisk

    To this:
    KERNEL /boot/syslinux/memdisk raw

     
    👍
    1
  • Anonymous

    Anonymous - 2018-05-15
    On physical hardware, invalid opcode usually comes from AHCI in the BIOS, and the solution is usually to use legacy IDE. Check if your VirtualBox is emulating AHCI in the BIOS, and if you can change it.
    

    From what I uderstand it's emulating IDE controller in settings. There is no actual BIOS menu unless machine works in EFI mode.

    When you boot the FreeDOS install CDROM, when you get the get the first "Welcome to FreeDOS 1.2" boot menu, press Tab when you're on "Install to harddisk" and add 'raw' (without quotes) to the kernel command line, then press Enter to boot.
    

    This worked, thanks.
    Also yeah, I've been following the steps in that exact guide before.

     

    Last edit: Anonymous 2018-05-15
  • Anonymous

    Anonymous - 2018-05-15

    Thanks, I figured it out. However, now anything I launch that was not included with FreeDOS. SimCity 2000, Doom, Duke Nukum, everything. It just blank screens with a terrible sound. Probably because there's some kind of DOS/4GW incompatibility.

     
  • Anthony Williams

    Yeah, don't use JEMM386. I'm still not sure why it's enabled for us by default. Safer is XMS only. But even one guy reported some incompatibility there. We do have alternative XMS drivers if this specific HIMEMX version is buggy for your use. While it's a longshot, that could also be your problem.

    HIMEM/HIMEMX
    FDXMS/FDXMS286 or XMGR

    As far as DOS4GW incompatibility, IIRC even the DOSBox developers recommended that people use DOS/32A instead for games. So "dos32a doom.exe" should work better, AFAIK.

    old DOS/32A homepage
    DOS/32A 9.1.2 download

     
  • Micah Kimbrough

    Micah Kimbrough - 2018-07-11

    Hello, I copied the iso to a cdrom. I can boot from 1.2-pre22 however it could not find the setup files. I downloaded the 1.2 iso and I get the same thing as the others while booting. It goes into an infinite loop. I would assume that the kernel would continue to boot given the prerelease booted. Any help would be appreciated.
    Thank You,
    Micah

     
  • Eric M

    Eric M - 2018-08-14

    Hello, I have the exact same issue with same invalid opcode and address. Using windows installer.

    Virtualbox 5.2.16 with IDE (not ahci) disk controller. Double checked settings with installation guide.

    Tried both standard and legacy iso.

    Tried F5, partition, format, install - error missing installation package.

    Thanks,

    Eric

     
  • Jim Hall

    Jim Hall - 2018-08-24

    There seems to be a regression in VirtualBox. This worked with FreeDOS when we tested the FreeDOS 1.2 distro (Oct to Dec 2016).

    This is the solution that seems to work for others:
    When you boot the FreeDOS install CDROM, when you get the get the first "Welcome to FreeDOS 1.2" boot menu, press Tab when you're on "Install to harddisk" and add 'raw' (without quotes) to the kernel command line, then press Enter to boot.

    From this:
    KERNEL /boot/syslinux/memdisk

    To this:
    KERNEL /boot/syslinux/memdisk raw

     
    • Alexander Stohr

      Alexander Stohr - 2018-09-21

      I am using remote access to such a machine:
      Machine: x86, 32 bit
      OS: Windows 7 Enterprise SP1 32 bit
      * virtualisation: VirtualBox 5.2.16

      config works for virtual box upfront:
      configured a medium sized VDI, much of memory and hooked in the ISO
      somewhere in below process i partioned and formatted the C: drive

      When testing with FreeDos 1.2 legacy iso:
      boot works
      console pops up
      setup runs up to first language query
      setup was gathering informations for an infnite time
      => FAIL

      When testing with FreeDos 1.2 regular iso:
      boot works
      boot menu pops up
      * starting installer leads to opcode error on console
      => FAIL

      • restarted with pressing TAB key at boot menu
      • entered extra qualfier "raw" as described in post from Jim Hall
      • started installation with all normal steps, using full install including sources
      • rebooted, selected option 2 for memory manager
        => SUCCESS
       
    • Adeo J Breaux

      Adeo J Breaux - 2019-11-19

      This worked perfect for me

       
  • Jim Hall

    Jim Hall - 2018-10-27
    • status: open --> closed
     
  • Jim Hall

    Jim Hall - 2018-10-27

    Closing because this is actually a regression in VirtualBox. We've also added a note on the FreeDOS website http://www.freedos.org/download/ to let users know that there's a problem in VirtualBox, and the workaround to fix it.

     
  • Alexander Stohr

    Alexander Stohr - 2018-10-29

    thanks for your errata note on the main page - it definitely needs that degree of awareness on the end users site.

     
  • Jordan T

    Jordan T - 2019-05-29

    Basically, you just need to also attach the FD floppy image as well as the CD-ROM. This will cause the floppy to run the installation, instead of the CD's installer. And all will go smooth as butter.

    Boot from floppy -> Format Drive -> Select Full installation and keyboard and stuff, and install. It will use the CD for installation files naturally.

    For me, none of the other fixes worked, and VirtualBox automatically set those settings for me to begin with.

    Honestly, this should be the install process anyways from the Wiki for VirtualBox as because of VirtualBox settings, it's the most appropriate way you'd install on a old 486-style system to begin with, from floppy, while CD is just for the files.

     

    Last edit: Jordan T 2019-05-29
  • Foad S. Farimani

    As explained on the download page this is known bug in VirtualBox. to resolve it:

    1. while on installation options press Tab
    2. add raw at the end of the line (there should be at least one space)
    3. go forward and format C drive and when rebooted follow the same procedure again
    4. the second round will be successful!
     
  • Shidel

    Shidel - 2019-12-19

    Or, just use the newer FreeDOS 1.3-RC1 (or newer). They automatically implement the work around for this regression bug.

     

Log in to post a comment.