Discussion:
[9fans] Virtualbox and real mode
(too old to reply)
Rikard Lang
2013-02-24 10:48:47 UTC
Permalink
My first post to 9fans; Hi!

I am currently running 9Front on real hardware (mini-itx board with an Atom CPU), I also run 9Front using Virtualbox. I have had issues getting regular Plan 9 to install using Virtualbox. I know it wasn't a problem in the past. Anyway, as I was walking through some sites related to this I found this post:

"I had a look at Plan 9 and I can only say that their idea of real mode is miles away from Intel's. Plan 9 crashes because it calls BIOS with an environment that only vaguely resembles real mode in that CR0.PE is 0, but segment limits and attributes are totally all over the place. For example they leave the 'B' bit for the stack segment set, which causes rather interesting behavior of instructions that manipulate the stack. That then triggers an extremely obscure bug in VirtualBox which probably affects no other OS on the planet.

The Plan 9 folks should probably re-read chapter 9.9.2 (Switching Back to Real-Address Mode) of the Intel 64/IA-32 SDM (Volume 3) and implement their mode switching code the way Intel says they should. This is their code in sys/src/9/pcboot/realmode0.s."

The post is located at: https://forums.virtualbox.org/viewtopic.php?f=4&t=52431

It was one of very few posts that contained any technical information whatsoever. Most posts I come across just say that the installation hangs. I do not know if the above is of any help or even useful in any way, but I thought I'd post it here, since it might help.
--
Rikard Lang
James Chapman
2013-02-24 11:48:49 UTC
Permalink
Virtualbox 4.1.24 works well for me.
Post by Rikard Lang
My first post to 9fans; Hi!
"I had a look at Plan 9 and I can only say that their idea of real mode is miles away from Intel's. Plan 9 crashes because it calls BIOS with an environment that only vaguely resembles real mode in that CR0.PE is 0, but segment limits and attributes are totally all over the place. For example they leave the 'B' bit for the stack segment set, which causes rather interesting behavior of instructions that manipulate the stack. That then triggers an extremely obscure bug in VirtualBox which probably affects no other OS on the planet.
The Plan 9 folks should probably re-read chapter 9.9.2 (Switching Back to Real-Address Mode) of the Intel 64/IA-32 SDM (Volume 3) and implement their mode switching code the way Intel says they should. This is their code in sys/src/9/pcboot/realmode0.s."
The post is located at: https://forums.virtualbox.org/viewtopic.php?f=4&t=52431
It was one of very few posts that contained any technical information whatsoever. Most posts I come across just say that the installation hangs. I do not know if the above is of any help or even useful in any way, but I thought I'd post it here, since it might help.
--
Rikard Lang
Rikard Lang
2013-02-24 12:20:12 UTC
Permalink
Post by James Chapman
Virtualbox 4.1.24 works well for me.
I have Virtualbox 4.2.6 What settings if any did you use for the virtual machine?

I am not saying that my original post has any merit at all, I just wanted to point it out in case it does mean anything.
Aram Hăvărneanu
2013-02-25 09:13:53 UTC
Permalink
Virtualbox doesn't care about Plan 9 so why do you care about it? Plan
9 works really well in QEMU or KVM/QEMU.
--
Aram Hăvărneanu
James Chapman
2013-02-25 13:33:52 UTC
Permalink
Post by Rikard Lang
Post by James Chapman
Virtualbox 4.1.24 works well for me.
I have Virtualbox 4.2.6 What settings if any did you use for the virtual machine?
I downgraded to 4.1.24 as 4.2.6 (or possibly some other 4.2.x) didn't work for me.

I think the only thing that I had to change was:

To choose network adapter: Intel PRO/1000 MT Server, it works with bridged/nat I think.

James
Rikard Lang
2013-02-25 18:19:15 UTC
Permalink
Post by James Chapman
I downgraded to 4.1.24 as 4.2.6 (or possibly some other 4.2.x) didn't work for me.
To choose network adapter: Intel PRO/1000 MT Server, it works with bridged/nat I think.
James
Downgrading to 4.1.24 did the trick for me. Now running Plan9 just fine. Thanks James.

Thanks to Aram too. I have been using Plan9 on QEMU just fine, never understood why it wouldn't work on Virtualbox though.
--
Rikard
Aram Hăvărneanu
2013-02-25 18:46:20 UTC
Permalink
Btw, it also works in VMware.
--
Aram Hăvărneanu
Continue reading on narkive:
Loading...