public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Håkon Alstadheim" <hakon@alstadheim.priv.no>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] installing Gentoo as a xen guest
Date: Thu, 24 Sep 2015 15:33:28 +0200	[thread overview]
Message-ID: <5603FBA8.1090508@alstadheim.priv.no> (raw)
In-Reply-To: <CAGfcS_=CgqD=COiHwo0yhRJUVDQtCv=AOCZ9rbFQdumV3GewNA@mail.gmail.com>

Den 24. sep. 2015 14:53, skrev Rich Freeman:
> On Thu, Sep 24, 2015 at 6:05 AM, hw <hw@gc-24.de> wrote:
>> Hi,
>>
>> I'm installing Gentoo as a xen PV guest.  Do I need to install a bootloader
>> like grub, or should I rather just specify the kernel to boot in the
>> definition file of the guest?  If I do the latter, what about the kernel
>> command line?
>>
>> Is there anything I should consider?  The host is also running Gentoo.
>>
> You can do either.  I suspect it would be easier to just use grub.  I
> don't know if xen provides a way to provide a command-line, if not you
> could build a default command-line into your kernel.
>
Depending on your hardware you will want to use hvm or pvm for
efficiency. (VT-x means hvm is more efficient). If running hvm on
quemu-xen-traditional, you HAVE to use a bootloader inside the VM, or
some kind of netboot/pvgrub thing. If running upstream quemu for a hvm,
you can choose. I find it less of a hassle to use bootloader inside the
VM. If running pv, I BELIEVE you have to specify kernel and boot options
outside the VM-image, possibly through pvgrub. Pvgrub is supposed to be
able to fish out kernel and initrd from the VM disk. I never bothered to
get that working. Here is an example excerpt from a PVM I use (for a
debian vm):
--print.pvm---
builder = "generic"
kernel = "/etc/xen/wheezy/vmlinuz-3.16.0-0.bpo.4-amd64"
ramdisk = "/etc/xen/wheezy/initrd.img-3.16.0-0.bpo.4-amd64"
extra = "root=/dev/xvda console=hvc0 tmem"
--
For explanation check "man xl.cfg". When you specify
kernel&ramdisk&parameters in the vm config, you do NOT need a /boot/
directory on your vm.  Obviously when you build a kernel inside the vm,
it will end up in /boot, so you have to provide a way for the
dom0/hypervisor to load your kernel, either (when using full
virtualization) a regular boot-loader inside the vm, or (for a PV guest)
through some other means to let the dom0/hypervisor load your image.



  parent reply	other threads:[~2015-09-24 13:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 10:05 [gentoo-user] installing Gentoo as a xen guest hw
2015-09-24 12:53 ` Rich Freeman
2015-09-24 13:22   ` J. Roeleveld
2015-09-24 13:45     ` Rich Freeman
2015-09-24 13:50       ` J. Roeleveld
2015-09-24 15:09         ` Rich Freeman
2015-09-24 13:33   ` Håkon Alstadheim [this message]
2015-09-26 12:00     ` J. Roeleveld
2015-09-26 12:55       ` Håkon Alstadheim
2015-09-24 13:10 ` J. Roeleveld
2015-09-25 11:11 ` [gentoo-user] installing Gentoo as a xen guest: installing grub hw
2015-09-25 11:21   ` Rich Freeman
2015-09-26 11:56   ` J. Roeleveld

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

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

  git send-email \
    --in-reply-to=5603FBA8.1090508@alstadheim.priv.no \
    --to=hakon@alstadheim.priv.no \
    --cc=gentoo-user@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox