Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Extended file attributes: ext4
Date: Fri, 13 Apr 2012 02:24:45
Message-Id: CADPrc81vS-_8YFwp7Yx_mOnkcZvDzHt=K59_G9Ds7pnkazpsKA@mail.gmail.com
In Reply to: Re: [gentoo-user] Extended file attributes: ext4 by Frank Steinmetzger
1 On Thu, Apr 12, 2012 at 5:24 PM, Frank Steinmetzger <Warp_7@×××.de> wrote:
2 > On Sun, Apr 08, 2012 at 01:21:05PM -0500, Canek Peláez Valdés wrote:
3 >
4 >> Note, however, that you *need* GRUB2 if your kernel lives in an ext4
5 >> partition that it's not longer compatible with ext3. Don't do the
6 >> change without migrating to GRUB2 before.
7 >
8 > Hm... I wonder what I’m missing in my setup.  I still run grub-0.97 (I like it
9 > more because it loads faster than Grub 2 ^^).  Anyhoo, I have /boot on my root
10 > partition, and a longer while ago I made the switch from ext3 to ext4 through
11 > backup, reformat and restore.  According to dumpe2fs, I have the following
12 > features enabled on the partition in question:
13 >
14 > has_journal ext_attr resize_inode dir_index filetype needs_recovery extent
15 > flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
16 >
17 > My fstab entry is minimalist:
18 > /dev/sda3       /       ext4    auto    0 1
19 >
20 > So how did I manage to get the system booted with grub 0.97 in the first
21 > place?  I’m not using an “init thingy” BTW. ;-)
22
23 As I said in my last email:
24
25 OK, I went out and did my homework. GRUB legacy upstream doesn't
26 support ext4 partitions (using extents, of course; without extents,
27 they can be mounted as ext3), but Gentoo (as almost any other
28 distribution under the sun) applies a patch to support it. Actually,
29 it applies 37 patches, contained in grub-0.97-patches-1.12.tar.bz2,
30 one of them called 850_all_grub-0.97_ext4.patch, which says:
31
32 Gentoo bug #250829 - Include support for booting from ext4 partitions.
33
34 This is the respun and tested patch adapted from
35 http://code.google.com/p/grub4ext4/ so that it will apply with the
36 rest of the Gentoo patches.
37
38 Tested with:
39 /boot on ext2
40 /boot on ext3
41 /boot on ext4
42 / on ext4 (no seperate /boot)
43
44 Patch ported by Diego E. Pettenò (flameeyes)
45 Testing by Robin H. Johnson (robbat2)
46
47 Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@g.o>
48 Signed-off-by: Robin H. Johnson <robbat2@g.o>
49
50 So mistery solved: GRUB legacy in Gentoo supports ext4, but it differs
51 from upstream. When I was doing research for converting my filesystem
52 to ext4, everywhere I looked it said that GRUB legacy doesn't support
53 ext4... because it doesn't. Gentoo patches the sources, but upstream
54 GRUB legacy does not support ext4.
55
56 So I can finally stop telling people to migrate to GRUB2 if they want
57 to use ext4.
58
59 Regards.
60 --
61 Canek Peláez Valdés
62 Posgrado en Ciencia e Ingeniería de la Computación
63 Universidad Nacional Autónoma de México