Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I changed mb, cpu. Black screen after grub
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
hariskar
Apprentice
Apprentice


Joined: 29 Jan 2017
Posts: 168

PostPosted: Fri Mar 24, 2023 4:20 am    Post subject: I changed mb, cpu. Black screen after grub Reply with quote

I changed motherboard and cpu from Intel to AMD. Mb is B550 aorus elite and cpu is 5600G.
Grub loads normally, with correct resolution, I can boot Windows but not Gentoo..
I chroot in my system made countless kernel changes, started with defconfig and made changes again but nothing...
I enabled FRAMEBUFFER_CONSOLE, FB, FB_EFI, FB_SIMPLE.

Where should I begin? Any way to export logs, dmesg etc from chroot?

Thank you!
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1534

PostPosted: Fri Mar 24, 2023 6:04 am    Post subject: Reply with quote

Hello hariskar,

As a start dpaste or pastebin your emerge --info and your kernel config.

You probably need to do emerge -e @world too, but let's first get your kernel working.

p.s. I'm not sure if it's worth doing the above as opposed to grabbing your /etc/portage files, perhaps modifying make.conf to reflect your new CPU and performing a clean install. Preserve your user files of course. What I did when I did that transition was to first install the new system, then I used scp to copy my user files with additional options to preserve original crete/modify dates et.c, but I had two separate computers. I guess I could have used rsync for that too.

Best Regards,
Georgi
Back to top
View user's profile Send private message
hariskar
Apprentice
Apprentice


Joined: 29 Jan 2017
Posts: 168

PostPosted: Fri Mar 24, 2023 7:11 am    Post subject: Reply with quote

Does this kernel problem seem to be because of cpu config? gpu config? grub config? Something else?

I can copy all files I need to 2nd hard disk and reinstall because I am struggleing already 2 days with black screen...


Thanks a lot for reply!
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Fri Mar 24, 2023 8:53 am    Post subject: Reply with quote

Hi hariskar.

A few months ago I have changed desktop and booted the old Gentoo installation.
What I had to do:
- change ethernet driver support and audio support
- video cart support + edit make.conf
- enable NVMe support

Concerning grub. Your old Gentoo will want secure boot off. And also depends on boot option - BIOS or EFI

Good luck.
Back to top
View user's profile Send private message
Irets
Apprentice
Apprentice


Joined: 17 Dec 2019
Posts: 222

PostPosted: Fri Mar 24, 2023 9:51 am    Post subject: Reply with quote

If you want a bootable system a bit faster, you could install sys-kernel/gentoo-kernel-bin for the time being. Remember to grub-mkconfig afterwards.
You could then tweak your kernel afterwards from the comfort of your X11 session.

Depending on your old setup, you may need to flip the switch on your secure boot configuration in your new BIOS.
Recompiling your system with your new CPU after making changes to make.conf might be needed in some cases.

hariskar wrote:
Any way to export logs, dmesg etc from chroot?

I like using ix.io.
See http://ix.io for the syntax.
The output of dmesg and contents of your kernel config & make.conf would be good for this kind of troubleshooting.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1534

PostPosted: Fri Mar 24, 2023 2:26 pm    Post subject: Reply with quote

hariskar wrote:
Does this kernel problem seem to be because of cpu config? gpu config? grub config? Something else?

I can copy all files I need to 2nd hard disk and reinstall because I am struggleing already 2 days with black screen...


Thanks a lot for reply!


Hey hariskar, I'm not a psychic. Please provide at least something we can start with. Maybe emerge --info will not be available in the chroot environment, if so - dpaste your make.config.

Best Regards,
Georgi
Back to top
View user's profile Send private message
hariskar
Apprentice
Apprentice


Joined: 29 Jan 2017
Posts: 168

PostPosted: Fri Mar 24, 2023 2:57 pm    Post subject: Reply with quote

logrusx wrote:
hariskar wrote:
Does this kernel problem seem to be because of cpu config? gpu config? grub config? Something else?

I can copy all files I need to 2nd hard disk and reinstall because I am struggleing already 2 days with black screen...


Thanks a lot for reply!


Hey hariskar, I'm not a psychic. Please provide at least something we can start with. Maybe emerge --info will not be available in the chroot environment, if so - dpaste your make.config.

Best Regards,
Georgi


Thank you for reply but I can't because I can chroot only to console, not x.

If I reinstall from scratch will kernel config that is needed be autodetected and selected, or do I have to find the correct settings otherwise I have the same black screen?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Fri Mar 24, 2023 4:36 pm    Post subject: Reply with quote

You can use wgetpaste to upload text files from the command line. It will print a short URL, which you then share here.

Since you did not get the correct kernel configuration automatically this time, it seems unlikely you will get a correct one automatically on a reinstall. However, if you use an all-purpose kernel that supports a wide variety of hardware, you might get what you want. This is what Irets suggested above.
Back to top
View user's profile Send private message
hariskar
Apprentice
Apprentice


Joined: 29 Jan 2017
Posts: 168

PostPosted: Sat Mar 25, 2023 4:40 am    Post subject: Reply with quote

Hu wrote:
You can use wgetpaste to upload text files from the command line. It will print a short URL, which you then share here.


Thanks a lot for wgetpaste!!
Let's start:

https://bpa.st/7P5CI
https://bpa.st/5DSCY
https://bpa.st/RLCIK
http://dpaste.com/AG3BZXK58
https://bpa.st/2D5C4

Please tell me if you need anything else!
Back to top
View user's profile Send private message
hariskar
Apprentice
Apprentice


Joined: 29 Jan 2017
Posts: 168

PostPosted: Sat Mar 25, 2023 6:03 am    Post subject: Reply with quote

I booted with kernel-bin, run lspci -k found running modules enabled i2c_piix4 and sp5100-tco and it booted!
Now I have no internet because network interface name changed from enp5s0 to enp3s0.

Thank you!
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1534

PostPosted: Sat Mar 25, 2023 11:36 am    Post subject: Reply with quote

hariskar wrote:
Hu wrote:
You can use wgetpaste to upload text files from the command line. It will print a short URL, which you then share here.


Thanks a lot for wgetpaste!!
Let's start:

https://bpa.st/7P5CI
https://bpa.st/5DSCY
https://bpa.st/RLCIK
http://dpaste.com/AG3BZXK58
https://bpa.st/2D5C4

Please tell me if you need anything else!

Code:
CFLAGS="-march=native -O2 -pipe"

Code:
CXXFLAGS="-march=native -O2 -pipe"


That implies you need to emerge -e @world, because things were compiled for your previous processor. I'm not sure if it'll work that way, because your compiler et.c, toolchain is still compiled with -march=native. Maybe someone of our more knowledgeable forum fellows could help here? What was the processor you moved off from?

Best Regards,
Georgi
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sat Mar 25, 2023 3:04 pm    Post subject: Reply with quote

If the new processor understands all features that the old processor understands, then recompiling is not necessary. If the new processor lacks some features that the old processor understands, and those features are used in a package, then that package needs to be rebuilt. In particularly unfortunate cases, the package that needs a rebuild may be broken until rebuilt and also be necessary in order to rebuild itself.

The output of resolve-march-native from both processors would let us determine whether the new processor is a superset of the old one. However, if you did not compute that before swapping out the hardware, collecting that output from the old processor now could be difficult.
Back to top
View user's profile Send private message
hariskar
Apprentice
Apprentice


Joined: 29 Jan 2017
Posts: 168

PostPosted: Sat Mar 25, 2023 3:53 pm    Post subject: Reply with quote

New processor has all CPU_FLAGS_X86 the old processor had plus two more. So do I need to emerge -e @world?
Thank you!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sat Mar 25, 2023 4:26 pm    Post subject: Reply with quote

We need to see what gcc interprets -march=native to mean, for both CPUs. CPU_FLAGS_X86 is not definitive. If we cannot get that, knowing the exact model of each CPU would let us check the manuals to make some estimates. Alternatively, you could choose to ignore the problem until you see evidence of the issue, in the form of reproducible Illegal instruction errors.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1534

PostPosted: Sat Mar 25, 2023 6:18 pm    Post subject: Reply with quote

hariskar wrote:
New processor has all CPU_FLAGS_X86 the old processor had plus two more. So do I need to emerge -e @world?
Thank you!


hariskar, if you don't answer our questions, we cannot help you. If you don't know how to answer, just say so, we'll help you with that too. There should be enough information for your old processor in the system logs. If you used openrc, they whould be in /var/log, if systemd, somebody else please advice how to extract that data from its binary file format.

Best Regards,
Georgi
Back to top
View user's profile Send private message
hariskar
Apprentice
Apprentice


Joined: 29 Jan 2017
Posts: 168

PostPosted: Sat Mar 25, 2023 7:59 pm    Post subject: Reply with quote

Previous cpu was haswell and this is znver3.

I run emerge -e @world, it doesn't last too long with this cpu. Thank you!
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