Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: grub and maximum kernel file size
Date: Thu, 09 Apr 2009 06:45:45
Message-Id: pan.2009.04.09.06.45.29@cox.net
In Reply to: [gentoo-amd64] grub and maximum kernel file size by flockmock@gmx.at
1 flockmock@×××.at posted 200904090657.08422.flockmock@×××.at, excerpted
2 below, on Thu, 09 Apr 2009 06:57:08 +0200:
3
4 > i have a quite big initramfs, kernel size is approx. 5,7 MB. Adding new
5 > things to my initramfs does not work, because grub fails to load kernels
6 > with >6MB. so, does anybody know the exact limit of the kernel file
7 > size, that grub is able to load? is it platform-specific?
8
9 What grub version are you running? Stable or ~arch?
10
11 As I recall, patches fixing this and other issues including ext4 and
12 large inode ext3 support have been introduced into the latest ~arch grub,
13 but whether it has been stabilized yet I'm not sure. (Actually, given
14 the below, it hasn't been.)
15
16 FWIW, I'm running ~arch (~amd64 of course, given the list), but on the
17 no-multilib profile, where grub itself is masked and grub-static is used
18 instead. But the rX revisions are supposed to be synced. Here's what
19 I'm running and what's available for both grub and grub-static, along
20 with keywording:
21
22 ~$equery l grub
23 [ Searching for package 'grub' in all categories among: ]
24 * installed packages
25 [I--] [ ~] sys-boot/grub-static-0.97-r9 (0)
26 ~$epkginfo grub
27 Package: sys-boot/grub
28 Herd: base-system
29 Maintainer: base-system
30 Location: /p/sys-boot/grub
31 Keywords: grub-0.92-r1:
32 Keywords: grub-0.94-r1: -*
33 Keywords: grub-0.96-r1:
34 Keywords: grub-0.96-r2:
35 Keywords: grub-0.96-r3:
36 Keywords: grub-0.97:
37 Keywords: grub-0.97-r2:
38 Keywords: grub-0.97-r3:
39 Keywords: grub-0.97-r4:
40 Keywords: grub-0.97-r5:
41 Keywords: grub-0.97-r6: amd64 x86
42 Keywords: grub-0.97-r8:
43 Keywords: grub-0.97-r9: ~amd64 ~x86 ~x86-fbsd
44 Keywords: grub-1.96:
45 Keywords: grub-9999:
46
47 ~$epkginfo grub-static
48 Package: sys-boot/grub-static
49 Herd: amd64
50 Maintainer: amd64
51 Location: /p/sys-boot/grub-static
52 Keywords: grub-static-0.96-r1:
53 Keywords: grub-static-0.97:
54 Keywords: grub-static-0.97-r6: amd64
55 Keywords: grub-static-0.97-r9: -* ~amd64 ~x86
56
57 ~$
58
59 So try either grub or grub-static-0.97-r9.
60
61 **ALSO**NOTE**
62
63 When you upgrade grub(-static) using portage (or other Gentoo PM), it
64 installs in the system but does **NOT** install to the MBR or wherever.
65 You must do that after the upgrade, following the elog instructions spit
66 out by the ebuild or otherwise handling it as you normally do. If you
67 fail to do so, the version in the MBR remains the old one, which may or
68 may not continue to work with what's in /boot. It's thus possible you
69 could leave your system unbootable (well, except from rescue disk, etc)
70 if you don't follow the MBR upgrade procedure, or, more likely with a
71 simple revision update, it'll be bootable but you'll be using partly or
72 entirely the old version, not the upgrade, and thus won't get the fixes
73 in the upgrade.
74
75 So, before you upgrade grub at all, ensure you have a (tested working)
76 rescue disk or similar solution in case something goes wrong with the
77 upgrade.
78
79 Then when you upgrade, after doing the normal package upgrade, verify
80 that what exists in /boot matches what exists in /lib/grub/i386-pc/* (the
81 ebuild will try to mount /boot and update that if it can, but may fail
82 under certain conditions).
83
84 Finally, use grub-install or similar procedure to install to the MBR (or
85 wherever else you have it installed if not the MBR), thus upgrading the
86 actual first-stage boot module to match what's now on /boot and in /lib/
87 grub.
88
89 Once you finish upgrading (all the way) to 0.97-r9, if the changelog
90 entries are correct and you haven't hit a different bug, you should have
91 no further issues with too large kernel images. For more information,
92 see the package changelogs and the bugs they refer to. (According to the
93 changelog, -r8 fixed most of the bugs, -r9 apparently simply added ext4
94 support, but while you're upgrading you might as well get it all.)
95
96 --
97 Duncan - List replies preferred. No HTML msgs.
98 "Every nonfree program has a lord, a master --
99 and if you use the program, he is your master." Richard Stallman

Replies