1 |
n |
2 |
|
3 |
On Fri, May 14, 2021 at 2:36 AM John Covici <covici@××××××××××.com> wrote: |
4 |
|
5 |
> |
6 |
> I would look in the grub.cfg and give us exactly what is in the stanza |
7 |
> you are using, including where it thinks the root file system is, |
8 |
> etc. Also, see if there is any genkernel option to get some debugging |
9 |
> info out of the initrd, I know using dracut you can get breakpoints |
10 |
> during the process and see how its doing. |
11 |
|
12 |
|
13 |
Tried dracut. No change. |
14 |
|
15 |
Added the kernel command line debug options (#3 in “Identifying your |
16 |
problem area” in ‘man dracut’). No change. |
17 |
|
18 |
Feeling peevish, I made a file of random junk using dd if=/dev/random |
19 |
of=initrd.img count=4096. Then supplied that pile of junk as the initrd. |
20 |
Again, no change. |
21 |
|
22 |
Then I supplied a nonexistent file name (xxx.img) as the initrd. This time |
23 |
I got a complaint: |
24 |
|
25 |
error: file ‘/xxx.img’ not found. |
26 |
|
27 |
Press any key to continue... |
28 |
|
29 |
So, it’s getting as far as wanting to read the initrd, and is smart enough |
30 |
to tell whether the specified initrd actually exists on the specified boot |
31 |
partition. But it can’t actually be doing anything with the initrd, or it |
32 |
would have objected to the random junk I fed it. |
33 |
|
34 |
From https://en.m.wikipedia.org/wiki/Initial_ramdisk#Implementation, it |
35 |
appears that grub is in charge of loading both linux and the initrd into |
36 |
memory, then handing execution over to linux along with a pointer to the |
37 |
memory location of the initrd. |
38 |
|
39 |
I’ve observed that that no booting output comes out of linux, nor any |
40 |
complaints from linux about the nonsense contents I fed it from the random |
41 |
initrd I built. That suggests to me that grub has failed to load linux |
42 |
and/or the initrd into memory, or that it's failed to hand execution |
43 |
control to linux. |
44 |
|
45 |
Next step: learned how to run an interactive grub2 command shell. With |
46 |
full debugging turned on, it looks like grub2 can load the kernel image, |
47 |
and it looks like it loads the initrd as well. At least there are no |
48 |
complaints and the reported initrd size looks correct. |
49 |
|
50 |
But when I issue the boot command, grub2 issues a handful of mallocs and |
51 |
does a little token parsing, and then just stops... |
52 |
|
53 |
So it appears that the boot problem arises right around the handoff from |
54 |
grub2 to linux. Don’t know whether grub2 or linux has failed. I don’t |
55 |
know how to get either one to tell me more. |
56 |
|
57 |
John |