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

Pygrub does not boot ext2 on LVM volume other than from root directory


  • To: xen-users@xxxxxxxxxxxxxxxxxxxx
  • From: Martin Lang <mlg-hessigheim@xxxxxx>
  • Date: Sun, 07 Jan 2024 10:16:40 +0100
  • Autocrypt: addr=mlg-hessigheim@xxxxxx; prefer-encrypt=mutual; keydata=mQINBF317GkBEACl4zzKu5Ig2BO3IJM0uluzuNY2isytWPQQ6eTW3ru3Um3U1qL3uZ7MtX0FYRqwJ/qedCMLMxqOPqNkUXRlY2gSb2hHVnIGDucn38ZkYgHHxnu8xDF+WdLBcL4wr2yuPCbsRpojtKzVuVP0irZBHbB5CL2cjAEWFVbXszU2YKPhIRcIZXoNOHBZgt/+xnUQ3/cf5VzHQYZD/pAShNJvYnTPoEcBe4Tzh9IAqU8bv3eQoVG+DCYqAk27+ASA07LQjXER4GLJmcNZmolElH7XCBPcOWFPJMbLAT+bSB3NdTwOips3la2XiIFYslaAHsTPXoxfbaGTjqR2ENySkfxBIX7wTNBSRBuGSYocssaOiP7R8+/aUBwGVHV3wP4ctwZzLd5vNvmqNyfyb1tLMCfmuIvu4tcXYEwnimqeOw/5S+VtDqTOqOaBjCE82V5rMndwFmg+doRviYH0NtdqLHM8ei2UUtG+mYUqPLMDxkn12Kg0bc7LMvzsFA1QnmSsWYK6grHRS1QDuomjE1sWazigzlVb8SkMBCmwtVWd0BmueJ1Ql9KYOt8hPqj2GeTBO1pusa8zdfaabzCe4IKD1CnwPWLhfZf3QRZOz5/LitQvBpRC6JLiSHHHMq8UOyFzrknsXZHqjBk0d0tjoJur6AjnzfYF6X9WJl00qQw5rz31MwpmkwARAQABtCNNYXJ0aW4gTGFuZyA8bWxnLWhlc3NpZ2hlaW1AZ214LmRlPokCVAQTAQoAPhYhBPgrCbxHz/DMIlrp1cbIp4J0cYvBBQJd9expAhsBBQkJZgGABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEMbIp4J0cYvBM+s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ChEpRVr3oKnsfDXJ3nMvtwLsK2YfbXY61yI14Bi3B8vRwuf5Gz/AOHUGHkg8nTnCHKNRcgh77Fhog1Hv7f0dVb7JLkKS7QCfmMc1nMJH/7kSjeqRwJoMHAIfOt2huB3QP8XoXkudGYpXbZ9zVvGXkmjmYtWmah7FbBHNw==
  • Delivery-date: Sun, 07 Jan 2024 09:17:33 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Ui-outboundreport: notjunk:1;M01:P0:yLQ7fNEAeVw=;hZTjnBiE0Mzj+i3FJG5+X0HaHj9 ZDR/aFE8Nr9tYwphRQ2OYBX+zLyiKI1PVGesk84OiQfKffTvs3JjpjN/0xK2V326KzUCVY19q U9vicOVGwguBrkQDawXAuJ9bHTOfcrJ92ShkvRFYn3NTpzmpQ3kC79jcDvtMoBmTCLGHTN+v8 VYWv/WPEadpjG2wtpvLhWSMpDvxSr7W1HM42lFXWdkZ5x15WUeWoYqdpydrFA2b4c2mH5LLk6 t3Xe9OQhEPOHoT9lh+y4hg7ncWRxQPZWK+8EdybEuw0yaX04Sdlk13uJfsJub7DmzjUHdmji/ 8wn1TwqRp4G7zU+qLeG7wB7ArBzRXBm6thYEhKvCchZI0XoheYOiZM6ZCDPkqhjJHYXVtmsYr KUsJlqmOG2bP3iYphxrtC/O7Qk/u6ZdUjKfDt9okeO3MQ8Hg1xlwNsJuGQtN7z+JdkZw0HejY Dz9bvI6dFKSkkoScrE0VrMcnh3g3uR4RyAM6mEBq68vvTwgKcmS6CeLxLhNxyRpuW7+IUFnQ0 qlak7PeWHftJY90E+eDtn4M2dR6FPsFbFahh+amekgdNcS06Id5/o+5L/RgnGjTYT4Ir02VBN RdC40IZT/JoDrgCo7d4zvxweEQY8g/C/XU63caEwO7Bfd7BNgxekNtgfVpfShq0NL+J3WayD4 KFuRVv3Du6QpnImBbXRKmUrx/YUlCy5UK4cu8lJPf6nAergbgxGVeubAuFYfPvauE6n+O2Ws9 90g0sPW4UwoX0yOiBjFmpbpArkkQ/VZ5veS6QU0aELVdSs3Qyu8Cd0Ja4WDJPYifFVJLFwF8K VA9oQA2QoyfW8kGFSfIhGGdYau9lpLwMh8yOf5vmdYL9WrjO0vVbBBRrOuIwx6+TBjMSMFvZi xJqLWzkHFQiKrntRzpU3haQllY9taPJ3Y7/Iu88S4B1yIrcCleUyScTRWiHENlx/NFGwzsl0/ wZJuow==

Hi all,

I have a weired problem with pygrub.

The machine I am running xen is a PC-Engines APU for which I build xen
and tools using Yocto project. Version of Xen 4.16 stable from the
"Kirkstone" branch of Yocto.

Everything went well and I was able to install the image on a LVM
Volume. Hypervisor runs well. I created separate logical volumes for
DomU guests and installed Debian on it. I am also able to boot the DomU
guest as long as I copy the kernel and initrd.img to the Dom0
filesystem and use the "kernel=" parameter in the xen.cfg file.

When I try to use pygrub to boot the guest it tells that it does not
find a partition containing a kernel. With a little investigation I
found out, that it is not a parsing problem of grub.cfg but it does not
find grub.cfg at all.

So I compiled the libfsimage with debug information (-DE2DEBUG in
Makefile) and found out, that the libfsimage does not recurse into the
directories. It finds /boot at the root directory but does not recurse
into it while it looks for /boot/grub/grub.cfg.

When I mount the volume and filesystem directly using xl-attach
everthing is o.k. so the filesystem itself seems to be o.k.

I also created a dummy menu.lst file at root directory. Interestingly
pygrub the finds it, is able to parse it, shows the menu and then fails
when he tries to find the kernel because then he has to recurse into
/boot directory again.

Next test was, that i copied kernel and initrd directly into the root
directory and refered to a menu.lst also in root directory. Now pygrub
finds everything and starts the DomU.


Any ideas, what the problem is?


If it helps I copy the output of the Debug (E2DEBUG flag set):
>fsblock 8737 buffer c2ef0f40
>directory entry ino=23
>entry=libx32
>dirname=boot, rest=, loc=200
>ed 41 00 00 00 10 00 00 1a fe 97 65 1c fe 97 65
>1c fe 97 65 00 00 00 00 00 00 12 00 08 00 00 00
>00 00 08 00 44 01 00 00 0a f3 01 00 04 00 00 00
>00 00 00 00 00 00 00 00 01 00 00 00 21 22 00 00
>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>00 00 00 00 00 00 00 00 00 00 00 00 04 72 00 00
>logical block 0
>fs block=8737
>fsblock 8737 buffer c2ef0f40
>directory entry ino=8193
>entry=boot
>inode 8193
>dirname=/grub/grub.cfg
>ipg=8192, dpb=128
>group_id=1 group_desc=0 desc=1
>fsblock 1 buffer c2eeeec0
>gdp=c2eeeec0, inodes_per_block=16, inode_offset=0
>inode table fsblock=0
>fsblock 0 buffer c2eefec0
>ipb=16, sizeof(inode)=256
>inode=c2eefec0, raw_inode=c2eefec0
>offset into inode table block=0
>00 first word=0
>first word=0
>Bad filetype: Size:0, Mode:0, IsDir:0
>inode 2
>dirname=/grub/grub.cfg
>ipg=8192, dpb=128
>group_id=0 group_desc=0 desc=0

As one can see, it goes through the root directory. In the output I
deleted the beginning. On top of the trace it looks at INODE libx32 and
looking for an entry called "boot". That is correct so far. Next if
finds "boot". INODE number 8193 is also correct (checked with debugfs)
and tries to recurse down and look for /grub/grub.cfg.
But now something seems to go wrong. Instead of the next INODE it sees
only 00.


Any help is highly appreciated.

Regards Martin



 


Rackspace

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