From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Xen 4.2 (missing) pygrub support for ext4 on rhel5/centos5 e4fsprogs.. Date: Wed, 5 Sep 2012 10:05:50 +0100 Message-ID: <504715EE.2070606@citrix.com> References: <20120905030239.GJ8912@reaktio.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070909050506070504080108" Return-path: In-Reply-To: <20120905030239.GJ8912@reaktio.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --------------070909050506070504080108 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit On 05/09/12 04:02, Pasi Kärkkäinen wrote: > Hello, > > Roger: If I didn't mix up people we had a chat about this at XenSummit :) > so here's some info about the ext4 stuff on rhel5/centos5. > > # yum search e4fsprogs > e4fsprogs.x86_64 : Utilities for managing the fourth extended (ext4) filesystem > e4fsprogs-devel.i386 : Ext4 filesystem-specific static libraries and headers > e4fsprogs-devel.x86_64 : Ext4 filesystem-specific static libraries and headers > e4fsprogs-libs.i386 : Ext4 filesystem-specific static libraries and headers > e4fsprogs-libs.x86_64 : Ext4 filesystem-specific static libraries and headers > > # rpm -ql e4fsprogs-libs.i386 > /lib/libe4p.so.2 > /lib/libe4p.so.2.3 > /lib/libext4fs.so.2 > /lib/libext4fs.so.2.4 > > # rpm -ql e4fsprogs-libs.x86_64 > /lib64/libe4p.so.2 > /lib64/libe4p.so.2.3 > /lib64/libext4fs.so.2 > /lib64/libext4fs.so.2.4 > > # rpm -ql e4fsprogs-devel.i386 > /usr/include/e4p > /usr/include/e4p/e2p.h > /usr/include/ext4fs > /usr/include/ext4fs/bitops.h > /usr/include/ext4fs/ext2_err.h > /usr/include/ext4fs/ext2_ext_attr.h > /usr/include/ext4fs/ext2_fs.h > /usr/include/ext4fs/ext2_io.h > /usr/include/ext4fs/ext2_types-i386.h > /usr/include/ext4fs/ext2_types.h > /usr/include/ext4fs/ext2fs.h > /usr/include/ext4fs/ext3_extents.h > /usr/include/ext4fs/tdb.h > /usr/lib/libe4p.a > /usr/lib/libe4p.so > /usr/lib/libext4fs.a > /usr/lib/libext4fs.so > /usr/lib/pkgconfig/e4p.pc > /usr/lib/pkgconfig/ext4fs.pc > /usr/share/info/libext4fs.info.gz > > # rpm -ql e4fsprogs-devel.x86_64 > /usr/include/e4p > /usr/include/e4p/e2p.h > /usr/include/ext4fs > /usr/include/ext4fs/bitops.h > /usr/include/ext4fs/ext2_err.h > /usr/include/ext4fs/ext2_ext_attr.h > /usr/include/ext4fs/ext2_fs.h > /usr/include/ext4fs/ext2_io.h > /usr/include/ext4fs/ext2_types-x86_64.h > /usr/include/ext4fs/ext2_types.h > /usr/include/ext4fs/ext2fs.h > /usr/include/ext4fs/ext3_extents.h > /usr/include/ext4fs/tdb.h > /usr/lib64/libe4p.a > /usr/lib64/libe4p.so > /usr/lib64/libext4fs.a > /usr/lib64/libext4fs.so > /usr/lib64/pkgconfig/e4p.pc > /usr/lib64/pkgconfig/ext4fs.pc > /usr/share/info/libext4fs.info.gz > > > And then some info about the included files in the stock rhel5/centos5 Xen rpms (Xen 3.1.2), > where pygrub does support ext4 using e4fsprogs-libs: > > > # rpm -ql xen-libs | grep fsimage > /usr/lib64/fs/ext2fs-lib/fsimage.so > /usr/lib64/fs/fat/fsimage.so > /usr/lib64/fs/iso9660/fsimage.so > /usr/lib64/fs/reiserfs/fsimage.so > /usr/lib64/fs/ufs/fsimage.so > /usr/lib64/libfsimage.so.1.0 > /usr/lib64/libfsimage.so.1.0.0 > /usr/lib/fs/ext2fs-lib/fsimage.so > /usr/lib/fs/fat/fsimage.so > /usr/lib/fs/iso9660/fsimage.so > /usr/lib/fs/reiserfs/fsimage.so > /usr/lib/fs/ufs/fsimage.so > /usr/lib/libfsimage.so.1.0 > /usr/lib/libfsimage.so.1.0.0 > > # ldd /usr/lib/fs/ext2fs-lib/fsimage.so > linux-gate.so.1 => (0xffffe000) > libfsimage.so.1.0 => /usr/lib/libfsimage.so.1.0 (0xf7f09000) > libext4fs.so.2 => /lib/libext4fs.so.2 (0xf7edb000) > libc.so.6 => /lib/libc.so.6 (0xf7d82000) > libpthread.so.0 => /lib/libpthread.so.0 (0xf7d68000) > libcom_err.so.2 => /lib/libcom_err.so.2 (0xf7d64000) > /lib/ld-linux.so.2 (0x00778000) > > > # ldd /usr/lib64/fs/ext2fs-lib/fsimage.so > linux-vdso.so.1 => (0x00007fff9cffd000) > libfsimage.so.1.0 => /usr/lib64/libfsimage.so.1.0 (0x00002adbbef0e000) > libext4fs.so.2 => /lib64/libext4fs.so.2 (0x00002adbbf111000) > libc.so.6 => /lib64/libc.so.6 (0x00002adbbf340000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00002adbbf697000) > libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002adbbf8b2000) > /lib64/ld-linux-x86-64.so.2 (0x00000039dce00000) > > So el5 stock Xen rpms provide ext2fs-lib/fsimage.so, which is linked against libext4fs.so.2, > and pygrub loads/uses fsimage.so. > > > Can you guys please post the patch/hack you're currently using with XenServer/XCP, > so we can decide what'd be the best way to get Xen 4.2 pygrub supporting ext4 also on el5 ? Attached, but it is very brutal as far as hacks go, and not suitable for upstreaming in its current form. ~Andrew > > > Thanks, > > -- Pasi > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel -- Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com --------------070909050506070504080108 Content-Type: text/x-patch; name="centos5-libe4fs-hack.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="centos5-libe4fs-hack.patch" # HG changeset patch # Parent d341f05a3640a1f4cd92f7b8eefb4d221c13b408 Work around RHEL5's ext2fs/ext4fs split. We need to link against a new enough version of libext2fs to be able to read ext4 partitions. This is only needed because RHEL5 puts the latest ext2 libs in their own directory. Other distros (and other RHELs) work fine already. This a hard-hack; a proper fix would add the check to configure. This patch can be simply removed when we move to Centos 6. diff --git a/tools/libfsimage/ext2fs-lib/Makefile b/tools/libfsimage/ext2fs-lib/Makefile --- a/tools/libfsimage/ext2fs-lib/Makefile +++ b/tools/libfsimage/ext2fs-lib/Makefile @@ -4,7 +4,7 @@ LIB_SRCS-y = ext2fs-lib.c FS = ext2fs-lib -FS_LIBDEPS = -lext2fs +FS_LIBDEPS = -lext4fs .PHONY: all all: fs-all diff --git a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c --- a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c +++ b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c @@ -22,7 +22,7 @@ */ #include -#include +#include #include #include --------------070909050506070504080108 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------070909050506070504080108--