Here is how to use EXT4 with OpenSuse 11.0.
10,00 foot overview
1. New installation of OpenSuse 11.0 with separate /boot mount point on ext3 and a / mount point formatted on ext3.
2. Install the latest development kernel from the OpenSuse repository (2.6.27-rc) or download, patch and compile the latest stable kernel 2.6.26.5.
3. configure your environment for ext4. (update fstab file, update the initrd with the jbd2 and ext4dev modules and update to e2fsprogs 1.41)
4. use tune2fs to convert your / mount point to ext4
Step 1: New Installation of OpenSuse with at least a 100MB /boot mount point configured. If you already have a separate /boot, then skip. (In my tests, grub had issues with ext4 files.)
Step 2: Install the latest dev kernel from Index of /repositories/Kernel:/Vanilla/openSUSE_11.0
BIG NOTE !!
I had troubles with the 2.6.27 kernel, specifically with Nvidia drivers and vmware but if you don't have closed source issues, then the dev kernel is the fastest way to go. (you'll still have to update your initrd for the jbd2 and ext4dev modules)
For me, I compiled the latest stable kernel, 2.6.26.5. (if the 2.6.27 dev kernel floats your boat then skip to the bottom)
all the following procedures are done as root
1. download the full kernel source from kernel.org and extract the tar into /usr/src
2. download the 2.6.26-ext4-7 patch from Main Page - Ext4
3. extract 2.6.26-ext4-7.gz to /usr/src and apply the patch to the kernel source
type
patch -p1 < 2.6.26-ext4-7
(this patch back ports the most up to date ext4 source code from 2.6.27)
4. compile your kernel
type
cd /usr/src/linux-2.6.26.5
make mrproper
zcat /proc/config.gz > .config
make menuconfig
At this point you can make changes to your kernel. Don't make radical changes unless you know what you are doing. I suggest you leave it at the defaults. The only changes I would consider making would be:
Processor type and features ---> Processor Family -> select your CPU
(if your system is a desktop)
Processor type and features ---> Timer freqency -> 1000HZ
General setup ---> Local version --> your custom name. dont forget a leading -
The above is useful for naming your kernel builds. example - if you enter the string "-default", then your kernel will be named 2.6.26.5-default. The rest of these instruction assume this string is set to -default
Exit menu config and save your changes if you made any.
type
make
Get up and make yourself a snack as this may take a while depending on your hardware.
type
make modules
make modules_install
Your new kernel is built now we need to get it installed.
note the -default custom name in this example. Change if needed to your custom name
type
cp arch/`uname -i`/boot/bzImage /boot/vmlinuz-2.6.26.5-default
cp System.map /boot/System.map-2.6.26.5-default
cp .config /boot/config-2.6.26.5-default
Now we need to generate your initrd
edit the INITRD_MODULES= line in your /etc/sysconfig/kernel file
to look like the following
INITRD_MODULES="processor thermal ata_piix fan jbd ext3 edd jbd2 ext4dev"
now type
mkinitrd -k vmlinuz-2.6.26.5-default -i initrd-2.6.26.5-default
The kernel is almost installed!
Now we need to update grub.
Enter yast → system → boot loader
highlight your default openSUSE 11.0 – 2.6.25.x kernel entry
select add → clone selected section
Give it a name such as openSUSE 11.0 – 2.6.26.5-default
Browse to your kernel image /boot/vmlinuz-2.6.26.5-default
Browse to your Initial RAM Disk /boot/initrd-2.6.26.5-default
keep all the other fields the same
select OK
Reboot your system and test your new kernel
If your kernel boots up, then congrats!
Lets setup EXT4
download and install version 1.41 of e2fsprogs from
Index of /repositories/Base:/build/standard
edit your /etc/fstab
find the line for your / mount point and other ext3 mount points you want to convert to ext4
(do not change your /boot mount point to ext4)
change the text on those lines from ext3 to ext4dev
example
/dev/disk/by-id/scsi-SATA_Hitachi_HTS7210_MPCCN8Y3HGM8YL-part1 / ext3 acl,user_xattr 1 1
to
/dev/disk/by-id/scsi-SATA_Hitachi_HTS7210_MPCCN8Y3HGM8YL-part1 / ext4dev acl,user_xattr 1 1
reboot your box into your vanilla kernel
if it boots up, then you are almost done!
Type
df -h
you will see an output such as this
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 54G 23G 29G 45% /
udev 1013M 120K 1013M 1% /dev
/dev/sda1 99M 32M 63M 34% /boot
note the /dev/sda3 for the / mount point
(yours will be different depending on your mount point layout and hardware)
now type (running the following two commands is the point of no return on that file system, it will be forever ext4)
tune2fs -O extents -E test_fs /dev/sda3
tune2fs -I 256 /dev/sda3
(change the /dev to your specific mount point device from the output of df -h)
Go back into yast and set the vanilla kernel as the default and reboot your box
optional:
you can add the following mount point options to your fstab file for performance reasons
extents,barrier=0,mballoc
Enjoy your ext4 'ness
[1] forums.opensuse.org/install-boot-login/393039-ext4-opensuse.html