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: Sat, 04 Oct 2014 22:42:57 +0200 Message-ID: <87bnprh8ha.fsf@gnu.org> References: <542F7ECA.1030709@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]:53679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaWAS-0003Rv-Cd for guix-devel@gnu.org; Sat, 04 Oct 2014 16:43:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaWAJ-0001A9-CC for guix-devel@gnu.org; Sat, 04 Oct 2014 16:43:04 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:47650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaWAJ-00019h-5B for guix-devel@gnu.org; Sat, 04 Oct 2014 16:42:55 -0400 In-Reply-To: <542F7ECA.1030709@gmail.com> (Assaf Gordon's message of "Sat, 04 Oct 2014 00:59:54 -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 Hi, Assaf, Assaf Gordon skribis: > First, > I can provide another recipe: Thanks for the recipe. We should probably add a subsection on how to install to a VM image in the manual. Would you like to amend guix.texi for that? > Second, > I can confirm Nate's observation that using QEMU's "-usbdrive" option for= the USB image causes everything to be VERY slow. > not sure why. > Using "-hda" for the USB image is much better. Weird, no idea either. > Third, > 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 =3D> appears on the terminal > > I can also boot with "console=3DttyS0,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 o= n the serial console. > Any ideas ? I haven=E2=80=99t tried agetty, but it seems to have a hard-coded default l= ogin program of =E2=80=9C/bin/login=E2=80=9D, which doesn=E2=80=99t 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))) > Fourth, > Sadly, after installation is complete, and after rebooting, the system fa= ils to load from "/dev/vda1" (drops to "early boot guile"). > Based on the kernel messages, it seems the "virtio_blk" driver is not loa= ded, and so "/dev/vda" is not available. > If I then switch QEMU parameters from "-drive if=3Dvirtio" to "-drive if= =3Dide" the system loads fine (also requires changing grub's "--root" param= eter). > > 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)))) I think this should work. Thanks for your feedback! Ludo=E2=80=99.