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: Sun, 05 Oct 2014 14:29:12 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

Assaf Gordon <address@hidden> skribis:

> 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.

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 
> "/dev/vda1".
>    Perhaps some hard-coded thing ?

“gnu-disk-image” is the label of the root partition of the USB
installation image (see gnu/system/install.scm.)

However, the user’s root can carry any label, as long as the
corresponding ‘file-system’ declaration uses it.

> With these, the VM boots with virtio disk and network.

Good.

>> 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.

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’.



reply via email to

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