From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: [PATCH 1/1] services: Add agetty service. Date: Wed, 15 Feb 2017 10:21:43 -0500 Message-ID: <86efyziins.fsf@gmail.com> References: <8b9a83141665a7a86aa3d3c9ba6363c1ba2e93cd.1487117562.git.leo@famulari.name> <20170215002417.GA19546@jasmine> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ce1Ov-0004Mg-52 for guix-devel@gnu.org; Wed, 15 Feb 2017 10:21:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ce1Or-0001bS-W3 for guix-devel@gnu.org; Wed, 15 Feb 2017 10:21:49 -0500 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:33703) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ce1Or-0001b9-Re for guix-devel@gnu.org; Wed, 15 Feb 2017 10:21:45 -0500 Received: by mail-qk0-x243.google.com with SMTP id 11so23642067qkl.0 for ; Wed, 15 Feb 2017 07:21:45 -0800 (PST) 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 On 02/14/2017 at 19:24 Leo Famulari writes: > On Tue, Feb 14, 2017 at 07:12:44PM -0500, Leo Famulari wrote: >> * gnu/services/base.scm (): New record type. >> (agetty-shepherd-service, agetty-service): New procedures. >> (agetty-service-type): New variable. > > My intention is to get a serial tty, for example /dev/ttyS0, so that I > can install GuixSD on a device that lacks any graphical display > interfaces: [... > However, it doesn't work when I boot my physical device with the same > installer image. > > When I connect to my physical device using the Keyspan USA-19H > serial-to-USB converter, I can watch the system boot, but Shepherd never > reports that the 'term-ttyS0' service has started, and I never see the > MOTD or login prompt. > > Any advice or debugging ideas? Hi Leo, I'm very happy to see you doing this. I got agetty working on IPMI serial over LAN (SOL) on a ASRock MT-C224 motherboard as follows: I made these changes in GRUB.scm ... diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index b18b8be6d..e68cec7f4 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -197,7 +197,8 @@ system string---e.g., \"x86_64-linux\"." insmod efi_uga fi - terminal_output gfxterm + serial --unit=0 --speed=115200 + terminal_input serial console; terminal_output console " "")) I found the serial port like so ... dmesg | grep tty [ 0.000000] Command line: BOOT_IMAGE=/gnu/store/ksigckplbh1669iy62pqa17j7sid9vmw-linux-libre-4.9.9/bzImage --root=/dev/md3 --system=/gnu/store/ssh2kjijcg7fvfaafmn4jj0chkmzaxzr-system --load=/gnu/store/ssh2kjijcg7fvfaafmn4jj0chkmzaxzr-system/boot console=ttyS1,115200 [ 0.000000] Kernel command line: BOOT_IMAGE=/gnu/store/ksigckplbh1669iy62pqa17j7sid9vmw-linux-libre-4.9.9/bzImage --root=/dev/md3 --system=/gnu/store/ssh2kjijcg7fvfaafmn4jj0chkmzaxzr-system --load=/gnu/store/ssh2kjijcg7fvfaafmn4jj0chkmzaxzr-system/boot console=ttyS1,115200 [ 0.000000] console [ttyS1] enabled [ 3.622999] 00:07: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A ... I installed the shadow package and I did this ... agetty ttyS1 -l /root/.guix-profile/bin/login & And I can log in, run screen and run emacs. FWIW, there is no mention in sheperd.log of the serial port. HTH, George