Install 16bit windows software (.exe) on linux

I recently bought a book about Microcontrollers. It’s the kind of costly educational book that comes with a CD inside.

Even if it’s the latest edition of the book, the CD was made for Windows 98. It’s a 32bit application so it should work properly on Windows 7 or 8. Well, no.

It happens that the installation package (executable setup file) from the CD is a 16bit installation package. Windows 7 and 8 are not supporting 16bit applications anymore.

Linux saves the day! I installed an application called “wine” which is available from Ubuntu’s repositories. You can get it from source too: http://www.winehq.org/

When installed, put the CD in your laptop, and double click on your 16bit executable file.

Results may vary depending on what you are installing, but I was lucky enough that everything worked without any issues, and now I can run this windows application directly on linux.

This is the application that was on the CD: http://midnightdesignsolutions.com/hc908/win_ide.html

The book: http://www.amazon.ca/Microcontroller-Theory-Applications-HC12-Edition/dp/0136152058

My Dual Boot Setup (Windows 8 Pro & Ubuntu 14.04 LTS)

My laptop is dualbooting Windows 8 Pro and Ubuntu 14.04 LTS using grub. The two OS are also sharing common directories for pictures and music. Here’s my setup. I am not responsible for the risks you will take with partition management. Also read every steps before making changes, and make sure that you will have enough disk space for everything. Also note that you cannot directly share Windows libraries with Linux /home libraries. In this example, I create a common partition to share a single music directory, so that Windows Media Player and Rythmbox use the same music library.

  • Install Windows 8 first and do the following steps before installing Linux. I won’t explain how to partition everything, but I used about half of my 256GB hard drive for Windows C:. Installing Windows before Linux will save you some headaches.
  • Turn off Windows 8’s “Fast Startup”. Disabeling this hidden option makes Windows use a regular cold boot, like previous version of Windows. Windows 8 uses a new hybrid boot process that makes booting faster, but it will give you a headache trying to use Grub for dual-booting. Note that disabeling “Fast Startup” will actually slow down the boot process a little bit. I don’t really care since I use a SSD.
    • Go to Control Panel
    • Open Power Options
    • Click on “Choose what the power butons do” on the left
    • Click on “Change settings that are currently unavailable”
    • Scroll down and uncheck “Turn on fast startup (recommended)”
  • Now you can install Ubuntu 14.04 LTS or any other Linux distro painlessly with grub as the boot loader. Windows should be detected and added to grub automatically.
    • I created a boot, swap, root and ntfs extended partitions while installing linux. Make sure not to touch the ntfs partitions created by Windows. See the following partition scheme as an example:
      • sda1 & sda2: Windows (128GB total)
      • sda3: Extended partition (remaining space 114GB)
        • sda5: ext2 /boot (256MB)
        • sda6: swap (2GB)
        • sda7: btrfs / (40GB)
        • sda8: ntfs /windows (Remaining space, around 85GB)
    • Nope, you cannot set /home in a ntfs partition, I leave it inside root. You are free to do things differently!
    • Make sure you have enough space in the new /windows ntfs directory for everything you want to share between Windows and Ubuntu.
  • When Linux is installed, make sure dual-booting is working as expected. Then, boot in Windows, and move the directories you want to share with Linux in the newly created ntfs partition (probably in D:). In the new ntfs partition, I created a music and a picture directory. Then:
    • Right click on Windows Music folder from the file manager
    • Click on Properties
    • Click on “Location” tab
    • Choose the new Music directory in the new ntfs partition (Probably on D:)
    • Agree to move all the files to the new directory. Make sure you have enough space!
    • Repeat the process for the other folders you want to share.

You are now sharing a common partition between Windows and Ubuntu. I find it useful that Windows Media Player and Rythmbox share the same directory for their music libraires. It prevent useless duplication and saves some space. You can do the same thing with your pictures and documents too. It’s a way to stay organised and save space on a dual-booting system. Note that you can’t directly share your linux /home directory with Windows’s directories. For example, you cannot set Windows “Music” library to be the same as Linux’s “/home/music” library. I would be happy to learn that I’m wrong though.

I noticed that /windows directory in linux won’t mount upon startup if windows is hibernated. This is a good thing, because if you add files to the directory from linux, and resume windows, the files will be lost.