You are not logged in.

#26 2008-12-27 15:41:38

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

andre.ramaciotti wrote:

@dhave
On (1) you say you almost needed your backups. On which step did this happen?

Well, since you asked, I did several things wrong:

(1) I didn't initially add ext4 to my mkinitcpio.conf before installing kernel26 from testing. For this reason, I believe, my kernel wouldn't properly recognize my ext4 /boot partition, and it would panic. The fallback would boot, however, as long as I appended "rootfstype=ext4" to the kernel line at boot time when running grub.

(2) Before I realized that I needed to add ext4 to mkinitcpio.conf, I thought I could fix things by upgrading to grub2. However, this actually made matters worse, since I had trouble installing grub2 to my MBA. For a few tries I went back and forth from grub2 to grub1, using a rescue CD and chrooting into my Arch installation to reinstall grub. At one point, my system wasn't at all bootable, and I thought I would need to restore my backups. Then finally I managed to convince my kernel to recognize my ext4 /boot partition, get grub1 installed properly, get my menu.lst back in place, and life is good again.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#27 2008-12-27 16:36:39

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Getting ready for ext4

I really think that people should not be exorted to use grub2. There are many machines where it simply does not work (and also where it works it does not offer any sensible new feature, except ext4 support - for which it is much easier to have a separate boot partition, or to use lilo)


Mortuus in anima, curam gero cutis

Offline

#28 2008-12-27 17:25:54

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: Getting ready for ext4

patroclo7 wrote:

I really think that people should not be exorted to use grub2. There are many machines where it simply does not work (and also where it works it does not offer any sensible new feature, except ext4 support - for which it is much easier to have a separate boot partition, or to use lilo)

Grub2 works fine for me.

Anyway, I am still having the problem I mentioned earlier, even when booting from my custom 2.6.28's fallback init image (made exactly the same way as the kernel26-fallback image is made).

Offline

#29 2008-12-27 18:20:57

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 702

Re: Getting ready for ext4

I don't see any reason why one should use Ext4 for his/her /boot filesystem. Mine is about 50 MB and Ext2 is making a very good job on it. Really, why? All these new features won't do any good for such a small partition which is needed and accessed almost only during start-up.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#30 2008-12-27 18:24:30

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

Zibi1981 wrote:

I don't see any reason why one should use Ext4 for his/her /boot filesystem. Mine is about 50 MB and Ext2 is making a very good job on it. Really, why? All these new features won't do any good for such a small partition which is needed and accessed almost only during start-up.

I agree entirely.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#31 2008-12-27 19:39:11

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Getting ready for ext4

All this is making me think about optimizing my partition configuration:

Now i have it ike this (and in this order):

Master / ext3 8 Gb
Logical swap 768 Mb (I dont know if this amount is ok, in a 1 Gb RAM laptop in which i virtualize with virtualbox)
Logical /home ext3 100 Gb

But i was yhinking in making something like this:

Master? /boot ext2? 50Mb?
Master / ext4 12Gb
Logical swap 768 Mb
Logical /home ext4 100Gb (The rest of the disk)


Would this configuration be enough and wel done? I ask it because i saw somewhere people that does a lot of partitions, for /lib i.e., etc....

Kind of bit off-topic, but it comes to the subject when you see the title of this thread: I actually want to get my system ready for when i impelent ext4.....

Last edited by Xi0N (2008-12-27 19:40:08)

Offline

#32 2008-12-27 22:16:33

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: Getting ready for ext4

andre.ramaciotti wrote:

@dhave
On (1) you say you almost needed your backups. On which step did this happen?

NOTE: The step just above may not be necessary, but, after a false start earlier, before I realized I had to add "ext4" to the modules line in mkinitcpio.conf, I found that this line added to menu.lst enabled me to boot into my fallback kernel. Then I could make changes to fix everything else. Long story; I won't go there now.

I am guessing somewhere around here ^^^. In all honesty though, dhave has done a good job at getting this conversion wrote up into something that could serve as a wiki page.

Offline

#33 2008-12-27 22:54:45

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

Re: Getting ready for ext4

Would changing ext3 to ext4 in /etc/fstab work for my /home partition?
(Obviously I won't get some features but, would mounting as ext4 still work?)

Offline

#34 2008-12-28 00:11:40

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

Arm-the-Homeless wrote:

Would changing ext3 to ext4 in /etc/fstab work for my /home partition?
(Obviously I won't get some features but, would mounting as ext4 still work?)

Based on this paragraph from the kernelnewbies page on ext4, I'd say what you propose would work as you describe, though I haven't tried it myself. Here's the pertinent paragraph:

You can mount an existing Ext3 filesystem with Ext4 but without using features that change the disk format. This means you will be able to mount your filesystem with Ext3 again. You can mount an existing Ext3 filesystem with "mount -t ext4 /dev/yourpartition /mnt". Doing this without having done the conversion process described in the previous point will force Ext4 to not use the features that change the disk format, such as extents, it will use only the features that don't change the file format, such as mballoc or delayed allocation. You'll be able to mount your filesystem as Ext3 again. But obviously you'll be losing the advanges of the Ext4 features that don't get used.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#35 2008-12-28 07:43:37

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: Getting ready for ext4

I sucessfully converted my / and /home to ext4 using the tips from @dhave (thanks especially for mentioning that ext4 had to be put in the modules="" in mkinitcpio.conf). Where can I get the e4defrag/ext4defrag utility. I woul like to convert all the files on my partitions to use extents?


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

#36 2008-12-28 07:50:11

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

kishd wrote:

I sucessfully converted my / and /home to ext4 using the tips from @dhave (thanks especially for mentioning that ext4 had to be put in the modules="" in mkinitcpio.conf). Where can I get the e4defrag/ext4defrag utility. I woul like to convert all the files on my partitions to use extents?

From the kernelnewbies page on ext4:

Online defragmentation

(This feature is not available in 2.6.28, but will be probably available in the next release). ... Ext4 will support online fragmentation, and there's a e4defrag tool which can defragment individual files or the whole filesystem.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#37 2008-12-28 15:14:15

alessandro_ufms
Member
From: Campo Grande, MS - Brazil
Registered: 2008-06-25
Posts: 153

Re: Getting ready for ext4

I follow dhave guide for testing on VirtualBox. After the steps grub don't load property. I use grub legacy. This messages appears:

[ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ]
grub>

I run following commands on grub prompt and I have:
grub> find /boot/grub/menu.lst
(hd0,1)
grub> root
Filesystem type is ext2fs, partition type 0x83
Is correct EXT2 here?
Running setup hd(0) is done without error.

My menu.lst:
title  Arch Linux
root   (hd0,1)
kernel /boot/vmlinuz26 root=/dev/sda2 ro rootfstype=ext4
initrd /boot/kernel26.img

Any sugestions?

Last edited by alessandro_ufms (2008-12-28 15:15:34)

Offline

#38 2008-12-28 16:29:54

grndrush
Member
From: Hamilton, Ontario, Canada
Registered: 2003-12-28
Posts: 136
Website

Re: Getting ready for ext4

Online defragmentation

(This feature is not available in 2.6.28, but will be probably available in the next release). ... Ext4 will support online fragmentation, and there's a e4defrag tool which can defragment individual files or the whole filesystem.

ALL O/S'es and filesystems support online *fragmentation*, LMAO!!! That's actually one of Linux' weaker points (it is slower to fragment a filesystem, than O/S'es produced by, say, YOU KNOW who).  smile

Offline

#39 2008-12-28 16:58:31

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

grndrush wrote:

Online defragmentation

(This feature is not available in 2.6.28, but will be probably available in the next release). ... Ext4 will support online fragmentation, and there's a e4defrag tool which can defragment individual files or the whole filesystem.

ALL O/S'es and filesystems support online *fragmentation*, LMAO!!! That's actually one of Linux' weaker points (it is slower to fragment a filesystem, than O/S'es produced by, say, YOU KNOW who).  smile

Ha! I didn't notice that. Well, it's better to be honest. At least Linux doesn't support viruses and malware as effectively as Windows does.:P


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#40 2008-12-28 16:59:17

grndrush
Member
From: Hamilton, Ontario, Canada
Registered: 2003-12-28
Posts: 136
Website

Re: Getting ready for ext4

Xion wrote:

Master /boot ext2 50Mb
Master / ext4 12Gb
Logical swap 768 Mb
Logical /home ext4 100Gb (The rest of the disk)


Would this configuration be enough and wel done? I ask it because i saw somewhere people that does a lot of partitions, for /lib i.e., etc....

What you have listed above is pretty much exactly what I do (I complicate things a bit, but the end result is the same). I'm sure it's just OCD, but I like to have them is this order:

swap
/
/home

with /boot at either the beginning OR the end (the more logical choice, actually) of the drive. This arrangement SEEMS to me to optimize HDA head movement.

I've broken things up more in the past and it's not worth it, for the most part. You end up wasting so much space (and resources) having a dozen partitions open, and leaving adequate space on each partition means a LOT of net wasted space (I use LVM2...). And then KDE moves everything from /opt to /usr and your grand scheme either wasted a HUGE amount of disk previously, or won't have enough now!

One big pool seems to work best for me, plus /home, and I also have a separate partition (never heard of others doing this, but it works well for me) for /var/cache/pacman. Optimize it for large file access (and a fairly small number of files), and optimize  /  for a larger number of smaller files. /var is kindof a weird animal - /var/cache/pacman's needs tend toward large-file access (ie, XFS), as does /var/log, while the remainder of /var is largely small files. Taking /var/cache/pacman off  /  makes things MUCH more manageable, IMNSHO, without overly complicating things.

Note there are a good number of root directories required to complete booting the kernel; these CANNOT be on a separate filesystem. /lib is one of them, as are /bin, /sbin, /root, /etc (, /dev, /proc, /sys...)...pretty much the obvious suspects.

Offline

#41 2008-12-28 17:48:31

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: Getting ready for ext4

I run following commands on grub prompt and I have:
grub> find /boot/grub/menu.lst
(hd0,1)
grub> root
Filesystem type is ext2fs, partition type 0x83
Is correct EXT2 here?
Running setup hd(0) is done without error.

My menu.lst:
title  Arch Linux
root   (hd0,1)
kernel /boot/vmlinuz26 root=/dev/sda2 ro rootfstype=ext4
initrd /boot/kernel26.img

Yeah, if /boot is on a seperate partition other then the / partition, you need to remove the /boot from the kernel and initrd lines.

title  Arch Linux
root   (hd0,1)
kernel /vmlinuz26 root=/dev/sda2 ro rootfstype=ext4
initrd /kernel26.img

If /boot is not on a seperate partition from / and / is ext4 you will need to use grub2 or compile grub legacy with patches for ext4 support.

Last edited by jacko (2008-12-28 17:50:57)

Offline

#42 2008-12-29 12:48:56

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: Getting ready for ext4

by the way - e2fsprogs included in the arch image 2008.12 do NOT support fsck.ext4.
i ran into this while trying to convert my root fs. a quick pacman -Sy e2fsprogs from liveusb solved that though

Offline

#43 2008-12-29 13:34:33

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

schuay wrote:

by the way - e2fsprogs included in the arch image 2008.12 do NOT support fsck.ext4.
i ran into this while trying to convert my root fs. a quick pacman -Sy e2fsprogs from liveusb solved that though

Good to know. Thanks.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#44 2008-12-29 14:58:31

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: Getting ready for ext4

The e2fsprogs on the Ubuntu 8.10 live cd supports ext4 and as a nice plus gparted can be loaded to make sure the drive assignments are correct before converting so as to avoid converting the /boot partition where grub is installed.


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

#45 2008-12-29 21:24:41

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: Getting ready for ext4

edit: disregard this post, see below

i took the plunge and converted the partition containing /boot to ext4.

it works using the new grub version from testing, but only when i use the fallback initcpio. when i boot from my default option it gives me

ACPI: Aborded because bad gzip magic numbers.

I regenerated the default initcpio using

sudo mkinitcpio -g initcpio
sudo mv initcpio /boot/kernel26.img

and added

rootfstype=ext4

to both boot kernel lines.
ext4 was also added to the mkinitcpio.conf modules line.

anybody know what could be the problem?

edit: putting the filesystems hook before autodetect in mkinitcpio.conf changes the error to "Error 24: Attempt to access block outside partition"

Last edited by schuay (2008-12-30 13:52:24)

Offline

#46 2008-12-29 22:27:41

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Getting ready for ext4

schuay wrote:

anybody know what could be the problem?

edit: putting the filesystems hook before autodetect in mkinitcpio.conf changes the error to "Error 24: Attempt to access block outside partition"

mkinitcpio is not able to detect ext4 devices for now. I think it is fixed in git already, so just wait for a new release, or temporarily remove the autodetect entry from your mkinitcpio.conf

Offline

#47 2008-12-29 23:24:27

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

Ext4 is working fine on my Arch64 system. Here're some details of my configuration.

In my mkinitcpio.conf, I've got the following modules and hooks lines:

MODULES="pata_acpi ext4 ata_generic scsi_mod ahci ata_piix"
HOOKS="base udev autodetect pata scsi sata usb fw keymap encrypt filesystems"

In my /boot/grub/menu.lst (grub legacy), I've got this for my kernel line:

kernel /vmlinuz26 rootfstype=ext4 root=/dev/sda3 ro

My kernel is ARCH 2.6.28-1, compiled after adding ext4 to the modules line of mkinitcpio.conf, of course.
And the hard drive partitions in my fstab look like this:

/dev/sda1 /boot  ext2  defaults 0 1
/dev/sda2  swap  swap  defaults 0 0
/dev/sda3 /      ext4  defaults 0 1
/dev/sda4 /home  ext4  defaults 0 1

Last edited by dhave (2008-12-29 23:32:06)


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#48 2008-12-30 10:06:34

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: Getting ready for ext4

edit: disregard this post, see below

yep dhave but you still have /boot on an ext2 partition. my boot is on ext4, that's what's causing the problem with the default initcpio. fallback works though for now, will boot with that until the new mkinitcpio version is in the repos

Last edited by schuay (2008-12-30 13:52:40)

Offline

#49 2008-12-30 11:18:15

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Getting ready for ext4

Duh. I didn't see that you said upfront that you had converted /boot to ext4. I'm thankful for the brave ones like you!


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#50 2008-12-30 13:57:35

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: Getting ready for ext4

edit: reported to be working after running grub-install

i played around some more.
bad news - even the new grub cannot boot from ext4.

booting from the fallback initcpio works only because i didn't modify it since converting the FS to ext4.

i tried generating the default image the same way as fallback (mkinitcpio -S autodetect)
i even copied the fallback image (cp /boot/kernel26-fallback.img /boot/kernel26.img)

both gave me "24: Attempt to access block outside partition".

seems like booting from fallback only works because tune2fs + fsck do not modify the currently existing files to use new ext4 features.. going to redo my partition setup now and add an ext2 /boot partition.

maybe i made a stupid mistake somewhere.. copying the fallback.img seems pretty foolproof though

Last edited by schuay (2008-12-30 17:28:32)

Offline

Board footer

Powered by FluxBB