Upgrade Ubuntu 8.10 to Ubuntu 9.04 and ext3 to ext4 in 10 Minutes

By Angsuman Chakraborty, Gaea News Network
Friday, April 24, 2009

ubuntu-logoUbuntu 9.04, released yesterday, has got a lot of great new features. One of them is ext4 filesystem. If you don’t know about it yet, ext4 is more useful than you think it is, from the ext3. ext4 filesystem supports large volumes of files, backward compatibility with ext2 and ext3, persistent pre-allocation of on-disk space for a file, delayed allocation, journal checksumming, online defragmentation and many more such things. If that isn’t enough for you, Jaunty Jackalope has been a very fast, powerful and beautiful distro version of Ubuntu that everyone is appreciating. So to avail of the upgrade from your Ubuntu 8.10 to Ubuntu 9.04 and also improve your file system from ext3 to ext4, read the quick  guide.

First you need to upgrade your Ubuntu

1. Upgrade Ubuntu Desktop

  1. Start System/Administration/Update Manager
  2. Click the Check button to check for new updates.
  3. If there are any updates to install, use the Install Updates button to install them, and press Check again after that is complete.
  4. A message will appear informing you of the availability of the new release.
  5. Click Upgrade.
  6. Follow the on-screen instructions.

2. Converting your file system from ext3 to ext4

  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

    [NOTE : the -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.

    e2fsck -fD /dev/DEV

  4. Next, mount the drive

    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. Now reboot the computer and enjoy your new ext4 filesystem

Source: Andrew Lawrence

Discussion

Jacek
May 14, 2009: 11:26 pm

Hi,

This is a nice and concise guide that I appreciate very much. BUT you never wrote if this procedure is safe for your data stored on your /dev/DEV partition! I presume it is, but I think it should be stated explicitly that these commands do not simply wipe the partition and create the new filesystem :)

Bests

Jacek

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :