Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: grub fs support
Date: Tue, 27 Jan 2009 06:33:12
Message-Id: pan.2009.01.27.06.32.55@cox.net
In Reply to: Re: [gentoo-amd64] Re: grub fs support by Bob Sanders
1 Bob Sanders <rsanders@×××.com> posted 20090126230132.GI43269@×××.com,
2 excerpted below, on Mon, 26 Jan 2009 15:01:32 -0800:
3
4 > Saphirus Sage, mused, then expounded:
5 >> Beso wrote:
6 >> > 2009/1/26 Nikos Chantziaras <realnc@×××××.de>:
7 >> >> Bob Sanders wrote:
8 >> >>> Morgan Wesström, mused, then expounded:
9 >> >>>
10 >> >>>>> I answered that initially. Grub does not support ext3 or ext4.
11 >> >>>>>
12 >> >>>> # mount | grep boot
13 >> >>>> /dev/sda1 on /boot type ext3 (rw,noatime)
14 >> >>>>
15 >> >>>> GRUB working fine with ext3 here...
16 >> >>>> /Morgan
17 >> >>>>
18 >> >>> For now. Grub supports ext2. It may or may not work properly with
19 >> >>> journaled file systems, depending upon phase of the moon, current
20 >> >>> tide level, etc.
21 >> >>>
22 >> >> It works 100% with ext3 because ext3 is compatible with ext2, both
23 >> >> for read as well as write operations. It's not dependant on tide or
24 >> >> moon or the super bowl. It works, all the time, 100% correctly,
25 >> >> with no side effects, no downsides and no bugs.
26 >> >>
27 >> > and also with reiserfs v3. as i've said i've been using it with
28 >> > reiserfs for more than 3 years and haven't had an issue. saying
29 >> > that it only supports ext2 sounds a little strange. maybe Bob was
30 >> > trying to say that the official grub team officially support only
31 >> > ext2. this is different from saying that grub only supports ext2.
32 >> >
33 >> If you try hard enough, you could probably eventually get it to support
34 >> anything, but the only filesystem I've heard of grub supporting is
35 >> ext2. Granted, ext3 works, as we've pointed out and as I've checked the
36 >> configuration on one of my computers has confirmed. But, everything
37 >> I've heard suggests that grub doesn't officially support other file
38 >> systems, other than ext2.
39 >>
40 >>
41 > From the Grub online manual -
42 >
43 > Support multiple filesystem types transparently, plus a useful explicit
44 > blocklist notation. The currently supported filesystem types are BSD
45 > FFS, DOS FAT16 and FAT32, Minix fs, Linux ext2fs, ReiserFS, JFS, XFS,
46 > and VSTa fs.
47 >
48 > I can give examples where is doesn't work with XFS.
49 >
50 > I haven't seen it fail with ext3, but I've not tested all configs.
51
52 First, Bob, specifically which "online manual"? Do you mean the manpage,
53 the infopages, or a specific manual at the official site, and if it's the
54 manpage or infopages, are you talking Gentoo's which may be patched to
55 reflect the patches Gentoo applies, or the official versions, and if you
56 mean official online, were you looking at the GRUB-2 official or
57 GRUB-0.97 official?
58
59 Not that I doubt you, but if we're quoting official position, it's nice
60 to have a reference to cite, and it makes a difference whether we're
61 talking what upstream calls "legacy" grub, 0.97, or grub 2, supposedly
62 where all the new work is going.
63
64 Unfortunately, grub 2 isn't officially released yet and AFAIK, wasn't
65 even frozen to new features until December or so. AFAIK, there's a lot
66 of stuff that isn't "officially" supported in "legacy" grub and never
67 will be as it's in strictly maintenance mode, no new features at all, tho
68 there's reasonably well tested patches that pretty much all distributions
69 apply that add the missing functionality, because grub 2 has been way too
70 far from stable to even /think/ about shipping in a "supported" release,
71 but "legacy" grub, without patches, simply breaks on a lot of the newer
72 installations, including "huge-file" and "huge-fs" ext2/3, the ext3
73 journal, ext4 (with extents) and reiser4 entirely, etc.
74
75 Meanwhile, what I expect the problem is with ext3, and why most people
76 never see it, is that while grub (legacy) has original ext2 support, it
77 doesn't replay the journal before trying to use the filesystem. Normally
78 this won't be a problem, particularly on separate /boot partitions that
79 aren't mounted by default, because the journal is played back and
80 everything merged upon normal unmount. However, in the narrow case where
81 something grub uses at boot was changed and logged, but the system
82 crashed before the log was played back and the filesystem fully
83 reconciled, THEN there might be a problem, because grub doesn't know
84 about the journal and doesn't play it back, so it would be trying to use
85 old and outdated information. If it's just a new kernel and the old one
86 wasn't deleted (as should always be the case until the new one's tested,
87 but...), grub should still be able to find the old kernel and boot it, no
88 harm, no foul. But if grub can't find something critical like its
89 stage-2 because it moved and the log wasn't synced... better hope you
90 have an alternate boot method!
91
92 AFAIK something similar applies to reiserfs. Grub supports the basics,
93 maybe even the reiserfs log I'm not sure, but last I knew anyway, it
94 didn't support reiserfs' default tail-packing. Officially, one was
95 supposed to always mount a reiserfs grub based boot partition with the no-
96 tail option.
97
98 Now I run reiserfs on everything here, even /boot even tho I'd ordinarily
99 put ext2 on /boot, because with nothing running ext2/3, I don't have to
100 compile or load it. (In actuality, I do still compile it as a module,
101 much like FAT and ISO9660, to use with removable media only. However,
102 none of the three, fat/iso9660/ext2, are loaded by default, only when I'm
103 playing with removable media that needs them.) And, I don't bother with
104 no-tail on anything, including /boot. Most of the time it works just
105 fine, but I run the -rc and often git kernels, sometimes rebuilding,
106 installing and rebooting to test the new kernel a dozen or more times in
107 a day, when I'm doing a git-bisect to trace down a bug, so I do a LOT of
108 kernel installs, way more than most people do, and with all those
109 installs, twice in the three years or so since I've started using grub,
110 I've had it "mysteriously" fail on me. The first time I had to use an
111 old Ubuntu install CD and install to a (luckily) empty partition, in
112 ordered to use its grub to boot Gentoo, and reinstall Gentoo's grub, as I
113 didn't have anything else available to boot from. So after that I made
114 sure I created a GRUB boot floppy (actually two, since I don't trust
115 floppy data integrity, too many bad ones over the years, yes, I still
116 have a floppy drive in this machine), and the second time, I simply
117 booted from it. Now I have no way of knowing for sure, but I strongly
118 suspect that what actually happened is that the reiserfs tail-packing
119 ended up moving some bit of critical data out from where grub could find
120 it, thus causing grub to fail to load its stage-2, without which it's
121 dead on disk. I'd guess the failure rate at <1%, not enough to worry
122 about really since I do have the grub floppy available now, but it's
123 there, very likely because I use reiserfs tail-packing on my /boot
124 partition. It might also be that grub doesn't replay the reiserfs
125 journal, but I normally don't have /boot mounted unless I'm working on it
126 and immediately unmount it when I'm done, and I don't /believe/ either of
127 those failures was after a crash with /boot mounted, so I discount that
128 as unlikely for either of the failures I had, and simply don't know,
129 otherwise.
130
131 --
132 Duncan - List replies preferred. No HTML msgs.
133 "Every nonfree program has a lord, a master --
134 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: grub fs support Bob Sanders <rsanders@×××.com>