* [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions
@ 2004-03-16 14:42 Jean-Michel POURE
2004-03-16 15:10 ` Markus Niemistö
2004-03-16 15:16 ` Jean-Michel POURE
0 siblings, 2 replies; 7+ messages in thread
From: Jean-Michel POURE @ 2004-03-16 14:42 UTC (permalink / raw)
To: Qemu-devel
Dear all,
Fist of all, thanks for this great work on Qemu.
For years now, I have been hanging around the Bochs project trying to run
various OSes. On the long run, I hope that both projects can collaborate.
I made some screenshots of qemu CVS version booting Morphix with VBE drivers
in 1024x768 resolution. Installation to disc was not tested yet.
The screenshots can be found here:
http://developer.pgadmin.org/jean-michel/screenshots/qemu_morphix1.png
http://developer.pgadmin.org/jean-michel/screenshots/qemu_morphix2.png
Now, some questions:
1) Network
I could not find any information how to install a tun0 virtual interface. Any
link? Would it be possible to add a small Debian howto on the web page?
2) Win2K and WinXP pro
After booting images of the installation CDs:
qemu cvs version:
+ Win2K displays a blue screen
+ WinXP freezes with nearly 100% activity.
qemu from Debian SID:
+ both systems rash after disc formatting.
3) Bug report
Is there a way to send you a bug report using gdb? Can you add information on
the web page for other users?
Cheers,
Jean-Michel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions
2004-03-16 14:42 [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions Jean-Michel POURE
@ 2004-03-16 15:10 ` Markus Niemistö
2004-03-16 15:16 ` Jean-Michel POURE
1 sibling, 0 replies; 7+ messages in thread
From: Markus Niemistö @ 2004-03-16 15:10 UTC (permalink / raw)
To: jm, qemu-devel
On Tue, 16 Mar 2004 15:42:26 +0100
Jean-Michel POURE <jm@poure.com> wrote:
> 1) Network
> I could not find any information how to install a tun0 virtual
> interface. Any link? Would it be possible to add a small Debian howto
> on the web page?
For information about setting tun support up see bochs user manual
http://bochs.sourceforge.net/cgi-bin/topper.pl?name=New+Bochs+Documentation&url=
http://bochs.sourceforge.net/doc/docbook/user/book1.html (beware line
warp). The linux-test package and its documentation from QEMU homepage
(http://fabrice.bellard.free.fr/qemu/) may also be useful (that was what
I used).
- Markus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions
2004-03-16 14:42 [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions Jean-Michel POURE
2004-03-16 15:10 ` Markus Niemistö
@ 2004-03-16 15:16 ` Jean-Michel POURE
2004-03-16 16:38 ` Markus Niemistö
1 sibling, 1 reply; 7+ messages in thread
From: Jean-Michel POURE @ 2004-03-16 15:16 UTC (permalink / raw)
To: qemu-devel
Le Tuesday 16 March 2004 15:42, Jean-Michel POURE a écrit :
> 1) Network
I found an answer in the Bochs manual:
#!/bin/bash
/sbin/ifconfig $1 192.168.0.101
Is that right?
Cheers, Jean-Michel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions
2004-03-16 15:16 ` Jean-Michel POURE
@ 2004-03-16 16:38 ` Markus Niemistö
2004-03-17 10:27 ` Luca Ferroni
0 siblings, 1 reply; 7+ messages in thread
From: Markus Niemistö @ 2004-03-16 16:38 UTC (permalink / raw)
To: jm, qemu-devel
On Tue, 16 Mar 2004 16:16:09 +0100
Jean-Michel POURE <jm@poure.com> wrote:
> I found an answer in the Bochs manual:
>
> #!/bin/bash
> /sbin/ifconfig $1 192.168.0.101
>
> Is that right?
Looks right, altough 192.168.x.x addresses don't seem to work for me.
If you are intrested, here is a step-by-step instructions to run xterm
from linux-test distribution (take a network connection from quest to
host):
1) Download and extract linux-test package from QEMU homepage
2) Configure your kernel to support tun and tap (see bochs manual)
3) Create a network script; put the following lines to the
/etc/qemu-ifup file:
#!/bin/sh
/sbin/ifconfig $1 172.20.0.1
and make the file executable: chmod 755 /etc/qemu-ifup
4) Start X server with TCP listening turned on: startx -listen_tcp
5) Allow X connections from 172.20.0.2 (the quest). Run:
xhost +172.20.0.2
6) Run QEMU with linux-test distribution:
qemu -hda /tmp/linux-test/linux.img
7) Setup DISPLAY variable in quest. Type in linux-test prompt:
export DISPLAY=172.20.0.1:0
8) Run xterm from the quest:
/usr/X11R6/bin/xterm
You can also ping 172.20.0.1 or run xlogo or whatever
And voilá! You have an xterm running in QEMU but it is displayed on your
host's X server. Network works! I have to run QEMU as root, so if this
doesn't work, try running QEMU as root.
So what really happens is that you see the QEMU quest as 172.20.0.2 and
it sees your computer as 172.20.0.1.
The following is untested but AFAIK it should work. In order to access
the Internet from the QEMU quest, set the gateway and nameserver of the
host to the gateway and nameserver you normally use on your computer.
You may have to do some additional route configuration, but I am not
sure (and cannot help you with that becouse I don't know that much
about Linux).
I hope this made everything clear.
Happy hacking,
Markus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions
2004-03-16 16:38 ` Markus Niemistö
@ 2004-03-17 10:27 ` Luca Ferroni
2004-03-17 13:48 ` [Qemu-devel] " Sami Haahtinen
0 siblings, 1 reply; 7+ messages in thread
From: Luca Ferroni @ 2004-03-17 10:27 UTC (permalink / raw)
To: qemu-devel
Il Tue, 16 Mar 2004 18:38:41 +0200, Markus Niemistö <markus.niemisto@iki.fi> ha scritto:
> 1) Download and extract linux-test package from QEMU homepage
>
> 2) Configure your kernel to support tun and tap (see bochs manual)
>
When I insert module tun in my kernel 2.6.4, I have to rebuild the link in devfs to make qemu working
this is the original link /dev/net/tun -> misc/net/tun
this is the modified link /dev/net/tun -> /dev/misc/net/tun
> 3) Create a network script; put the following lines to the
> /etc/qemu-ifup file:
>
> #!/bin/sh
> /sbin/ifconfig $1 172.20.0.1
>
> and make the file executable: chmod 755 /etc/qemu-ifup
>
The problem of root execution is the script /etc/qemu-ifup which calls ifconfig
It is not enough to set permissions 755 to this script
You can use sudo,
#!/bin/sh
sudo /sbin/ifconfig $1 172.20.0.1
and put your user in /etc/sudoers file
user ALL=(ALL) NOPASSWD: ALL
Obviously you need sudo package installed in your system
> 4) Start X server with TCP listening turned on: startx -listen_tcp
>
> 5) Allow X connections from 172.20.0.2 (the quest). Run:
>
> xhost +172.20.0.2
>
> 6) Run QEMU with linux-test distribution:
>
> qemu -hda /tmp/linux-test/linux.img
>
> 7) Setup DISPLAY variable in quest. Type in linux-test prompt:
>
> export DISPLAY=172.20.0.1:0
>
> 8) Run xterm from the quest:
>
> /usr/X11R6/bin/xterm
>
> You can also ping 172.20.0.1 or run xlogo or whatever
>
> And voilá! You have an xterm running in QEMU but it is displayed on your
> host's X server. Network works! I have to run QEMU as root, so if this
> doesn't work, try running QEMU as root.
>
> So what really happens is that you see the QEMU quest as 172.20.0.2 and
> it sees your computer as 172.20.0.1.
>
> The following is untested but AFAIK it should work. In order to access
> the Internet from the QEMU quest, set the gateway and nameserver of the
> host to the gateway and nameserver you normally use on your computer.
> You may have to do some additional route configuration, but I am not
> sure (and cannot help you with that becouse I don't know that much
> about Linux).
>
In your host OS you have to build iptables with NAT support in your kernel.
then you have to install iptables package and do the following:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
And so, you can surf the web and make net update to your guest ... great!
I hope this help
bye
--
----------------------------------------
Non ci toglieranno mai....la LIBERTA'!!!
Luca Ferroni
www.cs.unibo.it/~fferroni/
----------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: Morphix booting in 1024x768 resolution and Win32 questions
2004-03-17 10:27 ` Luca Ferroni
@ 2004-03-17 13:48 ` Sami Haahtinen
2004-03-17 14:20 ` Luca Ferroni
0 siblings, 1 reply; 7+ messages in thread
From: Sami Haahtinen @ 2004-03-17 13:48 UTC (permalink / raw)
To: qemu-devel
Luca Ferroni wrote:
> The problem of root execution is the script /etc/qemu-ifup which calls ifconfig
> It is not enough to set permissions 755 to this script
> You can use sudo,
>
> #!/bin/sh
> sudo /sbin/ifconfig $1 172.20.0.1
>
> and put your user in /etc/sudoers file
>
> user ALL=(ALL) NOPASSWD: ALL
EEEEK!
Kids, never ever ever try this at home! You have just granted access to
any account without any password to anyone who can access your account
(read, someone who gets you to run a simple script or exploits the
newest über exploit for the leet mailclient[tm] you were running)
Something that would be a bit more sane would read:
user ALL = NOPASSWD: /sbin/ifconfig
and for someone even more paranoid:
user ALL = NOPASSWD: /sbin/ifconfig tun*
please, do yourself a favour and use one of the above instead of
granting access to all around the system. the password isn't really that
much of a pain to write, and it provides security.
Regards, Sami
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: Morphix booting in 1024x768 resolution and Win32 questions
2004-03-17 13:48 ` [Qemu-devel] " Sami Haahtinen
@ 2004-03-17 14:20 ` Luca Ferroni
0 siblings, 0 replies; 7+ messages in thread
From: Luca Ferroni @ 2004-03-17 14:20 UTC (permalink / raw)
To: qemu-devel
Il Wed, 17 Mar 2004 15:48:40 +0200, Sami Haahtinen <ressu@ressukka.net> ha scritto:
> Luca Ferroni wrote:
> > The problem of root execution is the script /etc/qemu-ifup which calls ifconfig
> > It is not enough to set permissions 755 to this script
> > You can use sudo,
> >
> > #!/bin/sh
> > sudo /sbin/ifconfig $1 172.20.0.1
> >
> > and put your user in /etc/sudoers file
> >
> > user ALL=(ALL) NOPASSWD: ALL
>
> EEEEK!
>
> Kids, never ever ever try this at home! You have just granted access to
> any account without any password to anyone who can access your account
> (read, someone who gets you to run a simple script or exploits the
> newest über exploit for the leet mailclient[tm] you were running)
>
> Something that would be a bit more sane would read:
> user ALL = NOPASSWD: /sbin/ifconfig
>
> and for someone even more paranoid:
> user ALL = NOPASSWD: /sbin/ifconfig tun*
>
> please, do yourself a favour and use one of the above instead of
> granting access to all around the system. the password isn't really that
> much of a pain to write, and it provides security.
sorry I used that configuration for test because tun0 didn't work properly.
thank you for the suggestion,
I have never used sudo before and so I left that configuration after the test succeded
bye
--
----------------------------------------
Non ci toglieranno mai....la LIBERTA'!!!
Luca Ferroni
www.cs.unibo.it/~fferroni/
----------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-17 14:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-16 14:42 [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions Jean-Michel POURE
2004-03-16 15:10 ` Markus Niemistö
2004-03-16 15:16 ` Jean-Michel POURE
2004-03-16 16:38 ` Markus Niemistö
2004-03-17 10:27 ` Luca Ferroni
2004-03-17 13:48 ` [Qemu-devel] " Sami Haahtinen
2004-03-17 14:20 ` Luca Ferroni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).