# Upgrading hardware to Ryzen

## RayDude

I've got a system with an old Pentium  something or other (dual core 3.1GHz) and I'm upgrading the CPU, mobo and memory.

The kernel is 4.9 because 4.10 is not Nvidia friendly (I wonder if that's changed yet). I compiled the kernel as generic x86-64 and used a highly modular configuration (from a live CD or something). It's slow but has been running like a champ for several months.

I'm upgrading to a Ryzen 5 1600 this evening and I'm wondering if the kernel will even work on a Ryzen and if there's any gotchas you guys might be able to warn me about.

I'm thinking I want to update the BIOS right away. Hope I don't have to boot windows to do that. It's a gigabyte mATX mobo so I think I'll be okay.

Anyone have any tips, advice, or warnings about upgrading an existing Gentoo image to Ryzen?

----------

## roboto

Kernel 4.10 works with Ryzen.

That's all I know.

----------

## Naib

uname -a

Linux fluidmotion 4.11.0-gentoo #2 SMP PREEMPT Fri May 5 22:35:20 BST 2017 x86_64 AMD Ryzen 5 1600 Six-Core Processor AuthenticAMD GNU/Linux

----------

## Tony0945

 *RayDude wrote:*   

> Anyone have any tips, advice, or warnings about upgrading an existing Gentoo image to Ryzen?

 

Move to gcc-6.3.0 before the hardware switch. That way you can start out with a compiler that can recognize Ryzen as native.

I'm planning this same move, but starting from Athlon II whose code is compatible with Ryzen.

It might be wise to rebuild everything as generic x86_64, but I doubt if it's necessary.

 As soon as it boots, I'm planning to "emerge -e @world --with-bdeps=y --keep-going"

----------

## RayDude

Well. I can't boot my SSD because my case / PSU / GPU are all fighting over the space needed by my SSD SATA power connector...

So I'm trying to boot from an SSD connected to a SATA to USB converter. But the kernel can't find the boot partition.

I'm pretty sure I have USB SSD installed in the kernel, but I need to boot some other OS to check my kernel and I can't find an Linux OS that will boot without acpi=off.

Does anyone know of a boot flash that will work on all cylinders with Ryzen?

----------

## Naib

If you are booting from usb, you need to send the rootdelay kernel parameter

Say rootdelay=10

----------

## NeddySeagoon

rootdelay=<secs> says wait <secs> then try to mount root.

rootwait will wait forever for the root filesystem to become available.

With root on USB, the USB stack must be available before root is mounted.  That means, either built into the kernel or loaded from the initrd.

Normally, root is mounted before USB is initialised, that's what rootdelay/rootwait fix.

----------

## Naib

True, this was assuming everything needed to start init is available (built-in or via initrd

----------

## RayDude

 *NeddySeagoon wrote:*   

> rootdelay=<secs> says wait <secs> then try to mount root.
> 
> rootwait will wait forever for the root filesystem to become available.
> 
> With root on USB, the USB stack must be available before root is mounted.  That means, either built into the kernel or loaded from the initrd.
> ...

 

Thanks Neddy!

I think that was likely the problem. I used an external power supply to connect the SSD to Sata and got the system to boot once I rebuilt the kernel using the sysrescue boot image's .config file. It's the easy way to get a working config. I'll pair it down once I have things stable.

I received the NvME today and got it working.

I'm running GCC-4.9-4, kernel 4.9.16 and everything seems stable with a 3.5 GHz core and my ram running 2933.

Nice to see you around. You've been helping me for over a decade now. Thanks much!

Brian

PS: I'm going to try to move to a later gcc, but I need to see about updating cuda to 9.0 first because I'm using cuda c for my project.

----------

## RayDude

 *Naib wrote:*   

> True, this was assuming everything needed to start init is available (built-in or via initrd

 

Thanks for your help. I really appreciate it.

I'm going to shoot for gcc-6.3 today... But I have to get cuda 9.0 working first since I need cuda C for my project.

----------

## RayDude

Does anyone know if nvidia binaries work with 4.10 or 4.11 yet?

----------

## RayDude

Well, cuda 9 is not yet released, so I can't touch anything if I want to continue to develop...

----------

## NeddySeagoon

RayDude,

Move to gcc-5.4 and fix the damage - read the news item.

When that's done, move to gcc-6.3.

Your gcc-4.9 may not build gcc-6.3

----------

## ct85711

 *Quote:*   

> Does anyone know if nvidia binaries work with 4.10 or 4.11 yet?

 

I can say that yes, nvidia-drivers does work on 4.10 for sure.  I just compiled the newest version available in portage with no issues.

 *Quote:*   

> Linux Oate 4.10.5-gentoo #2 SMP Thu Mar 23 19:57:59 CDT 2017 x86_64 AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G AuthenticAMD GNU/Linux
> 
> 

 

```
*  x11-drivers/nvidia-drivers

      Latest version available: 381.22

      Latest version installed: 381.09

```

One thing I will point out, that is that 381.x was compiled with gcc-5.4, and 381.22 was also recompiled with gcc-6.3.

I do recall that I did have to a patch on nvidia-drivers-378.13, but newer versions work without any extra patches.

I can't say on the legacy versions of nvidia-drivers, to know if they work or not.

----------

## Naib

381.09  needs an nvidia patch to work with 4.11

381.22  needs a kernel patch to work with 4.11 (sorted with 4.12)

----------

## Tony0945

R8168 does not compile on 4.11.0 with gcc-6.3.0  The definition of an interrupt structure is missing an element.

----------

## Tony0945

 *Tony0945 wrote:*   

> R8168 does not compile on 4.11.0 with gcc-6.3.0  The definition of an interrupt structure is missing an element.

 

Solved with 4.11.1

----------

## RayDude

 *NeddySeagoon wrote:*   

> RayDude,
> 
> Move to gcc-5.4 and fix the damage - read the news item.
> 
> When that's done, move to gcc-6.3.
> ...

 

I can't move beyond gcc-4.9 until cuda supports gcc-6.3 which is soon, hopefully.

Thanks much.

----------

## Naib

can you goto 5.x?

----------

## RayDude

 *Naib wrote:*   

> can you goto 5.x?

 

No. CudaC only supports up to 4.9. They are a bit behind the times. They'll catch up soon though...

I tried 5.4 and my code segfaults in the nvidia libraries.

----------

## Naib

CUDA 8 release, gcc 5.3 is fully supported

----------

## RayDude

 *Naib wrote:*   

> CUDA 8 release, gcc 5.3 is fully supported

 

Didn't know that. I have gcc-5.4 and that's what I tried. If 9.0 doesn't come out soon, I'll install 5.3 and try it.

Thanks much.

Edit: there is no ebuild for gcc 5.3.

----------

## ct85711

You can retrieve the gcc-5.3 ebuild and the associated patches from the git history for portage's tree...

----------

## likewhoa

 *roboto wrote:*   

> Kernel 4.10 works with Ryzen.
> 
> That's all I know.

 

Running 4.9.x just fine

----------

