Switching to EXT4 in Ubuntu (and back to EXT3)

2 minute read

EXT4 is soon to become the default file system in Ubuntu once 9.10 (Karmic) has been released. I've already been using it, but have stumbled across a few problems.

  1. Reverting - I moved all of my backups and vast amounts of data across into EXT4 partitions. I have since been having a few problems with Ubuntu Server 9.04, and had wanted to revert back to Ubuntu Server 8.04 LTS but was unable to do so (as it's not compatible with EXT4). A bit of a problem as reverting Ubuntu version and file system type won't be easy, and will take time. In retrospect, I wish I had stayed with EXT3 for 6-12 months longer until I was happy it was ok to switch.
  2. Windows - I still use Windows occasionally, and it's generally handy to be able to access your files in Windows. Currently there is no EXT4 driver for Windows. From what I can remember, something like EXTFSD, will work with an EXT3 partition "upgraded" to EXT4. A cleanly formatted EXT4 partition is different though and doesn't currently work. EXT2IFS will only work with EXT3 (and an inode size of 128)

Apart from those issues, I've found EXT4 to be very good, and it does seem quicker (although it's hard to tell). It works very well for the root ("/") partition. For separate home and other partitions though, sticking with EXT3 may be a better idea. I plan on reverting over the next month or so, and will probably stick with EXT3 until Ubuntu 10.04 or even 10.10.

One important note, if using EXT2IFS you want an EXT3 partition with an "inode" size of 128. As of Ubuntu 8.10 onwards it will format EXT3 partitions with an inode size of 256.

Reverting to EXT3

Open up a terminal. Firstly find out the partition you want to revert:

sudo fdisk -l

This will list all of the partition devices. Find the one you want, for example in my case /dev/sda7. Now enter:

sudo tune2fs -l /dev/sda7 | grep Inode

You'll now need to backup all of your files. I had a spare hard drive kicking around to move them their manually using Nautilus. Once moved, you can format the partition. Given that the Ubuntu 8.10 installation disc onwards will format an EXT3 partition with an inode size of 256, you'll need to manually do it yourself via command line:

sudo mke2fs -I 128 -j -t ext3 /dev/sda7

It should only take a minute or so. If you want to you can add "-c" to the command, and it'll run a check on the inode table, but it takes aaaages. My 1TB drive took over 4 hours.

Further Problems

Under Windows XP (SP3 and earlier) both EXT2IFS and EXT2FSD will run without any problems. However, I'm currently running Windows 7 x64.

EXT2IFS will run on Windows 7 x64 whereas EXT2FSD won't. This means I have to have an EXT3 128 inode size formatted partition. It's all currently, just about working perfectly. I, for some reason, can't run .exe's on my mounted EXT3 partition in Windows 7. It looks like a permissions issue related to the EXT2IFS driver. I vaguely remember fixing something similar with Vista (ages back) but have since forgotten. It's currently usable, but still not ideal. I'll post once I find a fix.

Update 23/09/2009

I've now got EXT3 working in Windows 7 x64 without any problems.