Go Back   NGOHQ.com / Software / Operating Systems

Reply
 
Old December 29th, 2008, 01:46 PM   #1
Professional Member

Posts: 426
CPU: 1
GPU: 1
M/B: 1
RAM: 1
PSU: 1
Default openSUSE 11.1 and ext4

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.
Quote:
$ su - 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:
Quote:
# vim /etc/fstab
or
Quote:
# nano /etc/fstab
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):
Quote:
# mkinitrd
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:
Quote:
$ sudo su - root
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.
Quote:
# fsck -pf /dev/sda6
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.
xiaomhome is offline   Reply With Quote
Old December 29th, 2008, 02:28 PM   #2
Stuck in "April 1st"

Posts: 3,199
CPU: Intel E8400
GPU: Geforce 8800GT
M/B: Asus Rampage Formula
RAM: G.Skill 2x2GB PI Black
PSU: PCP&C Silencer 750w
Default

What kernel are you on? I was under the impression that EXT2 is getting the axe in 2.6.28, so you will have to convert that boot partition (thankfully it's an easy procedure). In case anyone is wondering none of this is required for fresh installs.
__________________
IQ, when aggregated, follows Ohm's law.

Unixlord is offline   Reply With Quote
Old December 29th, 2008, 11:54 PM   #3
Professional Member

Posts: 426
CPU: 1
GPU: 1
M/B: 1
RAM: 1
PSU: 1
Default

Linux LPC 2.6.27.7-9-default #1 SMP 2008-12-04 18:10:04 +0100 x86_64 x86_64 x86_64 GNU/Linux
xiaomhome is offline   Reply With Quote
Old December 30th, 2008, 01:28 PM   #4
Site Staff

Posts: 12,890
CPU: Intel Core i7-965
GPU: ATI Radeon HD 4870
M/B: Intel DX58SO
RAM: 6Gb of A-DATA
PSU: X-Spice 630w
Default

That's really cool. Any FS benchmarks yet?
Regeneration is offline   Reply With Quote
Old December 30th, 2008, 02:22 PM   #5
Stuck in "April 1st"

Posts: 3,199
CPU: Intel E8400
GPU: Geforce 8800GT
M/B: Asus Rampage Formula
RAM: G.Skill 2x2GB PI Black
PSU: PCP&C Silencer 750w
Default

Phoronix did benchmarks of an earlier testing version a while ago. Results were promising. They're bound to test the recent stable release in due time.
__________________
IQ, when aggregated, follows Ohm's law.

Unixlord is offline   Reply With Quote
Old December 30th, 2008, 03:33 PM   #6
Professional Member

Posts: 426
CPU: 1
GPU: 1
M/B: 1
RAM: 1
PSU: 1
Default

Quote:
Originally Posted by Regeneration View Post
That's really cool. Any FS benchmarks yet?
First benchmark mde in October 21 2006 by Linux Insight:
http://www.linuxinsight.com/first_be...le_system.html

Benchmark made in December 03 2008 by Phoronix.
http://www.phoronix.com/scan.php?pag...nchmarks&num=1
xiaomhome is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off








Copyright © NGOHQ.com - All rights reserved
Reproduction in whole or in part in any form or medium
without written permission of the site's owners is prohibited.
Powered by vBadvanced and vBulletin from Jelsoft
Copyright © 2000-2007 Jelsoft Enterprises Limited
Search Engine Friendly URLs by vBSEO 3.3.2

Contact Us - Archive - NGOHQ.com - NGOHQ.org - NGOHQ.net - Disclaimer - Top