guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUIX 0.7 under QEMU/KVM with virtio


From: Ludovic Courtès
Subject: Re: GUIX 0.7 under QEMU/KVM with virtio
Date: Sat, 04 Oct 2014 22:42:57 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

Hi, Assaf,

Assaf Gordon <address@hidden> 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   => 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)))

> Fourth,
> Sadly, after installation is complete, and after rebooting, the system fails 
> to load from "/dev/vda1" (drops to "early boot guile").
> Based on the kernel messages, it seems the "virtio_blk" driver is not loaded, 
> and so "/dev/vda" is not available.
> If I then switch QEMU parameters from "-drive if=virtio" to "-drive if=ide" 
> the system loads fine (also requires changing grub's "--root" parameter).
>
> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]