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

Re: Is initramfs' /dev supposed to show exposed targets at Guest Boot Time?


  • To: xen-users@xxxxxxxxxxxxx
  • From: "John L. Poole" <jlpoole56@xxxxxxxxx>
  • Date: Fri, 29 Jan 2021 03:49:07 -0800
  • Delivery-date: Fri, 29 Jan 2021 11:50:29 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>


On 1/29/2021 2:51 AM, Andy Smith wrote:
Hi John,

This looks like a xen-users question, not a xen-devel one, so I'm
redirecting it there. Please reply on-list there.

Especially if 9as it appears) you did get the guest to boot, and
your issue is it drops to an (initramfs) prompt.

I'm not sure the device will actually appear as sda3 inside the
guest. What does "cat /proc/partitions" say form the guest's
(initramfs) prompt?

You are complicating things by trying to use LVM inside a guest.
While that works fine, start simpler with just a simple block device
in the guest. Export /dev/vg0/aresboot from host as xvda in guest,
e.g.:

disk = [ 'phy:/dev/vg0/aresserver,xvda,rw',
          'phy:/dev/vg0/aresswap,xvdb,rw' ]

Cheers,
Andy

On Thu, Jan 28, 2021 at 08:11:48PM -0800, John L. Poole wrote:
Greetings,

I try to run Xen on low energy platforms.  I've previously been here about
an Intal Atom which died
just after the 3 year warranty expired.  So I'm trying AMD's laptop Ryzen.
I think I've been using Xen
for 8 years.

I have Debian (Linux snuc 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2
(2020-11-28) x86_64 GNU/Linux)
running on a new SimplyNuC:  Aspen PN50 R7 4800U with a AMD Ryzen™ 4000
Renoir mobile processor.

(I tried to run Xen from the factory installed Ubuntu and ran into the same
problem below, so I
thought I ought to use Debian in case Ubuntu had a shortcoming re: lvm)

I created volumes with lvm, i.e. /dev/vg0/aresboot, /dev/vg0/aresswap,
/dev/vg0/aresserver
which are to be exposed to the Gentoo environment as sda1, sda2, and sda3.
My Gentoo
/etc/fstab accordingly has sda1,2, & 3 specified.  My problem occurs, I
think, before my Gentoo
kernel even has a chance to perform its initialization.

I am trying to create a Gentoo VM and successfully built a kernel and
initramfs in a chrooted
environment within /dev/vg0/aresserver.  I've successfully done this before
on
other platforms; however, my attempt now is on this tiny, but powerful and
efficient, SimplyNUC.

And, I think this may be my first time using LVM partitions exclusively
rather than standard fsdisk partitions.

When I try to "xl create ares.conf -c", the Gentoo kernel is unable to see
the labeled "sda3"
[target is Debian's /dev/vg0/aresserver].

I'm not new Xen and have not had this kind of problem before, but I also
don't think I staged
my guests completely on lvm partitions.  I'm thinking there is a problem
between the
Xen Kernel code and Gentoo's kernel and I think the problem may be on the
Gentoo side.

The version of lvm on Debian is: 2.03.02(2)
The version of lvm [lvm2] on Gentoo is: 2.02.187-r2

(Would a lvm 2.02 be unable to read a 2.03??)

My question now is: when my Gentoo initramfs can't find the partition and I
enter its shell, should I
be seeing the exposed partition, e.g. "sda3", under /dev?  I think so.

None of the names I specify, e.g. "sda3", appear under the /dev listing (see
pastebin below).

A sample configuration for the disk (just 1 target used to debug this
problem) is:

disk = ['format=raw, vdev=sda3, access=rw,
target=/dev/mapper/vg0-aresserver']

I have tried specifying root as "sda3" -- the name that the target should
appear as in the guest
environment as well as the full path from the Dom0 environment (above).

I'm guessing my problem is an initramfs and/or kernel issue in Gentoo: being
unable to
read an lvm partition.  Note, when I compiled, I used genkernel as follows:

      genkernel --menuconfig --lvm --mdadm all

and my xen configuration has:

      root=/dev/vg0/aresserver dolvm  domdadm

(root=/dev/sda3 and root=sda3 do not work either)

Before I approach Gentoo developers, I wanted to learn from the Xen gurus
that my assumption that the
initramfs /dev listing is the correct assay to determine if initramfs and/or
the kernel are
able to see the Debian lvm partitions.

Here is a pastebin of my create session and listing of /dev from within
initramfs shell: https://pastebin.com/juybx5gU

So, should I be seeing "sda3" when I list /dev?

Thank you.
--
Email Rider

John Laurence Poole

Hi Andy,

Answer to your question:

     rescueshell / # cat /proc/partitions
     rescueshell / #

Since writing, I've learned of problems on the Gentoo side with lvm [lvm2].

Specifically, the Gentoo lvm2 package maintainer warns:
*[**lvm2-2.03 ] Needs LOTS of testing, broke boot on my laptop in early attempts,
maybe needs matching genkernel work?*

https://packages.gentoo.org/packages/sys-fs/lvm2

In my original posting, I've noted Debian is running lvm 2.03.02(2)
whereas my Gentoo guest is has lvm 2.02.187-r2  and I used genkernel.

Another recent posting on the Gentoo forums reports a similar
problem where the author "can't mount the root partition when booting.":

https://forums.gentoo.org/viewtopic-t-1128130-highlight-lvm2.html?sid=30c4ec50ca3e7d53f56cc098d7c0acb2

I guess lvm and Gentoo and Xen is asking too much at this time, I'll have to
retreat and not use lvm for the base system.

Thank you,

John




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.