Converting an ext3 file system to ext4

иконографияикони(adapted from

Assuming you have enabled ext3 on your filesystem via:

# tune2fs -j /dev/DEV

It is very easy to then enable the ext4 features on an existing ext3 filesystem, using the command:

# tune2fs -O extents,uninit_bg,dir_index /dev/DEV

WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!

After running this command (specifically, after setting the uninit_bg parameter), you MUST run fsck to fix up some on-disk structures that tune2fs has modified:

# e2fsck -fDC0 /dev/DEV

Be sure to update your /etc/fstab accordingly! And, if you do perform this update on an ext3 root file system, BE AWARE that you may have to jump through some hoops to get this work work. Many modern distributions boot off of a ram disk, and it is likely that ext4 is not in that ram disk. You will have to rebuild your ramdisk in order to boot your system.

Leave a Reply