From mboxrd@z Thu Jan 1 00:00:00 1970 From: Assaf Gordon Subject: Re: GUIX 0.7 under QEMU/KVM with virtio Date: Sat, 04 Oct 2014 20:15:55 -0400 Message-ID: <54308DBB.9070103@gmail.com> References: <542F7ECA.1030709@gmail.com> <87bnprh8ha.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaZUd-0004uN-1L for guix-devel@gnu.org; Sat, 04 Oct 2014 20:16:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaZUT-0002lJ-VY for guix-devel@gnu.org; Sat, 04 Oct 2014 20:16:06 -0400 In-Reply-To: <87bnprh8ha.fsf@gnu.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Cc: guix-devel@gnu.org Hi, Thanks for the help. Some more details (replying out of order): On 10/04/2014 04:42 PM, Ludovic Courtès wrote: >> Is there a way to fix this? force the kernel to load virto driver? > > Currently all the drivers needed to mount the root partition must be > explicitly loaded in the initrd. So yes, you would need to have the > virtio modules loaded from the initrd (info "(guix) Initial RAM Disk"): > > (operating-system > ... > (initrd (lambda (file-systems . rest) > (apply base-initrd file-systems > #:extra-modules '("virtio.ko" "virtio_ring.ko" > "virtio_blk.ko") > rest)))) Two more things were needed: 1. adding"virtio_pci.ko" and "virtio_net.ko" to the list of drivers. 2. Labeling "/dev/vda1" as "gnu-disk-image" (when doing "mkfs.ext4 -L"). This wasn't needed to boot from "/dev/sda1", but was needed to use "/dev/vda1". Perhaps some hard-coded thing ? With these, the VM boots with virtio disk and network. > >> After boot (before setup), I'm trying to get a login prompt on the serial port (which QEMU's redirect to the terminal). >> I can do the following: >> echo "hello" > /dev/ttyS0 => appears on the terminal >> >> I can also boot with "console=ttyS0,9600n8" (in the GRUB command line), and the kernel messages appear on the console. >> However, I can't get a login prompt on the serial console. >> >> I tried variations of: >> agetty -L 9600 ttyS0 linux >> >> But they all exit after a timeout of few seconds, and no prompt appears on the serial console. >> Any ideas ? > > I haven’t tried agetty, but it seems to have a hard-coded default login > program of “/bin/login”, which doesn’t exist here. Could you try > invoking it with -l $(guix build shadow)/bin/login ? > > Alternately you could try adding a mingetty service to the > configuration: > > (operating-system > ... > (services (cons (mingetty-service "ttyS0") > %base-services))) > I still can't get serial console to work, perhaps needs more fidgeting. Trying "mingetty ttyS0" from the command line fails with: ttyS0: no controlling tty: Operation not permitted So I'm not sure 'mingetty' is the way to go. I'm not well-versed in scheme, so it will take me some more time to figure things out... -Assaf