Root ext4 partition using xen kernel (gentoo)

1k Views Asked by At

I have just tried to install gentoo linux using xen kernel. The problem is that in kernel config in filesystem section there was no ext4 option. But my root partition is ext4. Well I tried to ignore that assuming that ext4 support is build in ext3 support or something like this. I have my boot and home partitions on separate. In my grub.cfg i have:

    Found Gentoo Base System release 2.0.3 on /dev/sda9
    menuentry "Gentoo Base System release 2.0.3 XEN" {
            insmod ext2
            set root='(hd0,4)'
            search --no-floppy --fs-uuid --set 8d2cb7cd-4d4e-402a-a133-1b09054ed851
            multiboot /xen.gz
            module /vmlinuz-2.6.18-xen root=/dev/sda9
    }

When my system boots up. I get following message:

   Kernel panic - not syncing:VFS: Unable to mount root fs

So I suppose this is because of ext4 not enable but I might be wrong. If it is true - is there any way to get ext4 support on xen kernel? Is there any easy way to convert ext4 to ext3 without shuffling things around?

Thanks for answers!

2

There are 2 best solutions below

0
On

You can't mount ext4 partitions as ext3 if that partition is using extents, which are enabled by default. The reason ext4 support is missing is because this kernel is too old. I would not recommend using ext4 on anything less than 2.6.30. And the reason it has given you such as old kernel is because this is the "stable" package version. The "unstable" package version will give you 2.6.38. If you don't wish to use "unstable" packages across your whole system then you can add an override in /etc/portage/package.keywords. Assuming you're on amd64...

sys-kernel/xen-sources ~amd64
0
On

Xen is now included into the upstream version of Linux kernel greater than 3.0, so you can directly emerge gentoo-sources (or git-sources as you like) to get an xen-enabled kernel.

Also to inform you that in case some modules are not compiled into the kernel (like ata support), the bootup progress will also be halted with a panic. To prevent that, you can make an initramfs at first, boot it once and see which modules are automatically loaded, make sure they are compiled into the kernel, and then you can recompile the kernel and go without initramfs.