unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: guix-devel@gnu.org
Subject: Re: question about pty,agetty for an intermediate virtual server image
Date: Fri, 31 Mar 2017 19:43:21 -0400	[thread overview]
Message-ID: <20170331234321.GA10435@jasmine> (raw)
In-Reply-To: <20170331125956.rhlwjg45vwo3pgwh@abyayala>

[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]

On Fri, Mar 31, 2017 at 12:59:56PM +0000, ng0 wrote:
> before I go ahead and create an intermediate image  -  I'd like to explore
> the option of getting IN-Berlin closer into the creation of the 'deploy'
> process of Guix which is being worked on  -  I need to find out how the
> redirection to	"/sbin/agetty --keep-baud 115200 38400 9600 ttyS0 vt102"
> can be honored.
> As far as I understand, we use mingetty which according to the mingetty
> manpages is not suited for tasks agetty can do.
> 
> IN-Berlin runs a Consoleserver which redirects ssh logins to it via
> "virsh console $vserver" to the /sbin/agetty (on debian vservers) on
> your server. The KVM configuration can be seen below.
> 
> How can I achieve this (the agetty part) with GuixSD?

You can use the agetty-service, like this

(kernel-arguments
  ;; Adjust these arguments as desired.
  '("console=ttyS0,115200n8 gfxpayload=text earlyprintk=serial,tty,115200"))

(services
  (cons (agetty-service (agetty-configuration
                          (tty "ttys0")
                          (term "vt102")
                          (keep-baud? #t)
                          (baud-rate "115200,38400,9600)))
        %base-services))			    

And you will probably want a non-graphical GRUB menu as well (this
should be parameterized eventually...):

diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index b18b8be6d..d94b1a266 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -197,7 +197,7 @@ system string---e.g., \"x86_64-linux\"."
     insmod efi_uga
   fi
 
-  terminal_output gfxterm
+  terminal_output console
 "
         ""))
 
Finally, you can test it in QEMU by appending '-serial pty' to the
QEMU invocation. When it starts, QEMU will tell you which pty it's
using, and you can connect to it with something like `screen`.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-03-31 23:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 12:59 question about pty,agetty for an intermediate virtual server image ng0
2017-03-31 23:43 ` Leo Famulari [this message]
2017-04-01  7:27   ` ng0
2017-04-01 18:33     ` Leo Famulari
2017-04-01 20:29     ` Leo Famulari
2017-04-02 16:31       ` question about pty, agetty " myglc2
2017-04-02 21:06         ` Non-graphical GRUB configuration Leo Famulari
2017-04-02 22:13           ` Leo Famulari
2017-04-03  0:31             ` myglc2
2017-04-03  8:39               ` Ludovic Courtès
2017-04-03  0:16           ` myglc2
2017-04-05 11:59           ` Leo Famulari
2017-04-05 15:14             ` myglc2
2017-04-05 16:07               ` Leo Famulari
2017-04-05 20:43                 ` myglc2
2017-04-06 15:18                   ` Leo Famulari
2017-04-06 17:34                     ` myglc2
2017-04-17 13:44             ` myglc2
2017-04-17 19:51               ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170331234321.GA10435@jasmine \
    --to=leo@famulari.name \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).