Minix 3 on QEMU - Minix

This is a discussion on Minix 3 on QEMU - Minix ; Hello, I have a basic installation of Minix 3 on a Qemu virtual box. Right after the install, when the computer booted I ran packman. Options include: 1. Install all 46 packages from the CD. 4. Let me select individual ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: Minix 3 on QEMU

  1. Minix 3 on QEMU

    Hello,

    I have a basic installation of Minix 3 on a Qemu virtual box. Right
    after the install, when the computer booted I ran packman. Options
    include:

    1. Install all 46 packages from the CD.
    4. Let me select individual packages to install from the CD or
    network.

    If I choose (4) I get "No package list found ... fetching package
    list" but it just hangs there forever. If I pick (1) it starts
    installing but the computer (qemu) freezes when it tries to install
    gnu-coreutils.

    I've tried this several times. The result is always the same. I can't
    get past the initial base system. Does anyone have any ideas?

    Thanks.
    Daniel.

  2. Re: Minix 3 on QEMU

    > I have a basic installation of Minix 3 on a Qemu virtual box. Right
    > after the install, when the computer booted I ran packman. Options
    > include:
    >
    > 1. Install all 46 packages from the CD.
    > 4. Let me select individual packages to install from the CD or
    > network.
    >
    > If I choose (4) I get "No package list found ... fetching package
    > list" but it just hangs there forever. If I pick (1) it starts
    > installing but the computer (qemu) freezes when it tries to install
    > gnu-coreutils.
    >
    > I've tried this several times. The result is always the same. I can't
    > get past the initial base system. Does anyone have any ideas?


    I suppose your network is not working? You need to qemu_pci, as
    specified in this article:
    http://www.minixtips.com/2006/06/run...nder-qemu.html

    --
    With kind regards,
    Erik van der Kouwe

  3. Re: Minix 3 on QEMU

    On Aug 26, 8:13*am, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > I suppose your network is not working? You need to qemu_pci, as
    > specified in this article:http://www.minixtips.com/2006/06/run...nder-qemu.html



    Hmm... this is not good. No, the network is not working. I didn't
    realize that it was necessary. I figured that without a network Minix
    would just limit itself to packages inside the CD. I tried to ping and
    Minix just hangs. If Minix hangs whenever it can't reach a host, that
    would explain why it keeps freezing.

    I have tried following the instructions on that page (thanks) but was
    not able to get networking going. Judging from the installer, I think
    Minix expects qemu_pci=1 to mean that the card is Realtek 8029 but
    that's not the card that my qemu provides. The choices I have are
    NE2000 and Realtek 8139, both of which are in theory supported by
    Minix 3, but they don't have a note about Qemu.

    :-( I guess that my experiments with Minix 3 have hit an early
    roadblock. I'm ok not having a network on Qemu. I was thinking that
    I'd try Minix on Qemu for a while. If it turned out alright I would
    then buy some components I need to fix a spare computer and I'd try
    Minix on a real desktop.

  4. Re: Minix 3 on QEMU

    Daniel Carrera wrote:
    > On Aug 26, 8:13?am, "Erik van der Kouwe" few.vu.nl>
    > wrote:
    >> I suppose your network is not working? You need to qemu_pci, as
    >> specified in this article:http://www.minixtips.com/2006/06/run...nder-qemu.html



    > Hmm... this is not good. No, the network is not working. I didn't
    > realize that it was necessary. I figured that without a network Minix
    > would just limit itself to packages inside the CD. I tried to ping and
    > Minix just hangs. If Minix hangs whenever it can't reach a host, that
    > would explain why it keeps freezing.


    Hang is bad... I know there were some issues with Minix and Qemu's NIC
    emulation (at least in some unstable Minix releases), but those issues
    should result in errors, not hangs. Just to rule something out, are you
    sure you launched qemu with the proper --nic parameters?

    > I have tried following the instructions on that page (thanks) but was
    > not able to get networking going. Judging from the installer, I think
    > Minix expects qemu_pci=1 to mean that the card is Realtek 8029 but
    > that's not the card that my qemu provides. The choices I have are
    > NE2000 and Realtek 8139, both of which are in theory supported by
    > Minix 3, but they don't have a note about Qemu.


    No, the qemu_pci=1 option fixes something wonky between Minix and Qemu's
    PCI emulation. During Minix install you get a choice which network card to
    use, one of them should mention that it is supported by Qemu.

    > :-( I guess that my experiments with Minix 3 have hit an early
    > roadblock. I'm ok not having a network on Qemu. I was thinking that
    > I'd try Minix on Qemu for a while. If it turned out alright I would
    > then buy some components I need to fix a spare computer and I'd try
    > Minix on a real desktop.


    If we can figure out what causes the freeze, you're probably good to go.
    In my experience, no network should result in packman saying "can't find
    the server, I'll just use your CD now", not in hangs.

    Regards,

    Jens

    --
    Jens de Smit
    Student Computer Science | Vrije Universiteit Amsterdam
    jfdsmit@few.vu.nl | http://www.few.vu.nl/~jfdsmit
    "[In the end, people] get furious at IT that the goddamn magic isn't working"
    -- Stewart Dean

  5. Re: Minix 3 on QEMU

    On Aug 26, 1:15*pm, "J.F. de Smit" wrote:
    > Hang is bad... I know there were some issues with Minix and Qemu's NIC
    > emulation (at least in some unstable Minix releases), but those issues
    > should result in errors, not hangs. Just to rule something out, are you
    > sure you launched qemu with the proper --nic parameters?


    I should probably mention that I'm running Mac OS X and the OS X port
    of Qemu is a bit different (it's GUI). So I may not always know
    exactly what it's doing, or how to get it to do the right thing. And I
    haven't managed to compile the sources on Mac (ggrrr).

    The only 'nic' settings I can see are "-net user -net nic". There is a
    place that says "Qemu arguments" and I keep putting those there but
    the stupid machine doesn't seem to remember them. I'll keep trying.

    > No, the qemu_pci=1 option fixes something wonky between Minix and Qemu's
    > PCI emulation. During Minix install you get a choice which network card to
    > use, one of them should mention that it is supported by Qemu.


    Minix offers the following choices (summary):

    3. Realtek 8139
    4. Realtek 8029 (also from Qemu).
    5. NE2000 (also from Bochs).

    But my Qemu doesn't offer rtl8029, it offers rtl8139 and NE2000. So
    there is a mis-match here.


    If I select [4], install, shutdown, qemu_pci=1, boot, I get the boot
    messages:

    dp8390#0: Realtek RTL8029 (10EC/8029) at 0.3.0
    pci_slot_name: got name 0.3.0
    dp8390#1: Realtek RTL8029 (10EC/8029) at 0.3.0
    pci_slot_name: got name 0.3.0
    dp8390#2: Realtek RTL8029 (10EC/8029) at 0.3.0
    pci_slot_name: got name 0.3.0
    dp8390#0: NE2000 at C100:11
    ...
    dp8390: strange, got SYN_ALARM
    Alarm call
    Unable to obtain an IP address.


  6. Re: Minix 3 on QEMU

    Daniel Carrera wrote:
    > I should probably mention that I'm running Mac OS X and the OS X port
    > of Qemu is a bit different (it's GUI). So I may not always know
    > exactly what it's doing, or how to get it to do the right thing. And I
    > haven't managed to compile the sources on Mac (ggrrr).


    Ooooh, Mac.... No experience with tath whatsoever.

    > The only 'nic' settings I can see are "-net user -net nic". There is a
    > place that says "Qemu arguments" and I keep putting those there but
    > the stupid machine doesn't seem to remember them. I'll keep trying.


    Okay, apart from the "forgetting" part, that looks good.

    > If I select [4], install, shutdown, qemu_pci=1, boot, I get the boot
    > messages:


    > dp8390#0: Realtek RTL8029 (10EC/8029) at 0.3.0
    > pci_slot_name: got name 0.3.0
    > dp8390#1: Realtek RTL8029 (10EC/8029) at 0.3.0
    > pci_slot_name: got name 0.3.0
    > dp8390#2: Realtek RTL8029 (10EC/8029) at 0.3.0
    > pci_slot_name: got name 0.3.0
    > dp8390#0: NE2000 at C100:11
    > ...
    > dp8390: strange, got SYN_ALARM
    > Alarm call
    > Unable to obtain an IP address.


    Okay, this suggests that Minix indeed finds and activates a network card,
    but that it can't get an IP due to nobody answering the DHCP request (last
    2 lines). Do you have a DHCP server in your network?

    Regards,

    Jens

    --
    Jens de Smit
    Student Computer Science | Vrije Universiteit Amsterdam
    jfdsmit@few.vu.nl | http://www.few.vu.nl/~jfdsmit
    "[In the end, people] get furious at IT that the goddamn magic isn't working"
    -- Stewart Dean

  7. Re: Minix 3 on QEMU

    > > dp8390#0: Realtek RTL8029 (10EC/8029) at 0.3.0
    > > pci_slot_name: got name 0.3.0
    > > dp8390#1: Realtek RTL8029 (10EC/8029) at 0.3.0
    > > pci_slot_name: got name 0.3.0
    > > dp8390#2: Realtek RTL8029 (10EC/8029) at 0.3.0
    > > pci_slot_name: got name 0.3.0
    > > dp8390#0: NE2000 at C100:11
    > > ...
    > > dp8390: strange, got SYN_ALARM
    > > Alarm call
    > > Unable to obtain an IP address.

    >
    > Okay, this suggests that Minix indeed finds and activates a network
    > card, but that it can't get an IP due to nobody answering the DHCP
    > request (last 2 lines). Do you have a DHCP server in your network?


    That does not matter if -net -user is used. QEMU emulates a LAN behind
    a NAT and serves as a DHCP server itself. For external communications
    it uses the IP address of the host computer.

    If you cannot get an IP address with -net -user, ISTM it must mean that
    Minix and QEMU do not understand each other, so it is probably the
    difference in network cards emulated you mentioned earlier which causes
    the wrong driver to be used.

    --
    With kind regards,
    Erik van der Kouwe

  8. Re: Minix 3 on QEMU

    I have made some progress, of sorts. I made another Qemu disk image
    and this time I told the Minix installer that I don't have a network
    that. With that change I was able to install the contents of the CD. I
    configured zsh the way I like it and I have gcc, though I was
    surprised by the /usr/gnu directory.

    Pico doesn't work: When I try to save it says "Cannot open file for
    writing: Bad file number". I can make do with vim.

    I can't run X. If I run xdm nothing happens. Like this:

    prompt # xdm
    prompt #

    No error messages, no nothing. I tried startx:

    # startx
    xinit: No such file or directory (errno 2): no server "X" in PATH

    Use the -- option, or make sure that /usr/X11R6/bin is in your path
    and that "X" is a program or a link to the right type of server for
    your display. Possible server names include:

    Xorg X.Org displays

    xinit: Server error.
    #


    But xinit is lying, "X" is in my PATH:

    # type X
    X is /usr/X11R6/bin/X


    Anyways, back to the discussion about the network card:


    On Aug 26, 4:46*pm, "J.F. de Smit" wrote:
    > Okay, this suggests that Minix indeed finds and activates a network card,
    > but that it can't get an IP due to nobody answering the DHCP request (last
    > 2 lines). Do you have a DHCP server in your network?


    We do, but an external DCHP server is not visible iside the Qemu
    client. It looks like Qemu emulates a DHCP server:

    http://bellard.org/qemu/qemu-doc.html#SEC30

    Now, here is something strange: The network appears to work now.

    I can't figure out what I'm doing differet, but it works. I have an IP
    in the range that the link says. I cannot ping, but the link says I
    shouldn't be able to ping. And I can even run packman! I run packman
    and I see all the "net" packages like Apache.

    I don't like it when things fix themselves by magic, but I'm glad that
    it works now. I'm now installing the CD packages.

    Thanks for the help.

  9. Re: Minix 3 on QEMU

    > I can't run X. If I run xdm nothing happens. Like this:
    >
    > prompt # xdm
    > prompt #
    >
    > No error messages, no nothing. I tried startx:
    >
    > # startx
    > xinit: No such file or directory (errno 2): no server "X" in PATH


    Logs are hidden from the user and are stored in various file in
    /var/log (I have XLogFile.0.log and xdm.log here). Check these files.
    It is very likely that the error is caused by too little or too much
    memory being allocated for one of the binaries, most likely
    /usr/X11R6/bin/X. You can use the chmem command to correct this.

    > We do, but an external DCHP server is not visible iside the Qemu
    > client. It looks like Qemu emulates a DHCP server:


    Correct, the external DHCP server is not used. The VM is behind a NAT.

    --
    With kind regards,
    Erik van der Kouwe

  10. Re: Minix 3 on QEMU

    Update: I finished installing packages on the Minix 3 install that has
    a working network connection. The issues with pico and X are unchanged
    (as expected).

    So let's talk about X11...


    On Aug 26, 7:39*pm, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > > I can't run X. If I run xdm nothing happens. Like this: ...

    >
    > Logs are hidden from the user and are stored in various file in
    > /var/log ...


    Thanks. /var/log/xdm.log says:

    xdm error (pid ...): server /usr/X11R6/bin/X cannot be executed
    xdm error (pid ...): server open failed for :0, giving up
    xdm error (pid ...): server for display :0 terminated unexpectedly: 1
    xdm error (pid ...): Display :0 cannot be opened
    xdm error (pid ...): server /usr/X11R6/bin/X cannot be executed
    xdm error (pid ...): server for display :0 terminated unexpectedly: 1
    xdm error (pid ...): server /usr/X11R6/bin/X cannot be executed
    xdm error (pid ...): server for display :0 terminated unexpectedly: 1
    xdm error (pid ...): server /usr/X11R6/bin/X cannot be executed
    xdm error (pid ...): server for display :0 terminated unexpectedly: 1
    xdm error (pid ...): Dispay :0 is being disabled


    > It is very likely that the error is caused by too little or too much
    > memory being allocated for one of the binaries, most likely
    > /usr/X11R6/bin/X. You can use the chmem command to correct this.


    Ah, you are right. It actually had too much memory. X was trying to
    grab 510 MB of RAM but I only gave 128 MB to the virtual machine.

    I'm not really used to this chmem deal. This is a Minix-only program,
    isn't it? Why does Minix need this? Is it because Minix doesn't
    support virtual memory?

    Anyways, now I can run Xdm and X. Now I need to figure out how kill X
    so I can install a window manager When I login to X it just logs me
    back out. I guess that it's because I haven't setup a window manager.

    Daniel.

  11. Re: Minix 3 on QEMU

    > I'm not really used to this chmem deal. This is a Minix-only program,
    > isn't it? Why does Minix need this? Is it because Minix doesn't
    > support virtual memory?


    Yes and yes, unfortunately. Due to lack of VM, Minix needs to know how
    large a program will be in advance.

    > Anyways, now I can run Xdm and X. Now I need to figure out how kill X
    > so I can install a window manager When I login to X it just logs me
    > back out. I guess that it's because I haven't setup a window manager.


    twm should run by default, so if it does not this is another error.
    Probably not enough memory is left for twm to run, so you may need
    another chmem. You can also consider increasing the size of your VM if
    you can, that would make things easier.

    I think xinit is more convenient than xdm on Minix; it does not require
    you to log on again and it shuts down cleanly (unlike, at least on my
    laptop, xdm, which completely messes up the display). Just create a
    ..xinitrc file like below and type "xinit" if you want to try this:

    #!/bin/sh
    xterm -geometry 80x30+0+0&
    exec twm

    --
    With kind regards,
    Erik van der Kouwe

  12. Re: Minix 3 on QEMU

    On Aug 26, 9:51*pm, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > twm should run by default, so if it does not this is another error.
    > Probably not enough memory is left for twm to run, so you may need
    > another chmem. You can also consider increasing the size of your VM if
    > you can, that would make things easier.
    >
    > I think xinit is more convenient than xdm on Minix; it does not require
    > you to log on again and it shuts down cleanly (unlike, at least on my
    > laptop, xdm, which completely messes up the display). Just create a
    > .xinitrc file like below and type "xinit" if you want to try this:
    >
    > #!/bin/sh
    > xterm -geometry 80x30+0+0&
    > exec twm



    Thanks. I increased the VM to 256 MB, I did a chmem for both X and
    twm, and I switched to xinit. Now I have twm running in front of me.
    Ah... this is so much fun. It reminds me of when I started with Linux
    (Slackware on a 486).

    The only thing is that twm is confused as to where the screen starts
    and ends. Imagine if you were to shift the screen 30% to the right, so
    that it wraps around. So the right-most part of the app window is
    actually on the left of the screen.

    The problem seems to be twm because when I switched to edewm I didn't
    have this problem. The I switched back to twm and started X again and
    the problem returned. So it looks like it's something about twm. I'll
    think about this tomorrow. I'm making progress...

+ Reply to Thread