From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: question about pty,agetty for an intermediate virtual server image Date: Sat, 1 Apr 2017 07:27:40 +0000 Message-ID: <20170401072740.kgzz3zbtikn5hpg5@abyayala> References: <20170331125956.rhlwjg45vwo3pgwh@abyayala> <20170331234321.GA10435@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuDRu-0003fD-2R for guix-devel@gnu.org; Sat, 01 Apr 2017 03:27:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuDRq-0006ur-V4 for guix-devel@gnu.org; Sat, 01 Apr 2017 03:27:50 -0400 Received: from latitanza.investici.org ([2001:888:2000:56::19]:56118) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cuDRq-0006t4-P4 for guix-devel@gnu.org; Sat, 01 Apr 2017 03:27:46 -0400 Content-Disposition: inline In-Reply-To: <20170331234321.GA10435@jasmine> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org Leo Famulari transcribed 2.8K 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...): Yeah, that would be useful as it is not uncommon for servers. > 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`. Thanks! I'll give it a try and get back to you when I run into problems.