Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Grub2 and is the upgrade a tooth puller.
Date: Mon, 25 Jun 2012 06:04:39
Message-Id: CADPrc832rgqBLYNNQ9fhg+pABMMPFdakcn5jMRgSYa+dp3K19A@mail.gmail.com
In Reply to: [gentoo-user] Grub2 and is the upgrade a tooth puller. by Dale
1 On Mon, Jun 25, 2012 at 12:05 AM, Dale <rdalek1967@×××××.com> wrote:
2 > Howdy,
3
4 Hi Dale.
5
6 > It appears that grub2 is coming soon.  Thread on -dev said a couple
7 > months or so till it hits the tree, keyworded and/or masked I'm sure.  I
8 > guess it is about time to jump off the cliff and give this a try.  I
9 > installed Kubuntu on a system for my brother and it uses grub2.  I have
10 > had to edit the config and then run the update script.  I have sort of
11 > installed and made a config change to grub2, even tho it was only once.
12 > Basically, I sort of seen the thing at least.  o_O
13 >
14 > My first question is, how hard is this to change from old grub to
15 > grub2?
16
17 It's a completely new beast. Almost none of the old grub-legacy
18 related knowledge works for GRUB2.
19
20 >  I only run Gentoo here, no windoze at all and no other distro
21 > either.  I figure that may make it easier.  I must confess tho, I'm a
22 > hoarder of kernels.  LOL   I generally have several versions of them on
23 > here.  Is there a way for it to only see say the last 3 versions or so?
24 > I only have three right now but I cleaned out all the non-init kernels a
25 > while back.  Given time, I may have a dozen or so.  I would rather not
26 > have that many lines on the grub screen when booting.
27
28 You can edit the config file (you first need to give it the
29 appropriate permissions), and remove from it the kernels you don't
30 want. Also, you can move the kernels/initramfs' from /boot into a temp
31 directory when running the grub2-mkconfig script.
32
33 > Also, will it know what init thingy image to connect the kernels too?  I
34 > name my kernels with the version and name the init thingy with a similar
35 > name.  Looks someting like this:
36 >
37 > root@fireball / # ls -al /boot/bzImage-3.*
38 > -rw-r--r-- 1 root root 4740064 May 16 20:25 /boot/bzImage-3.3.5-2
39 > -rw-r--r-- 1 root root 4758496 May 23 13:09 /boot/bzImage-3.4.0-1
40 > -rw-r--r-- 1 root root 4758816 Jun 14 09:00 /boot/bzImage-3.4.2.r1-1
41 > root@fireball / # ls -al /boot/initramfs-3.*
42 > -rw-r--r-- 1 root root 3560934 May 12 05:03 /boot/initramfs-3.3.5-1.img
43 > -rw-r--r-- 1 root root 3560423 May 23 13:10 /boot/initramfs-3.4.0.img
44 > -rw-r--r-- 1 root root 3561170 Jun 14 09:05 /boot/initramfs-3.4.2.img
45 > root@fireball / #
46
47 The grub2-mkconfig script should recognize the correct initramfs for
48 each kernel.
49
50 > There are times when I may have more than one kernel but only one init
51 > thingy tho.  So far, one init thingy will work with any kernel of that
52 > version.  I have not tried mixing tho.
53 >
54 > Also, how much disk space does grub take up on /boot?  Mine is on a
55 > separate partition and I hope it is large enough.
56
57 Mine uses around 8MB:
58
59 # du -sh /boot/grub2/
60 7.9M /boot/grub2/
61
62 > Thoughts.  Info.
63
64 I upgraded to GRUB 2 because of ext4, since grub-legacy upstream
65 doesn't handle ext4 (and, apparently, never will). However, the Gentoo
66 ebuild applies the patch from
67
68 http://code.google.com/p/grub4ext4/
69
70 and it's my impression it will continue to apply said patch in the
71 future, so grub-legacy on Gentoo supports ext4. Given that, I really
72 don't see an advantage to use GRUB2, except that it will be the one
73 being maintained in the future, and when UEFI hardware becomes the
74 standard (if ever), you will probably need it..
75
76 Besides ext4 upstream support, GRUB2 allows to use higher screen
77 resolutions for the graphical menu. That's about it's only advantage
78 over grub-legacy, and it's a very shallow one. The new configuration
79 format and the script to generate it are not flexible, and its
80 documentation is sorely lacking. I really think you should stick with
81 grub-legacy while Gentoo supports it.
82
83 I keep using GRUB2 in my desktop and laptop, buy I didn't migrated my
84 servers nor my media center to it, nor plan to do it. I see no reason
85 for it.
86
87 And being honest, I hope that something else replaces GRUB2; I like
88 the notion of a /firstboot minimal Linux as boot loader, or something
89 similar. If the boot loader has to do OS-related work (graphics/input
90 drivers and stuff like that), I think using Linux directly is better
91 than re-implementing something twice (and probably in the wrong
92 manner) as GRUB2 is doing.
93
94 So, in short: I don't recommend switching to GRUB2. And I'm using it.
95
96 Either wait for its documentation and tools to mature (i.e., when they
97 finally hit the 2.0 version), or wait for something else to handle the
98 future of Linux boot loader. Meanwhile, if you don't use UEFI, you
99 really don't need GRUB2. So stick to grub-legacy.
100
101 My 0.02 ${CURRENCY}.
102
103 Regards.
104 --
105 Canek Peláez Valdés
106 Posgrado en Ciencia e Ingeniería de la Computación
107 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] Grub2 and is the upgrade a tooth puller. Paul Hartman <paul.hartman+gentoo@×××××.com>
Re: [gentoo-user] Grub2 and is the upgrade a tooth puller. Keith Dart <keith@×××××××××.biz>