Tuesday, April 28, 2009

Upgrade Ext3 File System To Ext4 File System In Jaunty

Hard Disk

Image by Air Force One via Flickr

Most of you have installed Jaunty by now. Some might have decided to experiment with the bleeding edge Ext4 which offers benefits:

The biggest advantage to ext4 is the support for larger volumes (up to 1 exabyte) and larger files (16 terabytes). There are other improvements that ext4 regarding allocation. Both pre-allocation and delayed allocation have been added. These improvements deal with how space is allocated for files. The former will boost performance for systems like streaming media and databases. The latter will improve fragmentation.

To those of you regretting not enabling Ext4 here is how you can convert your Ext3 into Ext4 without reinstalling.


Note: This thing can be only by those with super geek powers. If you are new to Linux wait till Ubuntu 9.10, which will come with Ext4 baked in.



1. Boot the computer from the Ubuntu 9.04 Desktop CD.

2. Once you are booted into the live environment, run the following command replacing /dev/DEV with the drive partition that you want to upgrade.

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

[where O is the capital letter O, not zero]

3. You then need to run fsck to fix up some on-disk structures that tune2fs has modified. Run the following command:

e2fsck -fD /dev/DEV

4. Next, mount the drive. Run the following command:

mount -t ext4 /dev/DEV /mnt

5. Edit fstab and change ext3 to ext4 on the drive you upgraded.

UUID=xxxx / ext4 relatime,errors=remount-ro 0 1

6. Finally, you need to run grub-install on your new partition. The version of grub that shipped with Ubuntu 8.10 cannot boot from ext4 partitions so if you skip this step, your computer won’t boot.

grub-install /dev/DEV –root-directory=/mnt –recheck

7. Reboot to see the effect.

1 comment:

  1. I am running Ubuntu 9.10 having upgraded from 9.04.
    Are they any changes to the instructions above to upgrade my Ext3 system file system to Ext4?
    I am thinking about the last step in particular (grub install bit).


Note: Only a member of this blog may post a comment.

Related Content

Related Posts with Thumbnails