Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Removing or renaming old /boot/grub directory warning
Date: Sat, 05 Feb 2022 19:03:49
Message-Id: e1f8b706-2dbf-32e1-6705-9481d92a65e3@gmail.com
In Reply to: Re: [gentoo-user] Removing or renaming old /boot/grub directory warning by Michael
1 Michael wrote:
2 > On Saturday, 5 February 2022 09:36:44 GMT Dale wrote:
3 >
4 >> It failed with a missing normal.mod file. That file is in the old grub
5 >> directory. Once I renamed the directory back to what grub expected, the
6 >> system loaded grub fine.
7 > Ahh! The normal.mod command:
8 >
9 > http://www.gnu.org/software/grub/manual/grub/html_node/normal.html
10 >
11 > You won't get a boot menu without this file, or a lot of GRUB commands.
12 > However, in a GRUB2 installation this file is found here:
13 >
14 > # find /boot/ -name normal.mod
15 > /boot/grub/i386-pc/normal.mod
16 >
17 > It should not exist the old legacy filesystem. :-/
18 >
19 > I wonder if you have somehow mixed the legacy and new GRUB2 files?
20 >
21 > Anyway, the solution is to go fishing for it from the GRUB rescue prompt, using
22 > the ls command and then set root and set prefix before you can insmode it.
23 >
24
25 I kind of tried to do that.  Thing is, it doesn't do tab completion or
26 anything and I forgot I had renamed that directory until I booted a
27 rescue media and did a ls on it from that.  Then I remembered renaming
28 it and simply renamed it back.  After that, grub was happy.  Of course,
29 then I ran into the bad kernel and after that my second screen wasn't
30 working either.  Things sort of ganged up on me all at once.  It's one
31 reason I hate rebooting.  I have to say tho, dracut has been good to me
32 so far.  Only had one init thingy go bad.  I simply booted a old kernel
33 and fixed the new bad init thingy.  Still, I hate rebooting.  From
34 uprecords: 
35
36
37 root@fireball / # uprecords
38      #               Uptime | System                                    
39 Boot up
40 ----------------------------+---------------------------------------------------
41      1   303 days, 11:46:23 | Linux 4.5.2-gentoo        Sat Jul 29
42 23:20:27 2017
43      2   227 days, 22:10:30 | Linux 5.6.7-gentoo        Wed Oct 28
44 13:59:36 2020
45      3   200 days, 06:51:46 | Linux 4.18.12-gentoo      Sat Jan 12
46 03:42:55 2019
47      4   193 days, 09:28:37 | Linux 3.5.3-gentoo        Sat Sep 22
48 07:50:38 2012
49      5   184 days, 15:47:57 | Linux 3.18.7-gentoo       Tue Dec 15
50 21:53:59 2015
51      6   166 days, 20:47:12 | Linux 5.6.7-gentoo        Thu May 14
52 00:47:09 2020
53      7   143 days, 15:05:26 | Linux 4.5.2-gentoo        Sun Oct 23
54 20:09:26 2016
55      8   138 days, 11:27:28 | Linux 4.5.2-gentoo        Tue May 29
56 13:27:44 2018
57      9   135 days, 11:11:44 | Linux 4.5.2-gentoo        Thu Mar 16
58 11:58:17 2017
59     10   119 days, 02:59:44 | Linux 4.19.40-gentoo      Wed Jul 31
60 12:12:08 2019
61
62
63
64 >> There's been other threads about kernel boot
65 >> problems and the one I recently built could be having one of those
66 >> problems. I haven't looked into that. I doubt there is any file system
67 >> problem. The problem was me renaming a directory that grub still needs
68 >> files from. There is likely a way around this but my post was to warn
69 >> others that renaming that directory could cause problems.
70 > Right, renaming should be done carefully as you could mix the legacy and GRUB2
71 > filesystems.
72
73 Well, I expected everything the new grub needed to be in the new grub2
74 folder.  I think that is what Neil was expecting as well.  Just renaming
75 the directory instead of deleting it was a really good idea tho.  Of
76 course, everything is in /usr and can be restored from there but that
77 means having to set up lvm since /usr is on a lvm as is /var as well. 
78
79
80 >
81 >>>> I've reinstalled
82 >>>> using the grub-mkconfig command but have not reinstalled using the
83 >>>> grub-install command.
84 > Right, the 'grub-mkconfig' command only generates a new grub.cfg file and
85 > overwrites the old one. It does not *install* GRUB, whereby install involves
86 > dropping GRUB's bootloader code in the MBR and also copying all GRUB files into
87 > /boot.
88 >
89 > TBH, once GRUB2 is installed properly and it works, it tends to carry on doing
90 > so. So the question remains, why did it barf at its normal.mod path ...
91 >
92 >
93 > [snip ...]
94 >> I don't have the old grub installed, just a directory that was installed
95 >> by the old grub but contains files that the new grub needs.
96 > Hmm ... that should not be the case. The legacy and GRUB2 filesystems are
97 > different.
98 >
99 >> The file
100 >> and path it needs is this: /boot/grub/i386-pc/normal.mod Why that
101 >> isn't installed in the new grub directory and told to look there for it,
102 >> I have no idea at the moment. I may test it one day but don't feel the
103 >> desire to try it today.
104 > Life's a mystery! :-)
105
106
107 Yea, I'm working on it.  Pulling out install info and may rename the
108 directory and do a complete reinstall process.  Just like I would on a
109 fresh install.  That should fix it.  If not, I understand more about the
110 grub rescue terminal at least.  I'm going to look that info up and do
111 some printing with my nifty duplex laser printer.  I hate the cost of
112 toner but I love the printing it does. 
113
114 Dale
115
116 :-)  :-)