Nikita A Menkovich
2011-Jul-04 09:05 UTC
[Libguestfs] PATCH: daemon mkfs.c Add option "inode" for setting -I flag on mkfs_opts command
Hello, Patch implements inode option to mkfs_opts command. This is needed because older versions of grub(for example in centos) do not understand filesystems created with newer version of e2fsprogs. By default in e2fsprogs 1.4+ creates partitions with 256 bit inode size, and grub expect 128 bit size. Usage: $ guestfish><fs> add-drive test.img 1G #for small images by default used 128 bit ><fs> run ><fs> part-disk /dev/vda mbr ><fs> mkfs ext3 /dev/vda1 ><fs> tune2fs-l /dev/vda1 | grep "Inode size"Inode size: 256><fs> mkfs-opts ext3 /dev/vda1 inode:128 ><fs> tune2fs-l /dev/vda1 | grep "Inode size"Inode size: 128 -- Nikita A Menkovich http://libc6.org/ JID: menkovich at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: inode-mkfs.patch Type: text/x-patch Size: 1361 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20110704/29628253/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: inode-generator.patch Type: text/x-patch Size: 1233 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20110704/29628253/attachment-0001.bin>
Richard W.M. Jones
2011-Jul-04 09:39 UTC
[Libguestfs] PATCH: daemon mkfs.c Add option "inode" for setting -I flag on mkfs_opts command
On Mon, Jul 04, 2011 at 01:05:04PM +0400, Nikita A Menkovich wrote:> Hello, > > Patch implements inode option to mkfs_opts command. > This is needed because older versions of grub(for example in centos) > do not understand filesystems created with newer version of e2fsprogs. > By default in e2fsprogs 1.4+ creates partitions with 256 bit inode > size, and grub expect 128 bit size. > Usage: > $ guestfish > ><fs> add-drive test.img 1G #for small images by default used 128 bit > ><fs> run > ><fs> part-disk /dev/vda mbr > ><fs> mkfs ext3 /dev/vda1 > ><fs> tune2fs-l /dev/vda1 | grep "Inode size" > Inode size: 256 > ><fs> mkfs-opts ext3 /dev/vda1 inode:128 > ><fs> tune2fs-l /dev/vda1 | grep "Inode size" > Inode size: 128Thanks, I have pushed the patch with a few adjustments: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=24fb2c1255f751dad98dd1739b3ed3a52ce06f70 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org