PyGRUB foiled by newer mke2fs
So a buddy of mine about a week ago decides to put together a machine whose software setup is similar to the machine which runs DotBlag here. Solaris or OpenSolaris, running Debian inside of a Paravirtualized Machine under Xen (xVM in Solaris).
This process sucks a little bit because unlike everyone else Debian still doesn’t support PVM inside of their installer. So you have to fire up a full HVM environment and use debootstrap, OR, convert that (HVM) environment to a PVM.
Everything was fine getting the initial HVM bootstrap env up, but nothing he did would get pygrub to fire up the kernels, it kept complaining (when run interactively) that it could not find the kernel.
# pygrub /dev/zvol/dsk/p0/zvol2
Traceback (most recent call last):
File "./pygrub", line 658, in ?
chosencfg = run_grub(file, entry, fs)
File "./pygrub", line 509, in run_grub
g = Grub(file, fs)
File "./pygrub", line 198, in __init__
self.read_config(file, fs)
File "./pygrub", line 388, in read_config
raise RuntimeError, "couldn't find bootloader config file in the image provided."
RuntimeError: couldn't find bootloader config file in the image provided.
This was to say the least, VERY irritating. And we couldn’t figure out why. We tried messing with the partition tables, the menu.lst, everything. Until I remembered a problem with mke2fs -t ext2 NOT producing 2.4.x compatible ext2 filesystems and began to wonder if that is what happened here. Sure enough, running mke2fs from Debian 4 and not Debian 5 produced a working system. Solaris’ pygrub is completely useless in providing a good error, only providing the traceback above.
Hopefully this will help some poor soul trying to get Debian 5 inside a PVM running on Solaris or OpenSolaris.