unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Assaf Gordon <assafgordon@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: GUIX 0.7 under QEMU/KVM with virtio
Date: Sun, 05 Oct 2014 14:29:12 +0200	[thread overview]
Message-ID: <87bnpqg0o7.fsf@gnu.org> (raw)
In-Reply-To: <54308DBB.9070103@gmail.com> (Assaf Gordon's message of "Sat, 04 Oct 2014 20:15:55 -0400")

Assaf Gordon <assafgordon@gmail.com> 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	other threads:[~2014-10-05 12:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-04  4:59 GUIX 0.7 under QEMU/KVM with virtio Assaf Gordon
2014-10-04 20:42 ` Ludovic Courtès
2014-10-05  0:15   ` Assaf Gordon
2014-10-05 12:29     ` Ludovic Courtès [this message]
2014-10-05 23:29       ` Assaf Gordon
2014-10-06 19:28         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bnpqg0o7.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=assafgordon@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).