Showing posts with label Minix 3. Show all posts
Showing posts with label Minix 3. Show all posts

Tuesday, August 17, 2010

Minix 3 and bochs configuration progress report

I just wanted those of you who are following my Minix 3 articles to know that I'm still working on getting Minix 3 running under bochs.  Some household duties have made the project slow going, but I expect to have some time freed up by next week.  The snag is still the same.  Minix runs in text based terminal mode, but X windows silently dies on me.  After I've made a good faith effort to figure the problem out myself I intend to post notes on the bochs and X forums to see if I'm dealing with a known problem.  So if you've been reading the Minix 3 articles don't give up.  They will resume soon.

Saturday, July 3, 2010

Minix 3 and bochs (or Virtual Machines Make My Head Hurt) -- Part 1


The subtitle Virtual Machines Make My Head Hurt is a reference to the difficulty I have in determining which layer is doing what at any given time when I'm operating in a virtual machine environment.  If there is a failure somewhere I have to ask myself the questions:   is the failure on the guest operating system?  The host operating system?  Some incomplete interoperability between the two?  The hardware?  The application I'm running?

Well, failure isn't really the theme of this post, since I'm at the beginning of this particular phase of my Minix 3 installation, although thinking through how the different layers in virtual environments are working together still makes my head hurt.  So I'll slowly explain what I'm trying to do, and why.  Then I'll followup at the end of this post with exactly where I am and what I intend to do to move this aspect of the project along.

As I stated in an earlier post my long term goal is to get Minix 3 working on my Dell Inspiron 1545 laptop in every reasonable respect (including the network, the wireless, and the USB ports).  This is both a narrow and broad project.  Narrow in the sense that I'm focused on one particular system.  Broad in the sense that in order to do this I may have to learn about writing drivers for everything on the system.

How does this relate to virtual machinery?  After a couple of weeks of burning anything I needed from the outside world to a CD on my Ubuntu Linux system and moving it to the laptop, I discovered that it might be nice to ftp things I need onto a networked Minix 3 work area, evaluate and configure it in that environment, then when I deem it ready make a CD and move it onto the laptop.

This is where bochs comes in.  bochs is a free and open source x86 emulator.  With it I should be able to run Minix 3 in a virtual environment, including access to the network of the host environment, do any configuration or development needed on the virtual Minix 3, then move it to my Dell laptop for further testing.  If I'm reading the bochs documentation correctly I should also be able to do some of the necessary reverse engineering I'll need to do for my device drivers with the debug mode in bochs.

So a couple of days ago I installed bochs onto my Ubuntu Linux workstation, and attempted to use the  document Running Minix 3 on Bochs from the Minix 3 website to configure and run Minix 3 on bochs. I followed the instructions, and the attempt to run my Minix 3 boot image failed on the following error:

========================================================================
                       Bochs x86 Emulator 2.4.2
             Build from CVS snapshot on November 12, 2009
==============================
==========================================
00000000000i[     ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[     ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[     ] reading configuration from bochsrc.txt
00000000000p[     ] >>PANIC<< bochsrc.txt:9: directive 'ips' not understood
00000000000e[CTRL ] notify called, but no bxevent_callback function is registered
00000000000i[CTRL ] quit_sim called with exit code 1

I re-read the installation instructions, then went to the bochs home website on sourceforge and browsed the documentation there.  As far as I could tell at that time 'ips' was a legitimate directive in bochs, so I posted descriptions of the problem to both the Minix 3 google group, and to the bochs help forum.
Stanislav Shwartsman, one of the bochs developers, answered on the bochs help forum that the 'ips' directive was deprecated and could no longer be used, and suggested that I use the sample  bochsrc configuration file which comes with bochs as a basis to configure bochs for Minix 3 and that I then get the documentation updated.

So at this point my plan for the week is:

1) finish reading  the bochs documentation so that I can devise an appropriate bochsrc file.
2) get Minix running on bochs
3) Make  the configuration steps available so that the Minix 3 documentation can be updated (or just doing it myself if I have wiki editing privileges on the document).  
4)  If I've  understood the bochs documentation correctly I can  create a Minix 3 bochs image and make it available to other people via the bochs website.  I'd like to do that if possible.

I'll write a  followup post to describe how the plan went.

Wednesday, June 30, 2010

Minix 3 Installation Diary -- Part 3

As I stated in the previous article in this diary, I had a strange problem occur on my attempts to reboot after initially installing Minix 3 to my hard drive.  The problem was that the system would always reboot into a grub (Grand Unified Boot Loader) prompt, and I couldn't continue beyond that prompt.  Now this seemed to me at the time to be a strange problem indeed.  I had accepted all the setup defaults and done a full install, dedicating the entire disk to Minix 3.  I couldn't really find anything in the documentation about this problem, so I went to the minix3 google group to post a description of the problem.  The minix3 group is a good second line resource for troubleshooting if one can't find a solution to a problem in the documentation on the Minix 3 web site.  The best way to use this resource is to first attempt to figure out the problem by reading the online documentation, then to search the minix3 archive, and then, if the problem still isn't solved,  posting an enquiry on the group mailing list.

I couldn't find anything, so I posted a description of the problem.  Initially it was mysterious to the respondents, but it soon dawned on both me and a couple of the regulars on the list that grub was already installed in the Master Boot Record (MBR) from the previous host on that particular laptop, which happened to be Fedora Linux.

A member of the list suggested that I use installboot to overwrite the grub entry in the MBR.  It took me a few tries, but the command

installboot -m /dev/c0d4 /usr/mdec/masterboot  did the trick.

I rebooted, and this time came back up to the Minix 3 login prompt.

For more information on the Minix 3 boot process the article from the Minix 3 Wiki From power-on the the login prompt is very useful.

The manual page for installboot is also helpful.