Here is a tutorial I made to get ext4 working in openSUSE installations.
Before converting or formatting to ext4, consider reading this wiki:
http://en.wikipedia.org/wiki/Ext4
What do you need before you start :
1. A fully working openSUSE 11.1 installation.
Observation: A separated /boot partition is a MUST if you want your / partition ext4, otherwise you wont be able to boot. If you just want your /home partition ext4 its fine then.
2. LiveCD with ext4 (ext4dev) support. -- Systemrescue recommended
3. Paper.
First steps:
Boot your working installation and login as usually. Open an terminal and log as root.
Update your fstab to mount your ext3 partitions with ext4. (or add a new ext4 partition)
Now open fstab with your favorite text editor:
or
or
Quote:
|
# kwrite /etc/fstab # for KDE
|
or
Quote:
|
# gedit /etc/fstab # for GNOME
|
Replace all lines containing ext3 with ext4dev and update all ext4dev mount options with this:
Quote:
...
/your/hd/here / ext4dev noatime,acl,user_xattr,extents,barrier=0,mballoc 1 1
...
|
Your fstab should look something like this:
Before:
Quote:
/dev/sda5 swap swap defaults 0 0
/dev/sda6 / ext3 noatime,acl,user_xattr 1 1
/dev/sda7 /home ext3 atime,acl,user_xattr 1 2
/dev/sda2 /boot ext2 noatime,acl,user_xattr 1 2
/dev/sda1 /windows/C ntfs-3g users,gid=users,fmask=113,dmask=002 0 0
/dev/sdb1 /windows/D ntfs-3g users,gid=users,fmask=113,dmask=002 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
|
After:
Quote:
/dev/sda5 swap swap defaults 0 0
/dev/sda6 / ext4dev noatime,acl,user_xattr,extents,barrier=0,mballoc 1 1
/dev/sda7 /home ext4dev atime,acl,user_xattr,extents,barrier=0,mballoc 1 2
/dev/sda2 /boot ext2 noatime,acl,user_xattr 1 2
/dev/sda1 /windows/C ntfs-3g users,gid=users,fmask=113,dmask=002 0 0
/dev/sdb1 /windows/D ntfs-3g users,gid=users,fmask=113,dmask=002 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
|
Rebuild your INITRD image with ext4 support
Now open with your favorite text editor the /etc/sysconfig/kernel
Quote:
|
# vim /etc/sysconfig/kernel
|
or
Quote:
|
# nano /etc/sysconfig/kernel
|
or
Quote:
|
# kwrite /etc/sysconfig/kernel # for KDE
|
or
Quote:
|
# gedit /etc/sysconfig/kernel # for GNOME
|
Append inside the INITRD_MODULES quotes this:
Quote:
|
INITRD_MODULES="... ext4dev"
|
Your /etc/sysconfig/kernel should like something like this:
Before:
Quote:
...
INITRD_MODULES="processor thermal pata_via sata_via ata_generic via82cxxx ide_pci_generic fan jbd ext3 edd"
...
|
After:
Quote:
...
INITRD_MODULES="processor thermal pata_via sata_via ata_generic via82cxxx ide_pci_generic fan jbd ext3 ext4dev edd"
...
|
Apply the changes (assuming you're using the default kernel):
Its time to convert your ext3 partitions to ext4
Reboot your computer and boot your livecd that supports ext4. Open an terminal and start tuning your system:
Observation: AFTER THE FOLLOWING COMMAND YOU WONT BE ABLE TO MOUNT YOUR PARTITION AS EXT3 ANYMORE, SO MAKE SURE THAT THIS IS WHAT YOU WANT TO DO. Quote:
|
# tune2fs -O extents,uninit_bg,dir_index /dev/sda6 # repeat this with all ext3 partitions you want to convert, except /boot partitions |
This tunning activates the ext4 features.
Quote:
|
# tune2fs -E test_fs /dev/sda6
|
THIS IS IMPORTANT, openSUSE kernel only supports the experimental ext4 version and if you do not set that flag, you wont be able to boot. Even though it says experimental it doesnt mean its unstable. The official ext4 support is in the 2.6.28 kernel series. Even if you upgrade to the newest kernel there is a backward compatibility that will let you mount ext4dev partitions with the official and supported ext4.
Quote:
|
# tune2fs -I 256 /dev/sda6
|
*Phew*
After all the tweaking and tuning we must turn the file system back to a consistent state.
This may take a while depending in your partition size.
If you want to format a partition with ext4 to use with openSUSE just type:
Quote:
|
# mkfs.ext4dev /dev/the_partition_you_want_to_format
|
Reboot your computer. Enjoy!
NOTES: Commands starting with "$" means run as user and "#" means run as root.
Feel free to post your experiences or feedback here.