Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] i've been trying to install gentoo for 5 days
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Thu Nov 09, 2023 9:45 pm    Post subject: [SOLVED] i've been trying to install gentoo for 5 days Reply with quote

I have been trying to install gentoo for the last 5 days and each time i get a different error.
i am doing a triple boot with gentoo, windows and pop os
I am getting farther at each install, but there is allways an error.
this time it seemed like i finally did it, but when i rebooted, the ethernet cards werent found
i searched and all i had to do was enable some especial modules on the kernel, wich i did
(my ethernet controller is realtek RTL8111/8168/8411 PCI Express Gigabit (rev 0c))
but then when i tried running grub-mkconfig the grub folder was missing from boot
even worst, boot wasn't mounting (unknow filesystem type: vfat)
i researched and i had to eselect the kernel, but none appeared in the list
then had to re emerge the gentoo-sources with symlink flag
i saw on a discussion on this forum to just make a grub folder and run mkconfig anyway
but when i rebooted nothing changed, and i also noticed the default kernel appeared at /usr/src
i tried loading my custom kernel through advanced options for gentoo, but the boot freezes at loading ramdisk
when i do grub mkconfig, os prober doesn't recognize the other OSes, even tough they appear on grub menu
can i recover this install?
also what things should i add or remove on my kernel?
i have a Intel Celeron G3930 (2) @ 2.900GHz cpu and a NVIDIA GeForce GT 1030 graphics card
i want use it as a normal day to day computer, do some gaming, programing and browse the internet
i also want my config to be more performance oriented but nothing too crazy since i am a noob at linux

the output of lspci below in case its needed:
Code:
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 06)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 06)
00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31)
00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #6 (rev f1)
00:1c.6 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #7 (rev f1)
00:1c.7 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #8 (rev f1)
00:1d.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 (rev f1)
00:1d.1 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #10 (rev f1)
00:1f.0 ISA bridge: Intel Corporation H110 Chipset LPC/eSPI Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31)
00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31)
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31)
01:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)



[Moderator edit: added [code] tags to preserve output layout. -- pietinger]


Last edited by lp_08 on Sat Nov 11, 2023 10:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4166
Location: Bavaria

PostPosted: Fri Nov 10, 2023 12:27 am    Post subject: Reply with quote

lp_08,

Welcome to Gentoo Forums ! :D

First of all: If you do an installation where you already have some Operating Systems you have to consider some additional things, like e.g. there is already an ESP (efi system partition) you really should use also for Gentoo.

Our AMD64 Handbook tries to explain all regulary steps, but for special details you should read also some of our Wiki Pages.

What I am recommending to you now is just a personal opinion:

1. Use our binary Dist-Kernel (gentoo-kernel-bin) as described in:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Distribution_kernels
Stop if you read the title: "Installing the kernel sources" !
Many Users dont read the Note below this title:
Quote:
This section is only relevant when using the following genkernel (hybrid) or manual kernel management approach.

Yes, after "emerge --ask sys-kernel/gentoo-kernel-bin" there is nothing to do anymore. But you should have done installing the Firmware and Microcode; you have an Intel CPU so you will need:
https://wiki.gentoo.org/wiki/Intel_microcode ... dont panic ... the only action you must do is:
Code:
emerge --ask sys-firmware/intel-microcode

and of course also:
Code:
emerge --ask sys-kernel/linux-firmware

Later - when you have a bootable system - you can try to configure your own kernel. Dont think this is done in some hours ... it will take DAYS ... my recommendation for this:
Start with my article here, where you also will find many links to other articles:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration

2. Read (ONLY read ;-) ):

https://wiki.gentoo.org/wiki/EFI_System_Partition
https://wiki.gentoo.org/wiki/EFI_stub
https://wiki.gentoo.org/wiki/Efibootmgr
My first post of: https://forums.gentoo.org/viewtopic-t-1165115.html


To your actual problem:

I recommend to do boot with our GentooLiveCD (our MinimalCd) and give us the output of:
- lsblk
- blkid
- parted -l
- lspci -k
- efibootmgr

After this you can always go into your Gentoo installation by doing the same steps as you did at the beginning of your installation:
Code:
# mount /dev/XXXXXXX /mnt/gentoo
# mount -t proc /proc /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
# mount --bind /run /mnt/gentoo/run
# chroot /mnt/gentoo /bin/bash
# . /etc/profile

# I recommend strongly to use the existant ESP of your system - OR - you wait until you have given us the informations and we respond
# mount /dev/XXXXXXX /efi

Give us also information about you used settings:
a) Which stage3 have you used ? (OpenRC or systemd ? Multilib or No-Multilib ?)
b) Which CPU and machine do you have ?
c) At which point you are stuck at the moment ?
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 12:52 am    Post subject: Reply with quote

pietinger wrote:
lp_08,

Welcome to Gentoo Forums !

First of all: If you do an installation where you already have some Operating Systems you have to consider some additional things, like e.g. there is already an ESP (efi system partition) you really should use also for Gentoo.

Our AMD64 Handbook tries to explain all regulary steps, but for special details you should read also some of our Wiki Pages.

What I am recommending to you now is just a personal opinion:

1. Use our binary Dist-Kernel (gentoo-kernel-bin) as described in:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Distribution_kernels
Stop if you read the title: "Installing the kernel sources" !
Many Users dont read the Note below this title:
Quote:
This section is only relevant when using the following genkernel (hybrid) or manual kernel management approach.

Yes, after "emerge --ask sys-kernel/gentoo-kernel-bin" there is nothing to do anymore. But you should have done installing the Firmware and Microcode; you have an Intel CPU so you will need:
https://wiki.gentoo.org/wiki/Intel_microcode ... dont panic ... the only action you must do is:
Code:
emerge --ask sys-firmware/intel-microcode

and of course also:
Code:
emerge --ask sys-kernel/linux-firmware

Later - when you have a bootable system - you can try to configure your own kernel. Dont think this is done in some hours ... it will take DAYS ... my recommendation for this:
Start with my article here, where you also will find many links to other articles:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration

2. Read:

https://wiki.gentoo.org/wiki/EFI_System_Partition
https://wiki.gentoo.org/wiki/EFI_stub
https://wiki.gentoo.org/wiki/Efibootmgr
My first post of: https://forums.gentoo.org/viewtopic-t-1165115.html


To your actual problem:

I recommend to do boot with our GentooLiveCD (our MinimalCd) and give us the output of:
- lsblk
- blkid
- parted -l
- lspci -k
- efibootmgr

After this you can always go into your Gentoo installation by doing the same steps as you did at the beginning of your installation:
Code:
# mount /dev/XXXXXXX /mnt/gentoo
# mount -t proc /proc /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
# mount --bind /run /mnt/gentoo/run
# chroot /mnt/gentoo /bin/bash
# . /etc/profile

# I recommend strongly to use the existant ESP of your system - OR - you wait until you have given us the informations and we respond
# mount /dev/XXXXXXX /efi

Give us also information about you used settings:
a) Which stage3 have you used ? (OpenRC or systemd ? Multilib or No-Multilib ?)
b) Which CPU and machine do you have ?
c) At which point you are stuck at the moment ?


thanks for the links! I already have gentoo installed and running with open-rc
my cpu is an intel celeron G3930 on a Neologic desktop pc
the issue my system is facing is that it doesn't detect my ethernet card, realtek RTL8111/8168/8411 and also the boot partition does not mount
i think it has to do with the way i generated fstab via genfstab -U wich probably made it hidden or invisible, it feels like the init system is a separate thing from gentoo
unfortunatly its already past my bedtime and i am very tired so i will post the output of the commands you asked tomorrow when i get back from school at about 2pm Sao Paulo time
also, do i nedd to boot with the live cd to get the output? It would be easier to provide them if i chrooted via pop os
thanks again for disposition to help me
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3140

PostPosted: Fri Nov 10, 2023 1:09 am    Post subject: Reply with quote

Those commands describe hardware configuration rather than the OS itself, so you can even provide the results from pop-os.
Regarding boot not mounting, it's most likely a missing kernel module for FAT. Check out 'zgrep FAT /proc/config.gz' or similar grep .config in your linux kernel source directory if the former doesn't exist.
Not mounting /boot should not stop your system from booting though.

Your first post was quite chaotic. What are you actually stuck at?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4166
Location: Bavaria

PostPosted: Fri Nov 10, 2023 1:11 am    Post subject: Reply with quote

lp_08 wrote:
the issue my system is facing is that it doesn't detect my ethernet card, realtek RTL8111/8168/8411 [...]

After booting with GentooLiveCD ? .... or MinimalCD ? If MinimalCD then please use LiveCD.

lp_08 wrote:
[...] and also the boot partition does not mount

Usually the boot partition is defined in /etc/fstab with "noauto" ... BUT ... If you read my first post of: https://forums.gentoo.org/viewtopic-t-1165115.html you will see there is no extra boot partition anymore ... only the ESP mounted to /efi ;-)

lp_08 wrote:
[...] fstab via genfstab -U [...]

Please give us additionally also your actual /etc/fstab

lp_08 wrote:
[...] so i will post the output of the commands you asked tomorrow when i get back from school at about 2pm Sao Paulo time[...]

Take your time :-) We are also not always online ... and ... I am not alone here ;-)

lp_08 wrote:
[...] do i nedd to boot with the live cd to get the output? It would be easier to provide them if i chrooted via pop os

Usually it is not necessary (if pop OS has also "efibootmgr") ... Later ... very much later ... when you try to make your own kernel you should boot with our GentooLiveCD because you will get one information only with our kernel (dmesg | grep firmware).

lp_08 wrote:
thanks again for disposition to help me

You are very Welcome !
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54266
Location: 56N 3W

PostPosted: Fri Nov 10, 2023 5:20 pm    Post subject: Reply with quote

lp_08,

Lets try a few network tests before concluding that yon nee a kernel change.
Boot your Gentoo.

Code:
dmesg | grep eth0
should show eth0 being renamed to something else.
What is the something else?

What interfaces do you see in
Code:
ifconfig -a

lo:
sit: maybe, what else?

Your network card needs the r8169 kernel module.

What does
Code:
modprobe r8169
return.
Just the prompt, with no error, means that it worked.

Try the tests above again.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 5:30 pm    Post subject: Reply with quote

pietinger wrote:

To your actual problem:

I recommend to do boot with our GentooLiveCD (our MinimalCd) and give us the output of:
- lsblk
- blkid
- parted -l
- lspci -k
- efibootmgr



lsblk
loop0 7:0 0 105.8M 1 loop
loop1 7:1 0 2.3M 1 loop
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 699M 0 part
├─sda2 8:2 0 224.9G 0 part
├─sda3 8:3 0 456.1G 0 part
├─sda4 8:4 0 63.5G 0 part
├─sda5 8:5 0 180G 0 part /
└─sda6 8:6 0 3.3G 0 part [SWAP]

blkid
https://pastebin.com/PS5WDbGM

lspci
https://pastebin.com/srBD1ipN

efibootmgr
https://pastebin.com/mwCY12yY

parted -l wasnt working, command not found

i was using the install-amd64-minimal iso to install gentoo
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 5:41 pm    Post subject: Reply with quote

NeddySeagoon wrote:


Lets try a few network tests before concluding that yon nee a kernel change.
Boot your Gentoo.

Code:
dmesg | grep eth0
should show eth0 being renamed to something else.
What is the something else?


enp2s0
NeddySeagoon wrote:

What interfaces do you see in
Code:
ifconfig -a

lo:
sit: maybe, what else?


when i do it from popOS chroot it lists enp2s0, lo and enxaabbccddeeff, but when i run it through gentoo it only lists lo
full output: https://pastebin.com/JLZpFkB6

NeddySeagoon wrote:

Your network card needs the r8169 kernel module.

What does
Code:
modprobe r8169
return.
Just the prompt, with no error, means that it worked.

Try the tests above again.


it returns
modprobe: FATAL: Module r8169 not found in directory /lib/modules/5.19.16-76051916-generic
however the system doesnt seem to be loading the kernel i had compiled, wich had this module enabled
when i try to pick it from advanced options in grub, the boot freezes at loading initial ramdisk


Last edited by lp_08 on Fri Nov 10, 2023 5:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 5:56 pm    Post subject: Reply with quote

szatox wrote:
Those commands describe hardware configuration rather than the OS itself, so you can even provide the results from pop-os.
Regarding boot not mounting, it's most likely a missing kernel module for FAT. Check out 'zgrep FAT /proc/config.gz' or similar grep .config in your linux kernel source directory if the former doesn't exist.
Not mounting /boot should not stop your system from booting though


it displays:
FAT_PS=m
VFAT_PS=m
FAT-DEFAULT_CODEPAGE=437
FAT-DEFAULT_IONCHARSET="ascii"
FAT-DEFAULT_UTF8=y
EXFAT_PS=m
EXFAT_DEFAULT_IONCHARSET="utf8"

szatox wrote:
Your first post was quite chaotic. What are you actually stuck at?


sorry, i was very stressed and was my first time posting here. My problem is that grub doesn't recognize my custom kernel wich has the modules necessary for my ethernet card to work
when i boot it says that i am using kernel 6.5, but the one i compiled was gentoo-sources 6.1
boot also does not mount due to the fat issue
i compressed my kernel with lz4 if that's relevant
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4166
Location: Bavaria

PostPosted: Fri Nov 10, 2023 7:13 pm    Post subject: Reply with quote

I assume you have booted POP OS when doing "lspci -k" because you have the correct kernel driver in use: r8169
Code:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
   Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet
   Kernel driver in use: r8169

I would like to push the problem with ethernet to the back (because then it will take care of itself).


You should know that it doesn't make sense to have two grub.

Now you have to make a decision:

Do you want to use the grub for all Linuxes ?

If yes, it has a disadvantage:

If you update a kernel, you also have to give the grub a new configuration (so that it finds the new kernel). If you use a POP-grub and update the Gentoo kernel you have to boot POP OS AFTER the kernel update and configure the grub there. The same the other way round: If you update the POP kernel and have a Gentoo grub, you have to boot Gentoo after the update from the POP kernel and configure the Gentoo grub. (The other two combinations don't need this of course: If you update the Gentoo kernel and have a Gentoo-grub, you can/must only configure the Gentoo-grub after the kernel update. The same applies to pop-kernel with pop-grub).

You could now come up with the idea and say: I use two grubs and can choose which grub I boot in the UEFI BIOS. Yes ... but you have to press a key when you start the computer to get into the BIOS and then you have to select something. If you have to do that anyway ... you can boot our Gentoo kernel directly ! That's the reason why I gave you the information about a STUB kernel.

(If you haven't already, please read everything I've given you).

I also recommended the Dist-kernel because it has EVERYTHING already built in - it is also already a STUB kernel !

What I would recommend to you:

1. Boot your POP OS and clean up your UEFI entries first (with "efibootmgr -b x -B x" see WIKI article about "efibootmgr")
2. Clean up also your \efi\...-directories (you need only POP OS and Windows)
3. Chroot into Gentoo and mount your first partition /dev/sda1 to /efi
4. Cean up all in /boot
4. Install the dist-kernel ... REALLY ... You can do a manual configuration later ... because you can have so many kernels you want
5. Make a decision: Direct booting this kernel OR using POP grub OR using Gentoo grub OR using two grubs !
6. Call us for help (if you need) with your decision ;-)
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 7:45 pm    Post subject: Reply with quote

pietinger wrote:

What I would recommend to you:
1. Boot your POP OS and clean up your UEFI entries first (with "efibootmgr -b x -B x" see WIKI article about "efibootmgr")
2. Clean up also your \efi\...-directories (you need only POP OS and Windows)
3. Chroot into Gentoo and mount your first partition /dev/sda1 to /efi
4. Cean up all in /boot
4. Install the dist-kernel ... REALLY ... You can do a manual configuration later ... because you can have so many kernels you want
5. Make a decision: Direct booting this kernel OR using POP grub OR using Gentoo grub OR using two grubs !
6. Call us for help (if you need) with your decision ;-)


alright, i will use the dist kernel
would you recommend me using the stub kernel? i find myself going to another os through f12 most of the time
if grub is the best option i would prefer to remove it from popOS since i barely use this system
also wich things should i remove from uefi entries and from /efi?

efibootmgr lists
Boot0000* Pop!_OS 22.04 LTS
Boot0001* Windows Boot Manager
Boot0002* Hard Drive
Boot0003* GRUB
Boot0004* grub_uefi
Boot0005* gentoo
Boot0006* UEFI OS

boot 6 is my pendrive i belive and removing the one named hard drive does not seem like a good idea

boot/efi has a bunch of gentoo stuff:
Code:

$RECYCLE.BIN'                      grub                              loader                         vmlinuz-6.1.57-gentoo.old

 5dc4c8e01a486b5914ac3a10632a37d0   initramfs-6.1.57-gentoo.img       System.map-6.1.57-gentoo       vmlinuz-linux

 config-6.1.57-gentoo               initramfs-6.1.57-gentoo.img.old   System.map-6.1.57-gentoo.old

 config-6.1.57-gentoo.old           initramfs-linux-fallback.img     'System Volume Information'

 EFI                                initramfs-linux.img               vmlinuz-6.1.57-gentoo

/boot/efi/EFI has:
Code:
Boot  gentoo  GRUB  grub_uefi  Linux  Microsoft  pop  Pop_OS-c06ce508-ba8c-43c3-9fa1-1abf1daac222  systemd


by cleaning you mean deleting all of those genntoo stuff right? Should i also delete the folders such as EFI?
also internet is not working on gentoo even in chroot from popOS, so i will use the pendrive to do the stuff
and thanks again for the support!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54266
Location: 56N 3W

PostPosted: Fri Nov 10, 2023 9:05 pm    Post subject: Reply with quote

lp_08,

Not running the kernel you think you are is a problem.
What does
Code:
uname -a
tellfrom your gentoo?

Code:
$ uname -a
Linux neddy_static 6.6.1-gentoo #1 SMP PREEMPT_DYNAMIC Fri Nov 10 19:37:52 GMT 2023 x86_64 AMD Ryzen 9 5950X 16-Core Processor AuthenticAMD GNU/Linux


The 6.6.1-gentoo is the version.
Fri Nov 10 19:37:52 GMT 2023 is the build time of the running kernel.
Do they both look right to you?

If you are not using the kernel you built, including the r8169 module, we need to fix that.
Installing another kernel may not help. Then you need to boot that, so you could have the same problem.

I'm with pietinger about EFI system partitions and boot loaders.
Have exactly one of each. You can have more but it will only make your head hurt.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 9:28 pm    Post subject: Reply with quote

NeddySeagoon wrote:
lp_08,

Not running the kernel you think you are is a problem.
What does
Code:
uname -a
tellfrom your gentoo?

Code:
$ uname -a
Linux neddy_static 6.6.1-gentoo #1 SMP PREEMPT_DYNAMIC Fri Nov 10 19:37:52 GMT 2023 x86_64 AMD Ryzen 9 5950X 16-Core Processor AuthenticAMD GNU/Linux


The 6.6.1-gentoo is the version.
Fri Nov 10 19:37:52 GMT 2023 is the build time of the running kernel.
Do they both look right to you?

If you are not using the kernel you built, including the r8169 module, we need to fix that.
Installing another kernel may not help. Then you need to boot that, so you could have the same problem.

I'm with pietinger about EFI system partitions and boot loaders.
Have exactly one of each. You can have more but it will only make your head hurt.


it shows 6.5.9 arch2-1 as the kernel, compiled on october 26 1am, wich is days before i even tried installing gentoo for the first time. How can i get my kernel to work? i will install the bin distro kernel as was suggested.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54266
Location: 56N 3W

PostPosted: Fri Nov 10, 2023 9:37 pm    Post subject: Reply with quote

lp_08,

We need to follow the boot trail.

What does efibootmgr show as the boot order and how do you boot Gentoo?
If you install another kernel how will yo boot it?

Code:
$ efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0001
Boot0000* SYSLINUX   HD(1,GPT,43ac34f1-f058-49ec-893e-151332733d0f,0x800,0x1e800)/File(\EFI\SYSLINUX\SYSLINUX.EFI)
Boot0001* UEFI OS   HD(1,GPT,43ac34f1-f058-49ec-893e-151332733d0f,0x800,0x1e800)/File(\EFI\BOOT\BOOTX64.EFI)0000424f


I boot SYSLINUX or an EFI stub kernel.
syslinux manages everything else.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 9:48 pm    Post subject: Reply with quote

NeddySeagoon wrote:
What does efibootmgr show as the boot order and how do you boot Gentoo?

i am booting gentoo with grub
efiboot shows:
Code:
➜  ~ efibootmgr -v
BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0004,0003,0000,0001,0002
Boot0000* Pop!_OS 22.04 LTS   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\SYSTEMD\SYSTEMD-BOOTX64.EFI)
Boot0001* Windows Boot Manager   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* Hard Drive   BBS(HD,,0x0)..GO..NO........o.T.O.S.H.I.B.A. .D.T.0.1.A.C.A.1.0.0....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . .2. .F.8.E.E.0.S.S.N........BO
Boot0003* GRUB   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GRUB\GRUBX64.EFI)
Boot0004* grub_uefi   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GRUB_UEFI\GRUBX64.EFI)
Boot0005* gentoo   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GENTOO\GRUBX64.EFI)


NeddySeagoon wrote:
If you install another kernel how will yo boot it?

thats what i am trying to figure out :p
grub keeps loading this strange kernel and when i tried to load the one i compiled through advanced options for gentoo it froze at loading initial ramdisk
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54266
Location: 56N 3W

PostPosted: Fri Nov 10, 2023 10:04 pm    Post subject: Reply with quote

lp_08,

You have three different GRUBX64.EFI installs.
Code:
Boot0003* GRUB   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GRUB\GRUBX64.EFI)
Boot0004* grub_uefi   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GRUB_UEFI\GRUBX64.EFI)
Boot0005* gentoo   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GENTOO\GRUBX64.EFI


I suspect that they are all the same. The GRUBX64.EFI loads the rest of grub from /boot/grub which in turn shows the boot menu in /boot/grub/grub.cfg

How many different /boot do you have, the right answer is one?
What is the content of /boot/grub/grub.cfg
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4166
Location: Bavaria

PostPosted: Fri Nov 10, 2023 10:18 pm    Post subject: Reply with quote

lp_08 wrote:
[...]if grub is the best option i would prefer to remove it from popOS since i barely use this system [...]

I interpret this as a decision for ONE grub installed by Gentoo.

Now ... as you have not read some articles right now ... Mounting the ESP to /boot is outdated ... Mounting it to /boot/efi is even more outdated ... but you did ... okay, no problem ... we know now ;-) Better is doing waht our AMD64 handbook says: Mount it to /efi

lp_08 wrote:
also wich things should i remove from uefi entries and from /efi?

efibootmgr lists
Boot0000* Pop!_OS 22.04 LTS
Boot0001* Windows Boot Manager
Boot0002* Hard Drive
Boot0003* GRUB
Boot0004* grub_uefi
Boot0005* gentoo
Boot0006* UEFI OS

boot 6 is my pendrive i belive and removing the one named hard drive does not seem like a good idea

To be able to answer your question I would need the information HOW you boot your POP OS ? With 0000 or with 0003 or 0004 ?

IF you boot POP OS with 0000 THEN you might delete:
a) UEFI entries 0003, 0004 and 0005 and
b) directories: /boot/efi/EFI/GRUB, /boot/efi/EFI/grub_uefi and /boot/efi/EFI/gentoo (we install this again later)

... Maybe you have mounted your ESP to different mountpoints in the past ... because of the mess you have ...

/boot/efi should ONLY have one directory: /boot/efi/EFI

IF you mount your ESP to /efi you will get: /efi/EFI/... => This is the content of your ESP:
Code:
Boot  gentoo  GRUB  grub_uefi  Linux  Microsoft  pop  Pop_OS-c06ce508-ba8c-43c3-9fa1-1abf1daac222  systemd

lp_08 wrote:

boot/efi has a bunch of gentoo stuff:
Code:

$RECYCLE.BIN'                      grub                              loader                         vmlinuz-6.1.57-gentoo.old

 5dc4c8e01a486b5914ac3a10632a37d0   initramfs-6.1.57-gentoo.img       System.map-6.1.57-gentoo       vmlinuz-linux

 config-6.1.57-gentoo               initramfs-6.1.57-gentoo.img.old   System.map-6.1.57-gentoo.old

 config-6.1.57-gentoo.old           initramfs-linux-fallback.img     'System Volume Information'

 EFI                                initramfs-linux.img               vmlinuz-6.1.57-gentoo

All this - EXCEPT ./EFI - is a mess ... just delete it ...

A kernel goes either INTO /boot/.

- OR -

If using as stub kernel - INTO /efi/EFI/YOURNAMEYOULIKE/bzImage.efi

... At last you should examine /boot/* directly ... because we install Kernel AND grub again you can delete all there, EXCEPT /efi (if you have mounted your ESP again to /boot/efi)

You really should read this short post: https://forums.gentoo.org/viewtopic-t-1165115.html

If all is clean, do:

1. Chroot into Gentoo
2. Mount ESP (/dev/sda1) to /efi
2. Install the dist-kernel
3. Do again installing grub with https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#EFI_systems =>
Code:
# grub-install --target=x86_64-efi --efi-directory=/efi
- AND -
# grub-mkconfig -o /boot/grub/grub.cfg

(nothing more)
4. Check with "efibootmgr" (install with "emerge efibootmgr" if not in your gentoo installation) IF all is okay
5. If you have not done some steps from the installation do it now
6. Give us your /etc/fstab and /etc/resolv.conf and the output of "rc-update" and "ls -al /etc/init.d/net.*"
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 10:19 pm    Post subject: Reply with quote

NeddySeagoon wrote:
lp_08,

You have three different GRUBX64.EFI installs.
Code:
Boot0003* GRUB   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GRUB\GRUBX64.EFI)
Boot0004* grub_uefi   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GRUB_UEFI\GRUBX64.EFI)
Boot0005* gentoo   HD(1,GPT,1d790799-16b4-206e-4bb8-97b1af85823b,0x800,0x15d800)/File(\EFI\GENTOO\GRUBX64.EFI


I suspect that they are all the same. The GRUBX64.EFI loads the rest of grub from /boot/grub which in turn shows the boot menu in /boot/grub/grub.cfg

How many different /boot do you have, the right answer is one?
What is the content of /boot/grub/grub.cfg


well, when i rebooted for the first time after finishing the install, the grub folder disappeared from boot along with the grub cgf, so i mkdir /boot/grub and regenerated the cfg as many people in one post suggested

my grub.cfg
https://pastebin.com/7uhcVSFm

as for how many /boot its just one indeed
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4166
Location: Bavaria

PostPosted: Fri Nov 10, 2023 10:29 pm    Post subject: Reply with quote

lp_08,

you have answered Neddy the same time as I wrote an answer ... so, please look one post above your post ;-)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54266
Location: 56N 3W

PostPosted: Fri Nov 10, 2023 10:32 pm    Post subject: Reply with quote

lp_08,

Code:
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7d57c834-c5ad-405b-8855-786fba8196e5' {
   load_video
   insmod gzio
   insmod part_gpt
   insmod ext2
   set root='hd0,gpt5'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  7d57c834-c5ad-405b-8855-786fba8196e5
   else
     search --no-floppy --fs-uuid --set=root 7d57c834-c5ad-405b-8855-786fba8196e5
   fi
   echo   'Loading Linux 6.1.57-gentoo ...'
   linux   /boot/vmlinuz-6.1.57-gentoo root=PARTUUID=f572b265-3c04-144c-a59a-c03c2fc6ca64 ro
}


This loads the kernel from a file called /boot/vmlinuz-6.1.57-gentoo does that file exist?
What does file /boot/vmlinuz-6.1.57-gentoo say about it?
It should include the kernel version and build time.

Its odd that you appear to have a /boot/efi/vmlinuz-6.1.57-gentoo
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Fri Nov 10, 2023 10:44 pm    Post subject: Reply with quote

pietinger wrote:
lp_08 wrote:
[...]if grub is the best option i would prefer to remove it from popOS since i barely use this system [...]

I interpret this as a decision for ONE grub installed by Gentoo.

Now ... as you have not read some articles right now ... Mounting the ESP to /boot is outdated ... Mounting it to /boot/efi is even more outdated ... but you did ... okay, no problem ... we know now ;-) Better is doing waht our AMD64 handbook says: Mount it to /efi

lp_08 wrote:
also wich things should i remove from uefi entries and from /efi?

efibootmgr lists
Boot0000* Pop!_OS 22.04 LTS
Boot0001* Windows Boot Manager
Boot0002* Hard Drive
Boot0003* GRUB
Boot0004* grub_uefi
Boot0005* gentoo
Boot0006* UEFI OS

boot 6 is my pendrive i belive and removing the one named hard drive does not seem like a good idea

To be able to answer your question I would need the information HOW you boot your POP OS ? With 0000 or with 0003 or 0004 ?

IF you boot POP OS with 0000 THEN you might delete:
a) UEFI entries 0003, 0004 and 0005 and
b) directories: /boot/efi/EFI/GRUB, /boot/efi/EFI/grub_uefi and /boot/efi/EFI/gentoo (we install this again later)

... Maybe you have mounted your ESP to different mountpoints in the past ... because of the mess you have ...

/boot/efi should ONLY have one directory: /boot/efi/EFI

IF you mount your ESP to /efi you will get: /efi/EFI/... => This is the content of your ESP:
Code:
Boot  gentoo  GRUB  grub_uefi  Linux  Microsoft  pop  Pop_OS-c06ce508-ba8c-43c3-9fa1-1abf1daac222  systemd

lp_08 wrote:

boot/efi has a bunch of gentoo stuff:
Code:

$RECYCLE.BIN'                      grub                              loader                         vmlinuz-6.1.57-gentoo.old

 5dc4c8e01a486b5914ac3a10632a37d0   initramfs-6.1.57-gentoo.img       System.map-6.1.57-gentoo       vmlinuz-linux

 config-6.1.57-gentoo               initramfs-6.1.57-gentoo.img.old   System.map-6.1.57-gentoo.old

 config-6.1.57-gentoo.old           initramfs-linux-fallback.img     'System Volume Information'

 EFI                                initramfs-linux.img               vmlinuz-6.1.57-gentoo

All this - EXCEPT ./EFI - is a mess ... just delete it ...

A kernel goes either INTO /boot/.

- OR -

If using as stub kernel - INTO /efi/EFI/YOURNAMEYOULIKE/bzImage.efi

... At last you should examine /boot/* directly ... because we install Kernel AND grub again you can delete all there, EXCEPT /efi (if you have mounted your ESP again to /boot/efi)

You really should read this short post: https://forums.gentoo.org/viewtopic-t-1165115.html

If all is clean, do:

1. Chroot into Gentoo
2. Mount ESP (/dev/sda1) to /efi
2. Install the dist-kernel
3. Do again installing grub with https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#EFI_systems =>
Code:
# grub-install --target=x86_64-efi --efi-directory=/efi
- AND -
# grub-mkconfig -o /boot/grub/grub.cfg

(nothing more)
4. Check with "efibootmgr" (install with "emerge efibootmgr" if not in your gentoo installation) IF all is okay
5. If you have not done some steps from the installation do it now
6. Give us your /etc/fstab and /etc/resolv.conf and the output of "rc-update" and "ls -al /etc/init.d/net.*"


so, while following this instructions i think i found part of the problem, there werent any EFI on gentoo, but there where on pop os
so basicaly gentoo's boot folder had just the kernels and grub.cfg on it, while pop os had all the other stuff
what i guess may be happening is that the 0005 entry was picking pop os's grub instead of gentoo's
also, probably not, but should i delete grub from pop os now or after installing it on gentoo?

as it stands now before i do anything the outputs you asked are

fstab: https://pastebin.com/qY9E04T8

resolv.conf only has:
Code:
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line


ls -al init.d/net.*
Code:
lrwxrwxrwx 1 root root     6 Nov  9 10:44 etc/init.d/net.enp0s20f0u4 -> net.lo
lrwxrwxrwx 1 root root     6 Nov  9 10:36 etc/init.d/net.enp2s0 -> net.lo
-rwxr-xr-x 1 root root 20017 Aug 13 19:45 etc/init.d/net.lo


this enp0s20f device was appearing only during the installation, but disappeared after i remvoed the pendrive

rc-update: https://pastebin.com/DHBa0G5R
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4166
Location: Bavaria

PostPosted: Sat Nov 11, 2023 12:08 am    Post subject: Reply with quote

Thanks for all the files ... It is not necessary to delete the grub from POP OS ... you can do after all is done ... if you want. For safety reasons I recommend to remove temporary the PEN drive (because it has a 2nd ESP). Network we do at last ... maybe there is a little problem ...

1. Boot with our GentooLiveCD and check if you are online ("ip a")
2.
Code:
# cp -L /etc/resolv.conf /mnt/gentoo/etc/

2. Mount /mnt/gentoo and all other for a chroot (see my post above) and chroot into it. (or look at: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Mounting_the_necessary_filesystems )
3. Mount /dev/sda1 to /efi - DONT USE "mount /boot". Do it this time manually with "mount /dev/sda1 /efi"
(check if you have done a "mkdir /efi" as our AMD64 handbook said here: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#UEFI_systems )
4. cd /boot
5. rm -rf *
6. Edit /etc/fstab and change this line to:
Quote:
UUID=191F-3D18 /efi vfat defaults,noatime 0 2

(I recommend to add parameter "noauto" => "defaults,noatime,noauto" - after a reboot you can then use "mount /efi" ONLY if you need it = ONLY when you want update GRUB (grubx64.efi) - NOT necessary for updating the grub configuration !)
7. Check if /etc/conf.d/net has: config_enp2s0="dhcp"
(or config_enp0s20f0u4="dhcp")
8. Do a
Code:
# emerge gentoo-kernel-bin linux-firmware intel-microcode installkernel-gentoo efibootmgr

(maybe some of them are not necessary because you already have ... but I want to be sure)
9. Do a
Code:
# efibootmgr -b 5 -B 5

and
Code:
# rm -rf /efi/EFI/gentoo

(and chek with "efibootmgr" if the Entry for Gentoo is gone)
10. Check if you have "GRUB_PLATFORMS="efi-64" in your /etc/portage/make.conf !
11. Do
Code:
# emerge grub
# grub-install --target=x86_64-efi --efi-directory=/efi
# grub-mkconfig -o /boot/grub/grub.cfg

If you will get an error with the last command THEN pleasae STOP HERE and tell us !
12. Exit all and reboot:
Code:
root #exit
livecd~#cd
livecd~#umount -l /mnt/gentoo/dev{/shm,/pts,}
livecd~#umount -R /mnt/gentoo
livecd~#reboot


IF your Gentoo starts THEN check with "ip a" your network. If you are offline check with "lspci -k" if your ethernet has the correct driver. We will remove one of them with "rc-update delete ..." and delete one of /etc/init.d/net.xxxx. But it is not urgent.
Code:
      net.enp0s20f0u4 |      default
           net.enp2s0 |      default
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Sat Nov 11, 2023 12:53 am    Post subject: Reply with quote

i am doing the process rn, and turns out there was something wrong with resolv.conf, wich i solved by copying the one from the livecd, it was missing the namewhatever thing
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Sat Nov 11, 2023 1:10 am    Post subject: Reply with quote

i finished it and when i boot gentoo i get a grub screen written

gnu grub 2.06

minimal bashlike line editing is supported. For the first word, Tab lists possible command completions. Anyehere else TAB lists possible device or file completions
grub>

i did everything u said, including the noauto

>>edit<<

nevermind i had generated grub.cfg as grub.cgf
Back to top
View user's profile Send private message
lp_08
n00b
n00b


Joined: 09 Nov 2023
Posts: 15

PostPosted: Sat Nov 11, 2023 1:29 am    Post subject: Reply with quote

I DID IT!!!

its all working perfection

thank you so much!!!
honestly man i am so happy

thanks also to the other admin

so to sum it up, the problems where:
resolv.conf missing nameserver
messy grub and kernel

thanks for all the help and attenciousity!


Last edited by lp_08 on Sat Nov 11, 2023 10:13 pm; edited 1 time in total
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
Goto page 1, 2  Next
Page 1 of 2

 
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