[prev in list] [next in list] [prev in thread] [next in thread] 

List:       user-mode-linux-user
Subject:    Re: [uml-user] serial pts/tty: getting xterm out of the way
From:       David Francisco Rodriguez Perez <david.francisco.rodriguez () gmail ! com>
Date:       2009-11-06 17:36:46
Message-ID: d875c4ca0911060936n7569091by54be2569244083cd () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi lanas


Once it bootups you should see a line on the screen or via dmesg that give
you the pseudo terminal you need to open to access console. Something like
Serial line 0 assigned device '/dev/pts/37'
or you can query info to the UML via
uml_mconsole <umid> config ssl0


Then you can use any serial program to talk to that pseudo terminal like
screen/kermit, etc.

So for example do
screen /dev/pts/37.

Hope it helps

David


On Thu, Nov 5, 2009 at 6:18 PM, lanas <lanas@securenet.net> wrote:

> Le Lundi, 2 Nov 2009 09:56:30 -0800,
> David Francisco Rodriguez Perez <david.francisco.rodriguez@gmail.com> a
> écrit :
>
> Hello,
>
> > I have a console definition on the inittab file as:
> > ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
> > Then I have the node definition built upon bootup on /dev as:
> > crw--w----    1 root     root       4,  65 Nov  2 17:53 ttyS1
> > And I do not start uml with any con config. Then uml set ups the
> > console once it finishes bootup.
>
> I'm trying your approach and sure enough there's a ttyS0 serviced by
> getty in the UML, such as:
>
> root [...] 464 ttyS0 [...]  0:00 /sbin/getty ttyS0 38400
>
> From an inittab line like:
>
> 1:2345:respawn:/sbin/getty ttyS0 38400
>
> Now, how do you connect from your host to this serial port in the UML ?
>
> Thanks,
>
> lanas
>
> > On Sun, Nov 1, 2009 at 7:09 PM, lanas <lanas@securenet.net> wrote:
> >
> > > All,
> > >
> > >  This is about using a serial line between a uml and the host
> > > without having xterm popping in the way
> > >
> > >  I'm following the book so here's how I do it.  The problem is
> > > with a xterm popping up unexpectedly (at least until it is
> > > understood why) when the uml is launched with the pts.  Here's
> > > how it goes:
> > >
> > > 1) With unwanted xterm
> > >
> > > [... uml1 command line ...] con8=pts
> > >
> > > uml1 # cat < /dev/tty8
> > >
> > > A xterm window appears on the desktop and uml_mconsole returns:
> > >
> > > host # uml_mconsole uml1 config con8
> > > OK xterm
> > >
> > > 2) W/o xterm (wished use)
> > >
> > > On the other hand, if the uml is *not* started with con8=pts and
> > > the following is done after it has booted:
> > >
> > > host # uml_mconsole uml1 config con8=pts
> > >
> > > Then doing the following does not pop up a xterm window on the
> > > desktop, and the serial port can be used from the host side
> > > thereafter.
> > >
> > > uml1 # cat < /dev/tty8
> > >
> > > The mconsole on the host then returns not an xterm, but a pts, as
> > > it should:
> > >
> > > host # uml_mconsole uml1 config con8
> > > OK pts:/dev/pts/7
> > >
> > > Why does it work now ?
> > >
> > > I do not understand where the difference lies.  I'd like to be
> > > able to launch the uml with a con device ready to use, w/o having
> > > the xterm in the way.
> > >
> > > Thanks for any hints/suggestions/ideas.
>

[Attachment #5 (text/html)]

Hi lanas<br><br><br>Once it bootups you should see a line on the screen or via dmesg \
that give you the pseudo terminal you need to open to access console. Something \
like<br>Serial line 0 assigned device &#39;/dev/pts/37&#39;<br> or you can query info \
to the UML via<br>uml_mconsole &lt;umid&gt; config ssl0<br><br><br>Then you can use \
any serial program to talk to that pseudo terminal like screen/kermit, etc.<br><br>So \
for example do<br>screen /dev/pts/37.<br> <br>Hope it \
helps<br><br>David<br><br><br><div class="gmail_quote">On Thu, Nov 5, 2009 at 6:18 \
PM, lanas <span dir="ltr">&lt;<a \
href="mailto:lanas@securenet.net">lanas@securenet.net</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Le Lundi, 2 Nov 2009 09:56:30 \
-0800,<br> David Francisco Rodriguez Perez &lt;<a \
href="mailto:david.francisco.rodriguez@gmail.com">david.francisco.rodriguez@gmail.com</a>&gt; \
a<br> écrit :<br>
<br>
Hello,<br>
<div class="im"><br>
&gt; I have a console definition on the inittab file as:<br>
&gt; ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100<br>
&gt; Then I have the node definition built upon bootup on /dev as:<br>
&gt; crw--w----    1 root     root       4,  65 Nov  2 17:53 ttyS1<br>
&gt; And I do not start uml with any con config. Then uml set ups the<br>
&gt; console once it finishes bootup.<br>
<br>
</div>I&#39;m trying your approach and sure enough there&#39;s a ttyS0 serviced \
by<br> getty in the UML, such as:<br>
<br>
root [...] 464 ttyS0 [...]  0:00 /sbin/getty ttyS0 38400<br>
<br>
> From an inittab line like:<br>
<br>
1:2345:respawn:/sbin/getty ttyS0 38400<br>
<br>
Now, how do you connect from your host to this serial port in the UML ?<br>
<br>
Thanks,<br>
<font color="#888888"><br>
lanas<br>
</font><div><div></div><div class="h5"><br>
&gt; On Sun, Nov 1, 2009 at 7:09 PM, lanas &lt;<a \
href="mailto:lanas@securenet.net">lanas@securenet.net</a>&gt; wrote:<br> &gt;<br>
&gt; &gt; All,<br>
&gt; &gt;<br>
&gt; &gt;  This is about using a serial line between a uml and the host<br>
&gt; &gt; without having xterm popping in the way<br>
&gt; &gt;<br>
&gt; &gt;  I&#39;m following the book so here&#39;s how I do it.  The problem is<br>
&gt; &gt; with a xterm popping up unexpectedly (at least until it is<br>
&gt; &gt; understood why) when the uml is launched with the pts.  Here&#39;s<br>
&gt; &gt; how it goes:<br>
&gt; &gt;<br>
&gt; &gt; 1) With unwanted xterm<br>
&gt; &gt;<br>
&gt; &gt; [... uml1 command line ...] con8=pts<br>
&gt; &gt;<br>
&gt; &gt; uml1 # cat &lt; /dev/tty8<br>
&gt; &gt;<br>
&gt; &gt; A xterm window appears on the desktop and uml_mconsole returns:<br>
&gt; &gt;<br>
&gt; &gt; host # uml_mconsole uml1 config con8<br>
&gt; &gt; OK xterm<br>
&gt; &gt;<br>
&gt; &gt; 2) W/o xterm (wished use)<br>
&gt; &gt;<br>
&gt; &gt; On the other hand, if the uml is *not* started with con8=pts and<br>
&gt; &gt; the following is done after it has booted:<br>
&gt; &gt;<br>
&gt; &gt; host # uml_mconsole uml1 config con8=pts<br>
&gt; &gt;<br>
&gt; &gt; Then doing the following does not pop up a xterm window on the<br>
&gt; &gt; desktop, and the serial port can be used from the host side<br>
&gt; &gt; thereafter.<br>
&gt; &gt;<br>
&gt; &gt; uml1 # cat &lt; /dev/tty8<br>
&gt; &gt;<br>
&gt; &gt; The mconsole on the host then returns not an xterm, but a pts, as<br>
&gt; &gt; it should:<br>
&gt; &gt;<br>
&gt; &gt; host # uml_mconsole uml1 config con8<br>
&gt; &gt; OK pts:/dev/pts/7<br>
&gt; &gt;<br>
&gt; &gt; Why does it work now ?<br>
&gt; &gt;<br>
&gt; &gt; I do not understand where the difference lies.  I&#39;d like to be<br>
&gt; &gt; able to launch the uml with a con device ready to use, w/o having<br>
&gt; &gt; the xterm in the way.<br>
&gt; &gt;<br>
&gt; &gt; Thanks for any hints/suggestions/ideas.<br>
</div></div></blockquote></div><br>



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic