From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: GUIX 0.7 under QEMU/KVM with virtio Date: Sun, 05 Oct 2014 14:29:12 +0200 Message-ID: <87bnpqg0o7.fsf@gnu.org> References: <542F7ECA.1030709@gmail.com> <87bnprh8ha.fsf@gnu.org> <54308DBB.9070103@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XakwA-0006uc-4w for guix-devel@gnu.org; Sun, 05 Oct 2014 08:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xakw1-00010K-4S for guix-devel@gnu.org; Sun, 05 Oct 2014 08:29:18 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:48016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xakw0-0000zw-Th for guix-devel@gnu.org; Sun, 05 Oct 2014 08:29:09 -0400 In-Reply-To: <54308DBB.9070103@gmail.com> (Assaf Gordon's message of "Sat, 04 Oct 2014 20:15:55 -0400") 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: Assaf Gordon Cc: guix-devel@gnu.org Assaf Gordon skribis: > On 10/04/2014 04:42 PM, Ludovic Court=C3=A8s 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. OK. > 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 "/d= ev/vda1". > Perhaps some hard-coded thing ? =E2=80=9Cgnu-disk-image=E2=80=9D is the label of the root partition of the = USB installation image (see gnu/system/install.scm.) However, the user=E2=80=99s root can carry any label, as long as the corresponding =E2=80=98file-system=E2=80=99 declaration uses it. > With these, the VM boots with virtio disk and network. Good. >> I haven=E2=80=99t tried agetty, but it seems to have a hard-coded defaul= t login >> program of =E2=80=9C/bin/login=E2=80=9D, which doesn=E2=80=99t exist her= e. 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. Did you try agetty with -l as suggested above? > Trying "mingetty ttyS0" from the command line fails with: > ttyS0: no controlling tty: Operation not permitted Is mingetty running as root here? If it is, could you strace it to see exactly what returns EPERM? HTH, Ludo=E2=80=99.