View previous topic :: View next topic |
Author |
Message |
Torpus Apprentice
Joined: 20 Aug 2023 Posts: 184
|
Posted: Mon Aug 21, 2023 7:56 am Post subject: [SOLVED] GRUB stuck at Loading initial ramdisk |
|
|
Hey, I'm just installing Gentoo for the first time after I've been on Mint for a while. I followed an installation guide, did that on a Live USB and everything went well, except that when I turn on my laptop it gets stuck at "Loading initial ramdisk ...". I've seen some other people had the same issue, tried to apply the same solutions others have given, and changed my kernel again to make it compatible with my hardware (though I'm not sure if I did it perfectly). I tried pretty much everything I could but nothing works. So I went here to get some help.
I run this laptop on BIOS without secure boot, and I used genkernel to make the kernel.
Here I pastebinned some files you need to know what's actually the issue:
grub.cfg
blkid
lpsci -nnk
.config
Thanks for your attention.
edit: everything was literally messed up there, I tried fixing this both from genkernel kernels and manual ones which made me have multiple messy kernels. I had only to read the handbook carefully XD
Last edited by Torpus on Fri Sep 01, 2023 4:43 pm; edited 1 time in total |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
Posted: Mon Aug 21, 2023 8:24 am Post subject: |
|
|
Torpus,
Welcome to Gentoo Forums !
Usually this kind of error points to a missing framebuffer configuration ... but in your case it is a missing graphics adapter configuration.
You have:
Code: | 00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) I/O Memory Management Unit [1022:1577]
Subsystem: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) I/O Memory Management Unit [1022:1577]
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] [1002:9874] (rev ca)
Subsystem: ASUSTeK Computer Inc. Wani [Radeon R5/R6/R7 Graphics] [1043:1931]
Kernel driver in use: amdgpu |
but in your kernel configuration is:
Code: | CONFIG_EXTRA_FIRMWARE=""
CONFIG_DRM_RADEON=y
CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_AMDGPU is not set |
Please read this first: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Driver_needs_Firmware
and then this: https://wiki.gentoo.org/wiki/AMDGPU
After all, to be on a safe side enable also "VESA VGA graphics support" =>
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.1#Part_3_-_Must_Haves
BTW: This is an AMD machine and not an Intel ? =>
Code: | # CONFIG_PINCTRL_AMD is not set
CONFIG_PINCTRL_INTEL=m |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Mon Aug 21, 2023 8:41 am Post subject: |
|
|
Torpus,
Welcome to Gentoo
You cannot use as that requires UEFI mode. Its harmless though.
Code: | # CONFIG_FB_VESA is not set | is for you, but its off.
must be off. Its for last millennium Radeon GPUs. It will take over your GPU then neither it nor the driver you want can work.
Turn off Code: | CONFIG_SYSFB_SIMPLEFB=y | It can cause more problems that its worth.
pietinger has already pointed you at the extra complications of built in DRM graphics drivers and firmware.
It can be made to work but its not a good place to start. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Torpus Apprentice
Joined: 20 Aug 2023 Posts: 184
|
Posted: Mon Aug 21, 2023 2:48 pm Post subject: |
|
|
It still didn't work
It took me a little while to compile the new kernel again and installing it to /boot (of which I deleted some .old files since I had no enough space)
As you guys told me I changed some stuff that has to work for AMD, but I kind of messed up with it again when I took a look at the tutorials pietinger gave me through the links.
I got a bit confused on where I should turn Radeon on or off, as "lspci -nnk" mentions it and I turned off both CONFIG_FB_RADEON and CONFIG_SYSFB_SIMPLEFB
I also changed some stuff on make.conf (which I took it from an example online with slight changes) where I added radeon in it. Here's an update of the files:
grub.cfg
.config
make.conf
Thanks in advance |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Mon Aug 21, 2023 3:13 pm Post subject: |
|
|
Torpus,
Close but no cigar yet
Code: | CONFIG_DRM_AMDGPU=y |
Requires the firmware to be listed in Code: | CONFIG_EXTRA_FIRMWARE="" | which is empty.
What happens now in that the kernel starts on but before it outputs anything, it switches to the broken CONFIG_DRM_AMDGPU=y. So you see nothing.
You GPU is Code: | vendor: 1002 ("Advanced Micro Devices, Inc. [AMD/ATI]"), device: 9874 ("Wani [Radeon R5/R6/R7 Graphics]") |
From AMDGPU That's a Volcanic Islands family GPU.
Flip Code: | CONFIG_DRM_AMDGPU=y | to Code: | CONFIG_DRM_AMDGPU=m |
and install linux-firmware, if you don't have it.
Your make.conf is missing
The package app-portage/cpuid2cpuflags will tell you what is right for your CPU.
It's not used for the kernel, so make it work first make it better, faster shinier later.
-- edit --
Here's one I prepared earlier _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Torpus Apprentice
Joined: 20 Aug 2023 Posts: 184
|
Posted: Mon Aug 21, 2023 4:37 pm Post subject: |
|
|
The issue still persists
I just turned Code: | CONFIG_DRM_AMDGPU=y | to Code: | CONFIG_DRM_AMDGPU=m | , compiled the new kernel and update it, installed linux-firmware again, and updated GRUB.
I kept Code: | CONFIG_EXTRA_FIRMWARE="" | empty as it was, as I think it only has to be filled with something if Code: | CONFIG_DRM_AMDGPU=y | , and I have no idea how to list the firmware in it anyway.
I also did the command Code: | ls /lib/firmware/amdgpu/carr* | and found all the 10 files in their places.
Thanks again. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Mon Aug 21, 2023 5:07 pm Post subject: |
|
|
Torpus,
So everything is correct but its doesn't work.
That's a contradiction.
How did you flip CONFIG_DRM_AMDGPU?
Using $EDITOR is the wrong answer. Many configuration options depend on and/or set others. You must use a tool.
Lets try some analysis too.
Boot your install media and get into your chroot. Don't forget to mount your /boot.
The kernel build starts with the file Code: | /usr/src/linux/.config | so that needs to be the oldest in the chain of files generated by the build process.
Try Code: | ls -l /usr/src/linux/.config | to see the timestamp.
I get Code: | ls -l /usr/src/linux/.config
-rw-r--r-- 1 root root 156331 Aug 15 18:10 /usr/src/linux/.config |
The kernel binary must be newer, or it cannot have been generated from the .config.
Code: | ls -l /usr/src/linux/arch/x86/boot/bzImage
-rw-r--r-- 1 root root 9935008 Aug 15 18:12 /usr/src/linux/arch/x86/boot/bzImage | That's two minuets newer, so that's OK.
The next one is trickier, unless you only have one kernel.
Code: | ls -l /lib/modules/*/ |
You will get something like Code: | lrwxrwxrwx 1 root root 28 Aug 15 18:27 build -> /usr/src/linux-6.4.10-gentoo
drwxr-xr-x 2 root root 4096 Aug 15 18:39 extra
drwxr-xr-x 9 root root 4096 Aug 15 18:27 kernel
drwxr-xr-x 2 root root 4096 Aug 15 18:39 misc
-rw-r--r-- 1 root root 156425 Aug 15 18:39 modules.alias
-rw-r--r-- 1 root root 156555 Aug 15 18:39 modules.alias.bin
-rw-r--r-- 1 root root 8388 Aug 15 18:27 modules.builtin
-rw-r--r-- 1 root root 11731 Aug 15 18:39 modules.builtin.alias.bin
-rw-r--r-- 1 root root 11721 Aug 15 18:39 modules.builtin.bin
-rw-r--r-- 1 root root 100571 Aug 15 18:27 modules.builtin.modinfo
-rw-r--r-- 1 root root 27709 Aug 15 18:39 modules.dep
-rw-r--r-- 1 root root 42157 Aug 15 18:39 modules.dep.bin
-rw-r--r-- 1 root root 218 Aug 15 18:39 modules.devname
-rw-r--r-- 1 root root 12364 Aug 15 18:27 modules.order
-rw-r--r-- 1 root root 125 Aug 15 18:39 modules.softdep
-rw-r--r-- 1 root root 124113 Aug 15 18:39 modules.symbols
-rw-r--r-- 1 root root 143788 Aug 15 18:39 modules.symbols.bin
lrwxrwxrwx 1 root root 28 Aug 15 18:27 source -> /usr/src/linux-6.4.10-gentoo | for each installed kernel. Look at the timestamp on the files, not the directories or symbolic links.
They must all be newer than the .config file.
Run The kernel file here must be newer than the .config too.
If not, you are not booting the kernel you think you are.
If you have an initrd, or initramfs, it will contain matching kernel modules, so it must be built later than kernel.
Lastly, what does /boot/grub/grub.cfg have to say about kernel versions?
Put it on a pastebin if you wish. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Torpus Apprentice
Joined: 20 Aug 2023 Posts: 184
|
Posted: Mon Aug 21, 2023 8:15 pm Post subject: |
|
|
Ah yeah, I used a text editor to edit .config. When I later used make menuconfig and found out that there are some other unticked options of CONFIG_DRM_AMDGPU, so I ticked them all sine they were obviously of AMD.
Here's the new .config which I later used it to recompile the kernel, update it and grub as well.
Here's my new grub.cfg as well.
Some analysis too:
I get
Code: | ls -l /usr/src/linux/.config
-rw-r--r-- 1 root root 235712 Aug 21 20:16 /usr/src/linux/.config
ls -l /usr/src/linux/arch/x86/boot/bzImage
-rw-r--r-- 1 root root 17949280 Aug 21 20:41 /usr/src/linux/arch/x86/boot/bzImage |
The kernel binary is newer than .config, pretty good.
For the other one, however:
Code: | ls -l /lib/modules/*/ |
I get all that:
Code: | /lib/modules/6.4.11-gentoo/:
total 208
lrwxrwxrwx 1 root root 14 Aug 19 01:19 build -> /usr/src/linux
drwxr-xr-x 7 root root 4096 Aug 19 01:19 kernel
-rw-r--r-- 1 root root 1247 Aug 19 01:19 modules.alias
-rw-r--r-- 1 root root 2193 Aug 19 01:19 modules.alias.bin
-rw-r--r-- 1 root root 10972 Aug 19 01:19 modules.builtin
-rw-r--r-- 1 root root 10324 Aug 19 01:19 modules.builtin.alias.bin
-rw-r--r-- 1 root root 13730 Aug 19 01:19 modules.builtin.bin
-rw-r--r-- 1 root root 105302 Aug 19 01:19 modules.builtin.modinfo
-rw-r--r-- 1 root root 549 Aug 19 01:19 modules.dep
-rw-r--r-- 1 root root 1258 Aug 19 01:19 modules.dep.bin
-rw-r--r-- 1 root root 0 Aug 19 01:19 modules.devname
-rw-r--r-- 1 root root 451 Aug 19 01:19 modules.order
-rw-r--r-- 1 root root 89 Aug 19 01:19 modules.softdep
-rw-r--r-- 1 root root 14979 Aug 19 01:19 modules.symbols
-rw-r--r-- 1 root root 16412 Aug 19 01:19 modules.symbols.bin
lrwxrwxrwx 1 root root 14 Aug 19 01:19 source -> /usr/src/linux
/lib/modules/6.4.11-gentoo-x86_64/:
total 4060
lrwxrwxrwx 1 root root 14 Aug 19 12:50 build -> /usr/src/linux
drwxr-xr-x 12 root root 4096 Aug 21 20:43 kernel
-rw-r--r-- 1 root root 1068350 Aug 21 20:43 modules.alias
-rw-r--r-- 1 root root 1050727 Aug 21 20:43 modules.alias.bin
-rw-r--r-- 1 root root 8696 Aug 21 20:41 modules.builtin
-rw-r--r-- 1 root root 10326 Aug 21 20:43 modules.builtin.alias.bin
-rw-r--r-- 1 root root 10921 Aug 21 20:43 modules.builtin.bin
-rw-r--r-- 1 root root 78906 Aug 21 20:41 modules.builtin.modinfo
-rw-r--r-- 1 root root 326609 Aug 21 20:43 modules.dep
-rw-r--r-- 1 root root 467048 Aug 21 20:43 modules.dep.bin
-rw-r--r-- 1 root root 325 Aug 21 20:43 modules.devname
-rw-r--r-- 1 root root 124411 Aug 21 20:41 modules.order
-rw-r--r-- 1 root root 1159 Aug 21 20:43 modules.softdep
-rw-r--r-- 1 root root 437923 Aug 21 20:43 modules.symbols
-rw-r--r-- 1 root root 539756 Aug 21 20:43 modules.symbols.bin
lrwxrwxrwx 1 root root 14 Aug 21 20:41 source -> /usr/src/linux |
Sounds like I have multiple kernels which is problematic I guess, especially when some of them are indeed older than my .config.
Here's this as well:
Code: |
ls -l /boot
total 115417
-rwxr-xr-x 1 root root 22418144 Aug 21 14:58 bzImage
-rwxr-xr-x 1 root root 140860 Aug 19 00:36 config-6.4.11-gentoo
-rwxr-xr-x 1 root root 235712 Aug 21 20:54 config-6.4.11-gentoo-x86_64
-rwxr-xr-x 1 root root 235733 Aug 21 17:09 config-6.4.11-gentoo-x86_64.old
drwxr-xr-x 3 root root 512 Aug 19 02:05 EFI
drwxr-xr-x 5 root root 512 Aug 21 20:54 grub
-rwxr-xr-x 1 root root 10087964 Aug 19 01:48 initramfs-6.4.11-gentoo.img
-rwxr-xr-x 1 root root 10383400 Aug 21 14:58 initramfs-6.4.11-gentoo-x86_64.img
-rwxr-xr-x 1 root root 7106464 Aug 19 00:36 System.map-6.4.11-gentoo
-rwxr-xr-x 1 root root 7371996 Aug 21 20:54 System.map-6.4.11-gentoo-x86_64
-rwxr-xr-x 1 root root 7371996 Aug 21 17:09 System.map-6.4.11-gentoo-x86_64.old
-rwxr-xr-x 1 root root 16931264 Aug 19 00:36 vmlinuz-6.4.11-gentoo
-rwxr-xr-x 1 root root 17949280 Aug 21 20:54 vmlinuz-6.4.11-gentoo-x86_64
-rwxr-xr-x 1 root root 17949280 Aug 21 17:09 vmlinuz-6.4.11-gentoo-x86_64.old |
Again, some files here are older than .config.
And yes, I do have initramfs.
Now is the real problem actually having multiple kernels like these? I just want one which I can use to boot my laptop into Gentoo, that's it. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
Torpus Apprentice
Joined: 20 Aug 2023 Posts: 184
|
Posted: Tue Aug 22, 2023 8:58 am Post subject: |
|
|
I'm just getting closer to make it work...
Alright now I have two kernels: The first is linux-6.4.11-gentoo-x86_64 which is still stuck at Loading initial ramdisk (in /usr/src it had this name in its directory when I first got it before but changed it to /linux since everyone has it this way. I compiled it already for many times) and the second is linux-6.4.11-gentoo-dist-hardened which when I turn it on through it it bypasses Loading initial ramdisk within less than a second BUT instead of the kernel showing the laptop simply reboots again. Both of their .configs are older than their kernel binaries. Both .configs are set appropriately in their graphics support although they're slightly different in size for some reason (I'll show them in pastebin).
Code: | ls -l /lib/modules/*/ |
Show that everything is newer than the .configs of the two kernels.
But there's something else that's weird:
gives
Code: | total 102049
-rwxr-xr-x 1 root root 17949280 Aug 22 04:42 bzImage
-rwxr-xr-x 1 root root 254125 Aug 22 01:03 config-6.4.11-gentoo-dist-hardened
-rwxr-xr-x 1 root root 235712 Aug 22 08:20 config-6.4.11-gentoo-x86_64
drwxr-xr-x 3 root root 512 Aug 19 02:05 EFI
drwxr-xr-x 5 root root 512 Aug 22 08:21 grub
-rwxr-xr-x 1 root root 16945152 Aug 22 01:03 initramfs-6.4.11-gentoo-dist-hardened.img
-rwxr-xr-x 1 root root 30964561 Aug 22 08:36 initramfs-6.4.11-gentoo-x86_64.img
-rwxr-xr-x 1 root root 0 Aug 22 03:17 System.map-6.4.11-gentoo-dist-hardened
-rwxr-xr-x 1 root root 7371996 Aug 22 08:20 System.map-6.4.11-gentoo-x86_64
-rwxr-xr-x 1 root root 12824576 Aug 22 07:55 vmlinuz-6.4.11-gentoo-dist-hardened
-rwxr-xr-x 1 root root 17949280 Aug 22 08:20 vmlinuz-6.4.11-gentoo-x86_64
|
Everything is newer than the .configs (except for EFI which is harmless), but System.map-6.4.11-gentoo-dist-hardened has no size, a value of zero bytes. I guess it causes the issue of why the second kernel doesn't show up, but I don't know how to get a working System.map for it.
Another important thing is that for some reason there are more files in /linux compared to the ones of /linux-6.4.11-gentoo-dist-hardened:
Code: | mint / # ls -l /usr/src/linux
total 179676
drwxr-xr-x 25 root root 4096 Aug 19 10:49 arch
drwxr-xr-x 3 root root 12288 Aug 21 11:14 block
-rw-r--r-- 1 root root 230770 Aug 21 20:40 built-in.a
drwxr-xr-x 2 root root 4096 Aug 20 13:36 certs
-rw-r--r-- 1 root root 496 Aug 18 23:18 COPYING
-rw-r--r-- 1 root root 102544 Aug 18 23:18 CREDITS
drwxr-xr-x 4 root root 36864 Aug 21 14:27 crypto
drwxr-xr-x 2 root root 4096 Aug 18 23:19 distro
drwxr-xr-x 80 root root 4096 Aug 18 23:20 Documentation
drwxr-xr-x 141 root root 4096 Aug 21 16:58 drivers
drwxr-xr-x 81 root root 12288 Aug 21 10:52 fs
drwxr-xr-x 33 root root 4096 Aug 19 10:24 include
drwxr-xr-x 2 root root 4096 Aug 22 08:15 init
drwxr-xr-x 2 root root 4096 Aug 21 11:15 io_uring
drwxr-xr-x 2 root root 4096 Aug 21 11:12 ipc
-rw-r--r-- 1 root root 2573 Aug 18 23:18 Kbuild
-rw-r--r-- 1 root root 580 Aug 18 23:18 Kconfig
drwxr-xr-x 22 root root 16384 Aug 22 08:15 kernel
drwxr-xr-x 22 root root 28672 Aug 21 14:27 lib
drwxr-xr-x 6 root root 4096 Aug 18 23:20 LICENSES
-rw-r--r-- 1 root root 710914 Aug 18 23:18 MAINTAINERS
-rw-r--r-- 1 root root 71847 Aug 18 23:18 Makefile
drwxr-xr-x 6 root root 20480 Aug 21 14:27 mm
-rw-r--r-- 1 root root 8696 Aug 21 20:40 modules.builtin
-rw-r--r-- 1 root root 78906 Aug 21 20:40 modules.builtin.modinfo
-rw-r--r-- 1 root root 99403 Aug 21 20:40 modules.order
-rw-r--r-- 1 root root 1545462 Aug 21 20:40 Module.symvers
drwxr-xr-x 73 root root 4096 Aug 21 14:14 net
-rw-r--r-- 1 root root 727 Aug 18 23:18 README
drwxr-xr-x 7 root root 4096 Aug 18 23:19 rust
drwxr-xr-x 40 root root 4096 Aug 18 23:20 samples
drwxr-xr-x 17 root root 4096 Aug 20 17:06 scripts
drwxr-xr-x 14 root root 4096 Aug 21 11:12 security
drwxr-xr-x 27 root root 4096 Aug 21 14:43 sound
-rw-r--r-- 1 root root 7371996 Aug 21 20:40 System.map
drwxr-xr-x 42 root root 4096 Aug 18 23:19 tools
drwxr-xr-x 4 root root 4096 Aug 20 13:25 usr
drwxr-xr-x 4 root root 4096 Aug 20 17:04 virt
-rwxr-xr-x 1 root root 98254312 Aug 21 20:40 vmlinux
-rw-r--r-- 1 root root 235870 Aug 21 20:40 vmlinux.a
-rw-r--r-- 1 root root 86486352 Aug 21 20:40 vmlinux.o
-rw-r--r-- 1 root root 628651 Aug 19 10:48 vmlinux.symvers
mint / # ls -l /usr/src/linux-6.4.11-gentoo-dist-hardened
total 10064
drwxr-xr-x 24 root root 4096 Aug 22 01:02 arch
drwxr-xr-x 3 root root 4096 Aug 22 01:02 block
drwxr-xr-x 2 root root 4096 Aug 22 01:02 certs
drwxr-xr-x 4 root root 4096 Aug 22 01:02 crypto
drwxr-xr-x 2 root root 4096 Aug 22 01:02 distro
drwxr-xr-x 6 root root 4096 Aug 22 01:02 Documentation
drwxr-xr-x 141 root root 4096 Aug 22 01:02 drivers
drwxr-xr-x 81 root root 4096 Aug 22 01:02 fs
drwxr-xr-x 33 root root 4096 Aug 22 01:02 include
drwxr-xr-x 2 root root 4096 Aug 22 01:02 init
drwxr-xr-x 2 root root 4096 Aug 22 01:02 io_uring
drwxr-xr-x 2 root root 4096 Aug 22 01:02 ipc
-rw-r--r-- 1 root root 580 Aug 22 04:59 Kconfig
drwxr-xr-x 21 root root 4096 Aug 22 01:02 kernel
drwxr-xr-x 21 root root 4096 Aug 22 01:02 lib
-rw-r--r-- 1 root root 71839 Aug 22 04:59 Makefile
drwxr-xr-x 6 root root 4096 Aug 22 01:02 mm
-rw-r--r-- 1 root root 1766030 Aug 22 07:53 Module.symvers
drwxr-xr-x 73 root root 4096 Aug 22 01:02 net
drwxr-xr-x 2 root root 4096 Aug 22 01:02 rust
drwxr-xr-x 39 root root 4096 Aug 22 01:02 samples
drwxr-xr-x 17 root root 4096 Aug 22 01:02 scripts
drwxr-xr-x 14 root root 4096 Aug 22 01:02 security
drwxr-xr-x 27 root root 4096 Aug 22 01:02 sound
-rw-r--r-- 1 root root 8359738 Aug 22 07:53 System.map
drwxr-xr-x 37 root root 4096 Aug 22 01:02 tools
drwxr-xr-x 3 root root 4096 Aug 22 01:02 usr
drwxr-xr-x 4 root root 4096 Aug 22 01:02 virt
|
.config of the first kernel (linux-6.4.11-gentoo-x86_64)
.config of the second kernel(linux-6.4.11-gentoo-dist-hardened)
boot/grub/grub.cfg
Sorry for failing many times at fixing this (or these) issue. it's my first time to play with a kernel.
Thanks <3 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Tue Aug 22, 2023 10:31 am Post subject: |
|
|
Torpus,
First of all, the bad news. Using a text editor on the kernel .config flie usually leads to a broken illegal .config.
When you are lucky, its obvious, as the kernel build fails. When you are unlucky, it builds a broken kernel.
The only fix for that is to throw away the .config and start again.
Having several kernel is a verygoodthing. When one breaks, you can choose another from the grub menu.
That avoids reaching for your boot media and doing the chroot dance.
Things are kept separate by the names. The kernel knows its own name. Try
The matching kernel modules are in Code: | /lib/modules/`uname -r` | The kernel will not load any kernel that don't match.
You can force it ... but you can keep the pieces aftherward.
From grub.cfg
Code: | echo 'Loading Linux 6.4.11-gentoo-x86_64 ...'
linux /vmlinuz-6.4.11-gentoo-x86_64 root=UUID=d4ff467e-3a2e-4dc0-bc92-d3a76a15425b ro dozfs=cache
echo 'Loading initial ramdisk ...'
initrd /initramfs-6.4.11-gentoo-x86_64.img | is your default kernel and its called vmlinuz-6.4.11-gentoo-x86_64. That's the file name in /boot
Those to echo statement are all you see when you boot that kernel.
In the Advanced menu in grub you have several different way to boot vmlinuz-6.4.11-gentoo-x86_64, all with the same problem, and vmlinuz-6.4.11-gentoo (note the missing -x86_64 in the name) which probably works.
So, throw away your .config and start again. You will have learned a lot, frow what you have done so far so it will be much faster now.
Use or one of the GUI tools if you prefer
They are parse the Kconfig files and do lots of things that you won't with a text editor.
See Configuring the kernel.
The rest of that page may give some useful background but its only required reading if you want to make an initrd free kernel. You can work up to that. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|