1

I have some set of scripts that create qcow2 file with grub legacy (0.97) with special patch to boot from ext4 and ext4 file system for '/'.

When I run those scripts on Ubuntu 12.04/14.04 the VMs works in KVM. But for Centos 7 the grub legacy doesn't load from ext4.

The '/' is creating with mkfs -t ext4 -L BOOT /dev/mapper/loop0p1

When I move qcow2 files from Ubuntu to CentOs they can boot. But qcow2 images that were created on CentOs 7 can't boot on both systems.

When we are executing mkfs -t ext4 -L BOOT at:

Ubuntu KVM host 12/14, dumpe2fs shows:

Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize Journal features: journal_incompat_revoke 

CentOs 7 KVM host, dumpe2fs shows: When we executing mkfs -t ext4 -L BOOT at:

Ubuntu KVM host 12/14, dumpe2fs shows: Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize Journal features: journal_incompat_revoke

CentOs 7 KVM host, dumpe2fs shows:

Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize Journal features: journal_incompat_revoke journal_64bit 

So mkfs.ext4 adds:

  1. Journal features:journal_64bit
  2. Filesystem features: 64bit

How to avoid this?

Regards.

1
  • 1
    may give you a bit more information (also maybe try dumpe2fs): tune2fs -l <partition> Commented Jun 6, 2016 at 4:50

1 Answer 1

1

man mkfs.ext4

The defaults of the parameters for the newly created filesystem, if not overridden by the options listed below, are controlled by the /etc/mke2fs.conf configuration file.

Ubuntu host, cat /etc/mke2fs.conf

[defaults] base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr default_mntopts = acl,user_xattr enable_periodic_fsck = 0 blocksize = 4096 inode_size = 256 inode_ratio = 16384 [fs_types] ext4 = { features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize auto_64-bit_support = 1 inode_size = 256 } ext4dev = { features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize inode_size = 256 options = test_fs=1 } 

CentOs 7 host, cat /etc/mke2fs.conf:

[defaults] base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr default_mntopts = acl,user_xattr enable_periodic_fsck = 0 blocksize = 4096 inode_size = 256 inode_ratio = 16384 [fs_types] ext4 = { features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit inode_size = 256 } ext4dev = { features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize inode_size = 256 options = test_fs=1 } 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.