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

Re: [Xen-devel] pygrub gives "raise RuntimeError("Unable to find partition containing kernel")"



Bit more on this:

I created a different VBD-backed VM, containing an Ubuntu 14045 install,
on a CentOS 6.10 host, with Xen 4.10, and a 4.9.127 kernel, where the VM
boots up fine.

Back in my LinuxFromScratch environment I still see the bootloader lig
error message as before

Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse /boot/grub/grub.cfg
Traceback (most recent call last):
  File "/usr/lib/xen/bin/pygrub", line 928, in <module>
    raise RuntimeError("Unable to find partition containing kernel")
RuntimeError: Unable to find partition containing kernel

Here's the partition table of the VBD

Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-1: 8388608s
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start     End       Size      Type      File system     Flags
        63s       2047s     1985s               Free Space
 1      2048s     3207167s  3205120s  primary   ext4
        3207168s  3209213s  2046s               Free Space
 2      3209214s  8386559s  5177346s  extended
 5      3209216s  3581951s  372736s   logical   linux-swap(v1)
        3581952s  3582494s  543s                Free Space
 6      3584000s  8386559s  4802560s  logical   ext4
        8386560s  8388607s  2048s               Free Space


I did though, think to try the folliwing

# /usr/lib/xen/bin/pygrub --debug --offset=1048576 --list-entries
/dev/vg_xen_vbds/lv_4g_02
Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse /boot/grub/grub.cfg
Traceback (most recent call last):
  File "/usr/lib/xen/bin/pygrub", line 907, in <module>
    chosencfg = run_grub(file, entry, fs, incfg["args"])
  File "/usr/lib/xen/bin/pygrub", line 625, in run_grub
    g = Grub(file, fs)
  File "/usr/lib/xen/bin/pygrub", line 249, in __init__
    self.read_config(file, fs)
  File "/usr/lib/xen/bin/pygrub", line 460, in read_config
    self.cf.parse(buf)
  File "/usr/lib/python3.7/site-packages/grub/GrubConf.py", line 376, in parse
    lines = buf.split("\n")
TypeError: a bytes-like object is required, not 'str'
#

which suggests to me that Xen's pygrub is reading the grub.cfg from
within the VBD image but that last line isn't really telling me much.

Note that the Grub installation, from where
/usr/lib/python3.7/site-packages/grub/GrubConf.py"
come, is able to parse a similar grub.cfg when it boots up the LFS
instance hosting my Xen

Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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