Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Messed up kernel upgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
cacto
n00b
n00b


Joined: 13 Aug 2019
Posts: 3

PostPosted: Tue Aug 13, 2019 8:27 pm    Post subject: [Solved] Messed up kernel upgrade Reply with quote

Hello and apologies if this is the wrong sub-form

I'm completely new to gentoo and after spending a few days working through the handbook managed to get a system installed and everything was okay for a while

Today I tried upgrading the kernel from 4.19.57 to 4.19.66 by following the wiki (https://wiki.gentoo.org/wiki/Kernel/Upgrade) using genkernel,

It compiles and grub picks it up after mkconfig but I've screwed something up somewhere and can't seem to boot at all now
Initially I was seeing a grey splash screen that hangs so I used my installation usb to gain access the system and tried to setup the kernel again with genkernel

That's done something and now I'm shown a sort of limited terminal (forgive my lack of knowledge here) that complains about not being able to find a block device.

I *think* I've passed a wrong config or not provided one to genkernel but I'm lost on how to start unraveling it all
Happy to provide any further information & any help would be greatly appreciated


Last edited by cacto on Thu Aug 15, 2019 7:50 am; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13982

PostPosted: Wed Aug 14, 2019 1:46 am    Post subject: Reply with quote

Welcome to the Gentoo forums. This is a good place for the problem you encountered. The most likely explanation is that the newer kernel was built without support for some part of your storage stack, so as far as it can see, you have no (working) hard drive, and thus nowhere to find the root filesystem.

If you have not already, I suggest reading some of the FAQs regarding kernel compilation. They are all quite old, but most are still applicable. For your situation, I suggest:If that does not help, or if you would prefer a bit more interactive guidance, please post back with exactly what output you get at the end of the boot. There are a few minor variations, and which one you get will give us important clues about what is wrong. Also, please start the installation environment, chroot into the system, emerge app-text/wgetpaste, then use the resulting command wgetpaste to upload to a pastebin the kernel configurations for the working and non-working kernels. This may be helpful in determining how they differ, and thus why one works and the other fails.
Back to top
View user's profile Send private message
cacto
n00b
n00b


Joined: 13 Aug 2019
Posts: 3

PostPosted: Wed Aug 14, 2019 7:40 am    Post subject: Reply with quote

Thank you, I'll make a start on those FAQs this evening and try and make available some of the output requested

The system is stored on an NVMe drive so perhaps there's an issue around that, although I can't recall needed to do anything special to support it during initial install

I'm a bit confused with where/how kernel configs are stored when using genkernel, in /usr/src/linux I have directories for .57 and .66
I originally setup .57 using genkernel all and have made a few changes using genkernel and menuconfig since then (mainly to allow nvidia drivers).

Is the .config file in the .57 directory the last one generated by genkernel for .57 or are genkernel configs only kept under /etc/kernels?
Back to top
View user's profile Send private message
cacto
n00b
n00b


Joined: 13 Aug 2019
Posts: 3

PostPosted: Wed Aug 14, 2019 7:57 pm    Post subject: Reply with quote

I've managed to solve it!

This is probably trivial for most but just in case someone has the same issue, my steps were as follows:

- boot using live cd / usb
- mount drives and chrooted into existing system (see the handbook for steps here)
- clear out /boot of old non-working kernels/initramfs
- ran genkernel but this time made sure to pass it the working config from the previous kernel: genkernel --kernel-config=/etc/kernels/<last kernel.57> all (this is what I must have omitted originally)
- ran grub-mkconfig
- unmount & reboot
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13982

PostPosted: Thu Aug 15, 2019 12:59 am    Post subject: Reply with quote

Congratulations, and thank you for recounting your solution. There is always the possibility that someone else will have the same problem, find your thread, and benefit from the solution you posted. If you believe there is nothing more to do here, then it is traditional to edit the title of the first post and insert the text [SOLVED] or similar, so that people browsing the index can see that the thread is resolved.

I don't use genkernel, so I can't answer your earlier questions. However, there are other users here who do, and one of them probably would have answered within a couple of days.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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