You are viewing perbu

 
 
24 March 2009 @ 07:56 pm
ext4 and the Jaunty Jackalope  
I've been longing for ext4 for a long time now. ext3 has a really broken implementation of fsync(2). Each fsync() turns into a sync(). If there is some activity on the file system your computer will slow to a halt. firefox uses sqlite and sqlite uses fsync() quite a lot. Ubuntu 9.04 will be released in about a month. I thought I might help out and test it and finally get a sane fsync(). Thirdly there a few really annoying bugs in Ubuntu 8.10 I hoped would be fixed. Great, I thought.

Upgrading is really quite simple. "sudo upgrade-manager -d" in a shell, press "next" a few times and you're done. If you're really crazy you want to convert file systems to ext4 as well, here is how you can do this.

First, find some sort of live linux distribution. I prefer PLD rescue. It's small, fast and it has all the tools and file systems you'll need. Make sure it supports ext4. If you don't want to convert your root file system you can skip this.

Boot the rescue system and get a root shell. Now you need to enable all the features that turn an ext3 system into a ext4 system:
# tune2fs -O extents,uninit_bg,dir_index /dev/DEVICE

Replace DEVICE with the real name of your, uhm, device. tune2fs did tell you that you'll need a fsck after you enabled the new features.

# e2fsck -fyD /dev/DEVICE


Rince and repeat for every filesystem on the system. Do a search/replace ext3/ext4 in /etc/fstab afterwards. Now you can reboot. You don't have to fuzz with the initramfs since the nice Ubuntu people finally built the ext4 support into the kernel. I guess they did this to save time on boots - but the fact that the whole system now autodetects what kind of root file system you have doesn't hurt.

Eject the live CD and reboot. Voila!
 
 
 
( 3 comments — Leave a comment )
(Anonymous) on March 25th, 2009 12:17 am (UTC)
Exploded yet?
perbuperbu on March 25th, 2009 06:09 am (UTC)
No. ext4 is fast and stable. The only Issue I've had with Jaunty is this: https://bugs.launchpad.net/bugs/348022 - but the work around is OK.

Its a lot better then Intrepid on this stage, at least on an X60.
perbuperbu on March 28th, 2009 05:36 pm (UTC)
Exploded!
The system exploded. Todays dist-upgrade left the system unbootable. There where two issues:
1) ext4 support seems to have been dropped from the kernel. I now need a the ext4 module loaded. "echo ext4 >> /etc/initramfs-tools/modules && update-initramfs -u" as root fixed this.

2) Some strange grub weirdness. I'm not quite sure what went wrong but reinstalling the boot sector on my harddrive fixed it - thats "grub-install /dev/sda" for most people.
( 3 comments — Leave a comment )