Convert ext3 partition to ext4 partition

Posted: March 8, 2010 in Linux, Ubuntu

I have an ext3 partition full of data (/dev/sda3) and want to used it with Ubuntu 10.04 (which I plan to used with it’s ext4 partition), there is no way I can backup a 250GB data because I didn’t have a backup media available at that time.

So the only option is to convert the ext3 partition to ext4 partition, here’s what I did.

(1) Fireup Ubuntu 10.04 from my usb-flashdisk and continue with live session.

(2) Open a terminal program

(3) Run a filesystem check on it to make sure it is in sane condition.

fsck.ext3 -pf /dev/sda3

(in your case if it’s mounted, don’t forget to unmount it: umount /dev/sda3)


(4) Enable new features of ext4 on the filesystem

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


(5) Run a filesystem check. to make sure that the filesystem is now clean.

fsck.ext4 -pf /dev/sda3

(if it said you have to run it manually do it like this: fsck.ext4 -y /dev/sda3)


(6) Done.

(7) Note: If you converting a partition for your system, edit your /etc/fstab accordingly, replace “ext3” with “ext4” for /dev/sda3. Other options may differ for your system.

/dev/sda3  /home ext4 defaults 0 2

Advertisements
Comments
  1. cat says:

    sorry. er… I feel like doing some spell check.. LOL ^^v

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s