Mailing List Archive

Unable to puzzle through grub.xen_pvh
I started here:
https://wiki.xenproject.org/wiki/Xen_4.12_RC_test_instructions#PVH_domU_boot_via_grub2

I was able to build and copy over the resulting built component. I then
proceeded to change an existing vm that booted PVH with the
kernel="/path/to/grub.xen_pvh" instead of bootloader="pygrub"

It worked in that I got a grub command prompt, which usually happens
when grub doesn't know what to do. I feel like I'm really close!

my cfg:
=============
name="hass"
type="pvh"
vcpus=4
memory=2048
maxmem=4096
#bootloader="pygrub"
kernel="/usr/local/bin/grub.xen_pvh"

# Enable pv on hvm drivers
xen_platform_pci=1

vif = [ 'mac=00:16:3E:DE:AD:78, bridge=xenbr0' ]

disk = [

'phy:/dev/disk/by-path/ip-10.255.255.2:3260-iscsi-iqn.2005-10.org.freenas.ctl:xen-lun-35,xvda,w'
]


# usb passthrough for the zwave stick
usbctrl=['type=auto,version=2,ports=4']
usbdev=['type=hostdev,hostbus=2,hostaddr=3']
=============

There is a grub.cfg in /boot/grub/grub.cfg on that disk. It's a standard
ubuntu 18.04 vm, which I've built a kernel with the PVUSB drivers on it.
Trying to get that kernel to boot easily, and a more real grub
environment would help solve it.

Thanks!
Re: Unable to puzzle through grub.xen_pvh [ In reply to ]
Normally, if you have a direct kernel boot, it becomes necessary to pass a
few other options.

My experience booting Xen directly with a kernel is not much but with Qemu
you need to pass a root. This usually is what will be mounted at '/'.

Coincidentally enough, there is such an option with Xen, too seen below

https://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html#Direct-Kernel-Boot

On Tue, Jun 9, 2020 at 5:04 AM David Kowis <david@kow.is> wrote:

> I started here:
>
> https://wiki.xenproject.org/wiki/Xen_4.12_RC_test_instructions#PVH_domU_boot_via_grub2
>
> I was able to build and copy over the resulting built component. I then
> proceeded to change an existing vm that booted PVH with the
> kernel="/path/to/grub.xen_pvh" instead of bootloader="pygrub"
>
> It worked in that I got a grub command prompt, which usually happens
> when grub doesn't know what to do. I feel like I'm really close!
>
> my cfg:
> =============
> name="hass"
> type="pvh"
> vcpus=4
> memory=2048
> maxmem=4096
> #bootloader="pygrub"
> kernel="/usr/local/bin/grub.xen_pvh"
>
> # Enable pv on hvm drivers
> xen_platform_pci=1
>
> vif = [ 'mac=00:16:3E:DE:AD:78, bridge=xenbr0' ]
>
> disk = [
>
>
> 'phy:/dev/disk/by-path/ip-10.255.255.2:3260-iscsi-iqn.2005-10.org.freenas.ctl:xen-lun-35,xvda,w'
> ]
>
>
> # usb passthrough for the zwave stick
> usbctrl=['type=auto,version=2,ports=4']
> usbdev=['type=hostdev,hostbus=2,hostaddr=3']
> =============
>
> There is a grub.cfg in /boot/grub/grub.cfg on that disk. It's a standard
> ubuntu 18.04 vm, which I've built a kernel with the PVUSB drivers on it.
> Trying to get that kernel to boot easily, and a more real grub
> environment would help solve it.
>
> Thanks!
>
>
Re: Unable to puzzle through grub.xen_pvh [ In reply to ]
Hello,
this link below is the first good analysis I've seen of how to write a grub2 scriptwith xen support:

https://www.mendix.com/blog/using-pvgrub2-boot-xen-domus/
written by Hans V. K. now of the Debian-xen team.
cheers,
PryMar56




On Monday, June 15, 2020, 12:19:29 AM PDT, K. Kahurani <k.kahurani@gmail.com> wrote:

Normally, if you have a direct kernel boot, it becomes necessary to pass a few other options.
My experience booting Xen directly with a kernel is not much but with Qemu you need to pass a root. This usually is what will be mounted at '/'.
Coincidentally enough, there is such an option with Xen, too seen below

https://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html#Direct-Kernel-Boot
On Tue, Jun 9, 2020 at 5:04 AM David Kowis <david@kow.is> wrote:

I started here:
https://wiki.xenproject.org/wiki/Xen_4.12_RC_test_instructions#PVH_domU_boot_via_grub2

I was able to build and copy over the resulting built component. I then
proceeded to change an existing vm that booted PVH with the
kernel="/path/to/grub.xen_pvh" instead of bootloader="pygrub"

It worked in that I got a grub command prompt, which usually happens
when grub doesn't know what to do. I feel like I'm really close!

my cfg:
=============
name="hass"
type="pvh"
vcpus=4
memory=2048
maxmem=4096
#bootloader="pygrub"
kernel="/usr/local/bin/grub.xen_pvh"

# Enable pv on hvm drivers
xen_platform_pci=1

vif = [ 'mac=00:16:3E:DE:AD:78, bridge=xenbr0' ]

disk = [

'phy:/dev/disk/by-path/ip-10.255.255.2:3260-iscsi-iqn.2005-10.org.freenas.ctl:xen-lun-35,xvda,w'
        ]


# usb passthrough for the zwave stick
usbctrl=['type=auto,version=2,ports=4']
usbdev=['type=hostdev,hostbus=2,hostaddr=3']
=============

There is a grub.cfg in /boot/grub/grub.cfg on that disk. It's a standard
ubuntu 18.04 vm, which I've built a kernel with the PVUSB drivers on it.
Trying to get that kernel to boot easily, and a more real grub
environment would help solve it.

Thanks!
Re: Unable to puzzle through grub.xen_pvh [ In reply to ]
Hi,

On 6/9/20 3:58 AM, David Kowis wrote:
> I started here:
> https://wiki.xenproject.org/wiki/Xen_4.12_RC_test_instructions#PVH_domU_boot_via_grub2
>
> [...]
>
> There is a grub.cfg in /boot/grub/grub.cfg on that disk. It's a standard
> ubuntu 18.04 vm,

It looks like standad ubuntu 18.04 has a linux kernel based on v4.15.
The final patches to boot PVH with grub went into linux 4.20.

Hans