klibc

Upgrading my laptop to ext4

Sunday, March 15th, 2009 | debian, english, howto | 3 Comments

Warning: Don’t upgrade root partition (/) or the partition in which /boot is placed unless you know what you are doing. More on this later.
Warning2: Make backups of your data.

Last Friday I went on upgrading to ext4 my laptop. I decided to go first with /home partition, as / has also /boot and can give some problems if not handled with care. Upgrading it is quite easy, and fast, as the old data is not upgraded, only new files will be added using new features.

First, I installed latest linux-image package to start using kernel version 2.6.28, which includes production ready ext4 support. After rebooting, I logged in as root so I could umount /home. The steps to upgrade are as follows:

# uname -a
Linux gimli 2.6.28-1-686 #1 SMP Mon Feb 23 03:13:24 UTC 2009 i686 GNU/Linux
# umount /home
# tune2fs -O extents,uninit_bg,dir_index /dev/home_partition
# fsck -pfD /dev/home_partition
# mount /home

You MUST run fsck. If not, ext4 won’t mount your filesystem, so don’t forgive this step if you’re upgrading your / partition. You will see some checksums errors appear. Don’t be afraid, that’s expected, and that’s why -p is added to fsck command, you it is not asking which action to perform in every error.

Upgrading partition containing /boot
For upgrading your / partition you have to take into account what grub and klibc version you have installed. The former is need so grub can read your kernel image from filesystem, and the second is needed due a bug that made initramfs detect ext4 filesystems as ext3, and passing incorrect option to mount, which failed. Versions in Debian known to work are libklibc >=1.5.15-1 and grub2 (packaged as grub-pc). Make sure you have these versions installed before trying to go to ext4.
Also, as you have to upgrade having your partition unmounted, you will have to get a console before root partition is mounted. You can do that by passing mount=break break=mount to your boot options in grub.

ENJOY!

Tags: , , , , , ,

Meta

Search



Free web hostingWeb hosting