Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
AMD X399 + NVMe RAID + EFI + GPT + Kernel 5.2.0 + GCC 9.0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Bambabur
n00b
n00b


Joined: 04 Aug 2006
Posts: 3

PostPosted: Sat Aug 17, 2019 10:46 pm    Post subject: AMD X399 + NVMe RAID + EFI + GPT + Kernel 5.2.0 + GCC 9.0 Reply with quote

Hi everyone!

I have this configuration:

CPU: AMD Ryzen 1950x
MB: MEG X399 CREATION
RAM: 64 GByte@3200
HDD: 1 SSD with WIN 10 and a NVMe RAID 1 with two 4 TB HDD SATA
PARTITIONS: 1 NTFS on SSD - 1 EFI vfat (/boot partition) and 1 ext4 (Gentoo root / partition) on NVMe RAID 1

I already had Gentoo on a Socket 2011 i7 system so i wanted reuse that partition.
I booted everything using Ubuntu live USB, but also there is not NVMe raid support so i compiled and installed rcraid drivers using this guide
https://github.com/martinkarlweber/rcraid-patches

I chrooted to my Gentoo partition
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base

and i emerged world (all packages at 17/08/2019)

In this configuration i have:
Linux Kernel 5.2.0
GCC 9.0
GRUB 2.0

i configured kernel as suggested here for new Ryzen CPU:
https://wiki.gentoo.org/wiki/Ryzen

Now we need to compile kernel with initramfs image.
i used genkernel to generate kernel:

Code:
genkernel --multipath --dmraid --lvm --install all


I configured GRUB 2.0 (UEFI with GPT):
https://wiki.gentoo.org/wiki/GRUB2

Code:
grub-install --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg


Now we have to create a boot entry in EFI:

https://wiki.gentoo.org/wiki/Efibootmgr

Now the kernel is installed, but in the initramfs image there is not rcraid driver.
We need to compile it again in the target Gentoo system:

https://github.com/martinkarlweber/rcraid-patches

But we have to change something in the file driver_sdk/src/Makefile or it will not compile with GCC 9
BEFORE TO LAUNCH INSTALL
Add these rows:

Quote:
EXTRA_CFLAGS += -fno-pie
EXTRA_CFLAGS += -Wno-incompatible-pointer-types

And change the file driver_sdk/install or it will not find the initramfs file in Gentoo

Quote:
-cp -ap /boot/initrd.img-$RELEASE /boot/initrd.img-$RELEASE.bak
+cp -ap /boot/initramfs-$RELEASE.img /boot/initrd.img-$RELEASE.bak


-mkinitramfs -o /boot/initrd.img-$RELEASE $RELEASE
+mkinitramfs -o /boot/initramfs-$RELEASE.img $RELEASE[/code]

Now u can launch install file of rcraid package.

Sometimes the install does not generate the initramfs correctly anyway, so u have to generate it with genkernel.
Open the file /usr/share/genkernel/arch/x86_64/modules_load and add rcraid module in MODULES_SCSI variable
Now regenerate initramfs with genkernel

Code:
genkernel --multipath --dmraid --lvm --install initramfs


U can check if the module is in the initramfs with

Code:
lsinitrd /boot/initramfs-xxxx.img


Now we configure /etc/fstab for boot:

Quote:
UUID=AAAAAAA /boot vfat auto,defaults 1 2
UUID=BBBBBBB / ext4 noatime 0 1


How can u find UUID for your partitions (AAAAAAA and BBBBBBB are dummy)?
U can use this command :
Code:
ls -l /dev/disk/by-uuid/


Now everything is done!
Of course you must enter computer setup and choose your Gentoo boot entry for boot!

I hope it could be useful!!! :D :D :D
Back to top
View user's profile Send private message
alamahant
Tux's lil' helper
Tux's lil' helper


Joined: 23 Mar 2019
Posts: 92

PostPosted: Mon Aug 19, 2019 11:27 am    Post subject: Reply with quote

I have been flirting with the idea of a threadripper workstation with Gentoo installed..
Is it a dream when compiling?
Back to top
View user's profile Send private message
Bambabur
n00b
n00b


Joined: 04 Aug 2006
Posts: 3

PostPosted: Tue Aug 20, 2019 8:46 am    Post subject: Reply with quote

I emerged all packages(more than 700) in 8 hours

Chromium now compiles in 1 hour or less... with a i7 was compiling in 2-3 hours :wink:
Back to top
View user's profile Send private message
guru meditation
n00b
n00b


Joined: 18 Mar 2018
Posts: 35
Location: Planet Earth

PostPosted: Thu Aug 22, 2019 6:40 am    Post subject: Reply with quote

alamahant wrote:
Is it a dream when compiling?


It creates a big grin :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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