Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
make install not working
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
arr3
n00b
n00b


Joined: 20 Jan 2025
Posts: 4

PostPosted: Mon Jan 20, 2025 9:33 pm    Post subject: make install not working Reply with quote

Hello, I have decided to build my own kernel through the handbook because using gentoo-kernel didn't work for some reason and when I try to run the "make install" command, it says:
Code:
scripts/link-vmlinux.sh: line 50: 22655 Killed                  ${ld} ${ldflags} -o ${output} ${wl}--whole-archive ${objs} ${wl}--no-whole-archive ${wl}--start-group ${libs} ${wl}--end-group $@ ${ldlibs}
  BTF     .btf.vmlinux.bin.o
libbpf: failed to get EHDR from .tmp_vmlinux.btf
pahole: .tmp_vmlinux.btf: Invalid argument
  LD      .tmp_vmlinux.kallsyms1
.btf.vmlinux.bin.o: file not recognized: file format not recognized
make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/usr/src/linux-6.6.67-gentoo/Makefile:1171: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

I don't understand what I'm doing wrong since compiling the kernel went good for 3 hours up until the end where it errored out.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3948

PostPosted: Mon Jan 20, 2025 9:51 pm    Post subject: Reply with quote

Welcome to Gentoo Forums!
Which kernel?
Code:

sys-kernel/gentoo-sources

?
Did you run
Code:

make menuconfig
make
make modules_install
make install

?
Do you have sufficient ram?
Plz post
Code:

grep CONFIG_DEBUG_INFO_BTF /usr/src/linux/.config

If it is enabled ,try to disable it.
_________________
:)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23026

PostPosted: Mon Jan 20, 2025 10:07 pm    Post subject: Reply with quote

A three hour build seems very long to me, which suggests that the configuration enables a large number of unnecessary options or that the build system has very limited resources. Modern amd64 desktops can build even fairly featureful kernels in tens of minutes. Carefully tuned kernels on high end desktops can be done in a few minutes.

If I had to guess, I would start with alamahant's suggestion about available RAM. What is the output of free -h?
Back to top
View user's profile Send private message
arr3
n00b
n00b


Joined: 20 Jan 2025
Posts: 4

PostPosted: Mon Jan 20, 2025 11:41 pm    Post subject: Reply with quote

I don't understand what you mean by which kernel, and yes I ran menuconfig and configured all the appropriate settings. This is the output when I ran the command:
Code:
CONFIG_DEBUG_INFO_BTF=y


This is the output when I ran free -h:
Code:
               total        used        free      shared  buff/cache   available
Mem:           5.8Gi       3.0Gi       2.1Gi       338Mi       1.3Gi       2.8Gi
Swap:             0B          0B          0B


What I meant when gentoo-kernel didn't work is that when I tried to reboot into Gentoo, it took me to a grub terminal. I tried to boot into Linux but nothing was in the /boot/ folder.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3948

PostPosted: Tue Jan 21, 2025 12:41 am    Post subject: Reply with quote

Gentoo has many kernel packages
Plz run
Code:

eix sys-kernel/*

and see some of them.
Since you are having a hard time booting I would suggest that
You properly install grub.
Then emerge
Code:

emerge -av sys-kernel/dracut   sys-kernel/gentoo-kernel-bin


Update grub and reboot.
You will most likely be able to boot into your new system provided your fstab is correct.
Then having taken care of booting into your new system start playing with building your own kernel from scratch.
What do you mean by that
Quote:

I tried to boot into Linux but nothing was in the /boot/ folder.



Have you mounted your boot partition?Is your boot partition defined in fstab?
_________________
:)
Back to top
View user's profile Send private message
arr3
n00b
n00b


Joined: 20 Jan 2025
Posts: 4

PostPosted: Tue Jan 21, 2025 12:53 am    Post subject: Reply with quote

alamahant wrote:
Gentoo has many kernel packages
Plz run
Code:

eix sys-kernel/*

and see some of them.
Since you are having a hard time booting I would suggest that
You properly install grub.
Then emerge
Code:

emerge sys-kernel/dracut   sys-kernel/gentoo-kernel-bin


Update grub and reboot.
You will most likely be able to boot into your new system provided your fstab is correct.
Then having taken care of booting into your new system start playing with building your own kernel from scratch.

Hello, I cannot boot into Gentoo without a kernel and like I said, gentoo-kernel doesn't seem work for me.
Code:
* sys-kernel/gentoo-kernel
     Available versions: 
     (5.10.232) 5.10.232^tu
     (5.10.233) ~5.10.233^tu
     (5.15.175) 5.15.175^tu
     (5.15.176) ~5.15.176^tu
     (6.1.121) 6.1.121^tu
     (6.1.122) ~6.1.122^tu
     (6.1.123) ~6.1.123^tu
     (6.1.124) ~6.1.124^tu
     (6.1.125) ~6.1.125^tu
     (6.1.126) ~6.1.126^tu
     (6.6.67) 6.6.67^tu
     (6.6.68) ~6.6.68^tu ~6.6.68-r1^tu
     (6.6.69) ~6.6.69^tu
     (6.6.70) ~6.6.70^tu
     (6.6.71) ~6.6.71^tu
     (6.6.72) ~6.6.72^tu
     (6.12.7) ~6.12.7^tu
     (6.12.8) ~6.12.8^tu
     (6.12.9) ~6.12.9^tu
     (6.12.10) ~6.12.10^tu
       {debug experimental generic-uki hardened +initramfs modules-compress modules-sign savedconfig secureboot +strip test}
     Homepage:            https://wiki.gentoo.org/wiki/Project:Distribution_Kernel https://www.kernel.org/
     Description:         Linux kernel built with Gentoo patches

* sys-kernel/gentoo-kernel-bin
     Available versions: 
     (5.10.232) 5.10.232^tu
     (5.10.233) ~5.10.233^tu
     (5.15.175) 5.15.175^tu
     (5.15.176) ~5.15.176^tu
     (6.1.121) 6.1.121^tu
     (6.1.122) ~6.1.122^tu
     (6.1.123) ~6.1.123^tu
     (6.1.124) ~6.1.124^tu
     (6.1.125) ~6.1.125^tu
     (6.1.126) ~6.1.126^tu
     (6.6.67) 6.6.67^tu
     (6.6.68) ~6.6.68^tu ~6.6.68-r1^tu
     (6.6.69) ~6.6.69^tu
     (6.6.70) ~6.6.70^tu
     (6.6.71) ~6.6.71^tu
     (6.6.72) ~6.6.72^tu
     (6.12.7) ~6.12.7^tu
     (6.12.8) ~6.12.8^tu
     (6.12.9) ~6.12.9^tu
     (6.12.10) ~6.12.10^tu
       {debug generic-uki +initramfs modules-compress test}
     Homepage:            https://www.kernel.org/
     Description:         Pre-built Linux kernel with Gentoo patches

[I] sys-kernel/gentoo-sources
     Available versions: 
     (5.10.230) *5.10.230^bs
     (5.10.232) 5.10.232^bs
     (5.10.233) ~5.10.233^bs
     (5.15.173) *5.15.173^bs
     (5.15.175) 5.15.175^bs
     (5.15.176) ~5.15.176^bs
     (6.1.118) *6.1.118^bs
     (6.1.121) 6.1.121^bs
     (6.1.123) ~6.1.123^bs
     (6.1.124) ~6.1.124^bs
     (6.1.125) ~6.1.125^bs
     (6.1.126) ~6.1.126^bs
     (6.6.62) *6.6.62^bs
     (6.6.67) 6.6.67^bs
     (6.6.70) ~6.6.70^bs
     (6.6.71) ~6.6.71^bs
     (6.6.72) ~6.6.72^bs
     (6.12.8) ~6.12.8^bs
     (6.12.9) ~6.12.9^bs
     (6.12.10) ~6.12.10^bs
       {build experimental symlink}
     Installed versions:  6.6.67(6.6.67)^bs(01:01:10 AM 01/20/2025)(-build -experimental -symlink)
     Homepage:            https://dev.gentoo.org/~mpagano/genpatches
     Description:         Full sources including the Gentoo patchset for the 6.12 kernel tree

Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3948

PostPosted: Tue Jan 21, 2025 1:01 am    Post subject: Reply with quote

gentoo-kernel might not be working for you but gentoo-kernel-bin might.
It is precompiled and installed as a binary.You do not need to run make etc.
_________________
:)
Back to top
View user's profile Send private message
arr3
n00b
n00b


Joined: 20 Jan 2025
Posts: 4

PostPosted: Tue Jan 21, 2025 1:20 am    Post subject: Reply with quote

alamahant wrote:
gentoo-kernel might not be working for you but gentoo-kernel-bin might.
It is precompiled and installed as a binary.You do not need to run make etc.

How do I use that kernel instead?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3948

PostPosted: Tue Jan 21, 2025 2:08 am    Post subject: Reply with quote

First make sure you have installed grub properly(grub-install .........)
You do have an ESP partition correct?You have properly populated your fstab file no?
Then you simply run
Code:

echo "sys-kernel/gentoo-kernel-bin initramfs" >> /etc/portage/package.use/gentoo-kernel-bin
emerge -av dracut gentoo-kernel-bin
grub-mkconfigg -o /boot/grub/grub.cfg
reboot

If you can not install gentoo-kernel-bin because you have already installed gentoo-kernel, then simply uninstall first gentoo-kernel.
_________________
:)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5327
Location: Bavaria

PostPosted: Tue Jan 21, 2025 2:22 am    Post subject: Reply with quote

arr3,

it is recommended to install also the package "sys-kernel/linux-firmware" ... and for an Intel CPU also "sys-firmware/intel-microcode" ... see also here:
https://wiki.gentoo.org/wiki/User:Pietinger/Draft/Quick_Installation_OpenRC_for_an_UEFI_System#Kernel

(maybe read before: https://wiki.gentoo.org/wiki/User:Pietinger/New_at_Gentoo to see how to chroot back into your installation)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
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