WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] how to start X in the guest domain

> > The, compile a domU kernel with framebuffer support in (it's selectable
> > in the kernel menuconfig).
>
> Ok too!
>
> make dist
> cd linux-2.6.33-xen0
> make menuconfig
> select framebuffer options.
>
> cd ../linux-2.6.33-xenU
> make menuconfig
> select framebuffer options
>
> cd ..
> make dist-kernels

Good.

> > ... If you want to be able to run virtual terminals on the
> > framebuffer, you'd also need to select the generic Linux options for the
> > framebuffer console.  I'd recommend you do this.
> > Configure the domain to run a getty on /dev/ttyS0, add the following line
> > to /etc/inittab, just after the lines starting the other gettys on your
> > system:
> > S0:2345:respawn:/sbin/mingetty ttyS0
> >
> > add ttyS0 to /etc/securetty or /etc/securettys (whichever you have). 
> > This is to enable root login on ttyS0.
>
> Why??? Virtual terminals? Sorry but i didn't get it! But anyway i
> configure the way you said.

If you are using the Linux framebuffer console support, the framebuffer acts 
pretty much exactly like the system's "monitor".  You'll see the boot up 
messages scrolling by on it, and it'll be running the usual complement of 6 
virtual terminals which you can switch between using Alt+F(1-6),  it's very 
neat, I recommend trying it!

Anyhow, the framebuffer console tty driver won't be able to run tty1 if the 
Xen console driver has already grabbed it, hence redirecting it to ttyS0.  
The other advantage is that with the ttyS0 console set up, you can see the 
boot output, log in, etc, even if you can't get to the framebuffer console.

Framebuffer ttys *are* optional, however.

> Since i'm trying to run a Ubuntu domU, i did
>
> cd /etc/event.d
> cp tty1 ttyS0
> change lines accordingly to start a mingetty on ttyS0, so the file looks
> like
>
> start on runlevel-2
> start on runlevel-3
> start on runlevel-4
> start on runlevel-5
> stop on shutdown
> respawn /sbin/mingetty ttyS0

Oooh, is this Ubuntu upstart you're using?  I've not seen its config files 
before...  anyhow I'll take your word for it that this is what they should 
look like :-)

> The /etc/securetty file already contains a line for ttyS0

Jolly good.

> And here's is my domU1 config file
>
> kernel= '/boot/vmlinuz-2.6-xenU'
> ramdisk= '/boot/initrd-2.6-xenU.img'
> xencons= 'tty0'
> console= 'tty0'
> video= 'xenfb'
> name= 'domU1'
> memory= 256
> root= '/dev/sda1 ro'
> disk= ['phy:/dev/vm/vm1.raiz,sda1,w','phy:/dev/vm/vm1.swap,sda2,w']
> vif= ['bridge=br-xen']
> sdl= 0
> vnc= 1
> vncdisplay = 1
> vncconsole= 1

> Interesting to note that with or without these lines, the results are
> the same, i get a domU running without graphics display. But ps ax at
> dom0:
>
> 19749 ? Sl 0:00 /usr/lib/xen/bin/xen-vncfb --listen 127.0.0.1 --domid
> 12 --title domU1

That sounds good anyhow.  Try using a vnc client to connect to localhost on 
port number 5901 .... do you get anything?  How about 5912?

> Does it mean something? Is it already working? So, ps ax at domU1
> shows nothing unusual, except no running gdm or X instance, nor even
> Xvnc. My domU1 xorg.conf file i get from:

Yes, *something* is already working, anyhow :-)

The domU won't be running vnc, as that's entirely handled by dom0.  Unless the 
domU was configured to start into runlevel 5 and has the appropriate packages 
installed, you're not going to see a gdm process either...  if it *is* 
configured that way, it's probably just broken by whatever's breaking the X 
server.

> http://wiki.xensource.com/xenwiki/VirtualFramebuffer
>
> It's almost the same file.
>
> If I cat domU1 /var/log/Xorg.0.log file i get at the end
>
> Fatal server error:
> xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
>
> Should it be /dev/ttyS0 and how can I get X use /dev/ttyS0 instead of
> /dev/tty0?

No, that's fine.

> > Again, these instructions might include mistakes, or omissions, so please
> > please exercise caution!  Feel free to ask on anything you're not sure
> > about.
>
> Yeah, I'm trying a lot! :(

You're doing well!  I seem to remember getting stuck round about where you are 
now.  Unfortunately I can't quite remember what the problem was :-(

But ... you say you're xorg.conf looks like that shown on the wiki...  Does 
the mouse device you specified exist?  On my (CentOS) guest, I use:

Section "InputDevice"
        Identifier  "Xen Mouse"
        Driver      "mouse"
        Option      "Protocol" "PS/2"
        Option      "Device" "/dev/input/mice"
        Option      "CorePointer"
EndSection

Note that on my system it's /dev/input/mice, not /dev/input/mouse0 as in the 
example.  I remember this caused me some bother.

> Yes, it helped a lot! I was completely blinded before. But if you can
> point where to go from here i would thank you a lot more! :D

Good luck, let us know how you get on!

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users