Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo on the Framework Laptop
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
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Fri Sep 09, 2022 9:14 am    Post subject: Installing Gentoo on the Framework Laptop Reply with quote

Hello,
I am struggling to install Gentoo on the Framework laptop (12th Gen Intel) that I've got.

I got over the lack of an ethernet connection by installing from the new liveGUI 20220904 but I am stuck with the kernel.

I tried sys-kernel/gentoo-kernel-bin but it is missing the kernel command line or it is set to
Code:
root=/dev/sda3
which needs to be
Code:
root=/dev/nvme0n1p3


How do I alter the builtin command line or add the one I need?

Compiling gentoo-sources should be OK with the crib in the wiki entry "Framework laptop" but the need to load firmware at boot is a problem for me.

Thanks tor any help,

Chris
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4438
Location: Bavaria

PostPosted: Fri Sep 09, 2022 10:11 am    Post subject: Reply with quote

wynnmc,

have you installed grub as boot manager, or do you use a stub kernel ? If grub, then usually grub gives kernel via command line parameter your "root=...". If you use UEFI booting directly your stub kernel, then you must build-in the command line in the kernel. You should read then: https://wiki.gentoo.org/wiki/EFI_stub
(best is using a "root=PARTUUID=xxxx...")

Maybe you want to read also: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration
(Here you will find also a link to my article to load microcode at boottime)
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Fri Sep 09, 2022 2:29 pm    Post subject: Reply with quote

pietinger

Thanks for the reply, I am using efibootmgr. Because of what I saw as the problem of configuring the kernel myself with the GPU firmware included as a kernel blob, I tried to use gentel-kernel-bin and that lead to a kernel panic as it couldn't find the right block device.

However, I have now found instructions on using CONFIG_FIRMWARE_IN_KERNEL but this apparently needs a list of all the firmware that applies to the particular GPU. This is called "Intel Xe Integrated GPU" and I have tried to find a list with no success.

wynnmc
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20113

PostPosted: Fri Sep 09, 2022 3:57 pm    Post subject: Reply with quote

It might depend on the specifics of the CPU.

https://wiki.gentoo.org/wiki/Intel

From there, if you look at the "Gen12 / Tiger Lake", the Gen12 link takes you to a wikipedia page which lists Tiger Lake and Alder Lake. The Gentoo page indicates that Tiger Lake uses the "intel" driver, so it may be that Alder does as well.

Also on the Gentoo page is reference to CPU firmware (you can search the page for "i915/kbl" to find a reference). In that example, "kbl" references Kaby Lake. Below that is another example referencing "skl" for Sky Lake.

In /lib/firmware/i915/ see if there is something that begins with "a", maybe "adl." That would most likely be the firmware you need.

EDIT:

If /lib/firmware is empty, then you would need to install the sys-kernel/linux-firmware package.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Fri Sep 09, 2022 4:37 pm    Post subject: Reply with quote

pjp

Thank you.

I have had little to do with Intel, I have gone with AMD and Radeon for the PCs I've put together, so "adl" standing for "Alder Lake" and "tgl" for Tiger lake" is a revelation -- thank you!

I booted up the new Gentoo LiveGUI and ran
Code:
lspci -kv
finding that the graphics controller used i915 as the module. I then ran
Code:
modinfo i915
and got a list of 46 items of firmware...

Now with your information I can reduce them to those starting with "tgl"...

wynnmc
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4438
Location: Bavaria

PostPosted: Fri Sep 09, 2022 4:39 pm    Post subject: Reply with quote

wynnmc wrote:
However, I have now found instructions on using CONFIG_FIRMWARE_IN_KERNEL but this apparently needs a list of all the firmware that applies to the particular GPU. This is called "Intel Xe Integrated GPU" and I have tried to find a list with no success.

First of all: Intel GPU doesnt need its firmware to work, so you can start first without it and add it later into your kernel. Second: Do all intel modules as <M> - and not static <*> - into your kernel; THEN these module will load its needed firmware from /lib/firmware (you have already emerged?!) at boottime automatically. Look into your "dmesg" and see now what file names it is; THEN you know the names of needed firmare and CAN (if you want) change back to static modules.

P.S.: You will find a line like this:
Code:
# dmesg | grep firmware
[    1.788879] Loading firmware: i915/skl_dmc_ver1_27.bin
[    1.789392] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27)
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Fri Sep 09, 2022 5:01 pm    Post subject: Reply with quote

pietinger

Thank you, I read the paragraph in the Gentoo wiki "Framework_Laptop" which says
Quote:
The TigerLake GPU firmware in particular needs to be loaded immediately at boot, so it must be included as a kernel blob or on an init ramdisk. See: Intel#Firmware (/wiki/Intel#Firmware)
not realizing that I'd got Alder Lake not Tiger Lake.

That makes life much simpler :D

wynnmc
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Sun Sep 11, 2022 3:10 pm    Post subject: Reply with quote

Whatever I tried, I got a blank screen on boot -- I noted pietinger's warning that Framebuffer must be enabled and did so but I still got a blank screen.

I booted install-amd64-minimal instead of the liveGUI and discovered that it offered a .config for the kernel.

I used that to compile the kernel (5.15.59) hoping that all would be well and there was no blank screen ... but -- despite setting
Code:
CONFIG_CMDLINE="root=/dev/nvme0n1p3"
it said "Kernel panic- no syncing: VFS: unable to mount root fs on unknown block (0,0).

I have checked that the config has NVM enabled.

Any suggestions for my next step?

wynnmc
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4438
Location: Bavaria

PostPosted: Sun Sep 11, 2022 3:40 pm    Post subject: Reply with quote

wynnmc wrote:
Code:
CONFIG_CMDLINE="root=/dev/nvme0n1p3"
it said "Kernel panic- no syncing: VFS: unable to mount root fs on unknown block (0,0).

I have checked that the config has NVM enabled.

This error says: No access to harddisk. NVMe is only ONE of many drivers you need to access your root partition. Please read all linked article from https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration
especially https://forums.gentoo.org/viewtopic-p-8688524.html#8688524
and chapter: Never edit .config

Also: Work with <Help> of every option you want to enable and disable. In some of them you will find a "Seclecting ..." or "Selected by ..." => Ask yourself what this means ... search for these modules with / and look at their status ... maybe -*- instead of <*> You have to know what this means. You can find out by yourself ... and ... it is described in our famous wiki articles (I have linked to).
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Sun Sep 11, 2022 4:14 pm    Post subject: Reply with quote

Well, I assumed that the config provided was the one used to create the install-minimal kernel which booted up OK -- although this was from a USB.

I checked NVM in case it wasn't there.

I shall try using genkernel next ...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 11, 2022 4:57 pm    Post subject: Reply with quote

wynnmc,

All the Gentoo bootable media are built with a fully modular kernel, as they must boot everywhere.
The modules are included in the initrd/initramfs.
Without the initrd they cannot mount root as all the hardware drivers are modules.
So taking the .config from the boot media is only a part of the story.
_________________
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
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Sun Sep 11, 2022 6:05 pm    Post subject: Reply with quote

But I understood that you could have bootable kernels without an initramfs -- as I have been doing for many years now, I have had few modules preferring to have them built-in.

Perhaps the config I was using was intended to be used with an initramfs and the drivers for NVM were modules ... I'll check that.

I presume that with NVM you don't need SCSI or AHCI any more...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 11, 2022 6:18 pm    Post subject: Reply with quote

wynnmc,

Your understanding is correct.
Everything needed to mount the rot filesystem must be built into the kernel binary.
_________________
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: 4438
Location: Bavaria

PostPosted: Sun Sep 11, 2022 6:39 pm    Post subject: Reply with quote

wynnmc wrote:
I presume that with NVM you don't need SCSI or AHCI any more...

It depends ... ;-) The M.2 standard, as a superset of SATA Express, can make use of traditional SATA (with AHCI) and direct access using PCIe (there is even USB 3 in the mix somewhere). Which standard is actually used is AFAIK determined by the SSD in the adapter card, from my knowledge some of them are SATA cards, while most newer ones use PCIe 3.0.

But this is not all. You must have access to PCIe. In some mainboards you need special pci controller drivers (like "vmd" or "designware"). Best is to boot with Gentoo Minimal CD and then look into lspci -k. Here you will see all loaded modules. Not all of them are important (like intel_mei for intel management engine; sound and graphics you can do also as module); but all important you must enable static into your kernel.

Also partition types and the filesystem of your root partition must be enabled static !
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Mon Sep 12, 2022 9:56 am    Post subject: Reply with quote

Thank you, pietinger.

Yes, I've been meaning to copy lspci -k to a file so I can refer to it.

My last attempt was with genkernel which ended with the same kernel panic -- I plan to look at the details of genkernel carefully to see if/how I can get the CMDLINE into its .config. Otherwise -- as you suggested above -- I shall try using grub instead of efibootmgr
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Mon Sep 12, 2022 10:21 am    Post subject: Reply with quote

wynnmc wrote:

I presume that with NVM you don't need SCSI or AHCI any more...


You'll get surprised how many devices use those. Better keep them around than being caught by surprise, having to recompile your kernel. SCSI is used for many mass storage devices.

Regards,
Georgi
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Mon Sep 12, 2022 3:55 pm    Post subject: Reply with quote

Well, I've now tried genkernel with --menuconfig so I could add the appropriate CONFIG_CMDLINE and got a kernel panic.

I then emerged and installed GRUB2 with the UEFI instructions and got a panic again -- I tried putting grubx64.efi in the other directory suggested and still got a panic.

I've run out of options, I'm thinking of installing ArchLinux instead... I am wondering if using efibootmgr has changed things so that grub won't work...
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3203

PostPosted: Mon Sep 12, 2022 4:05 pm    Post subject: Reply with quote

If you're getting kernel panic, you are already past the bootloader stage, so moving bits and pieces of grub around won't do you any good.
The big question is: what message does the kernel give you when it panics?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4438
Location: Bavaria

PostPosted: Mon Sep 12, 2022 4:09 pm    Post subject: Reply with quote

wynnmc wrote:
Well, I've now tried genkernel with --menuconfig so I could add the appropriate CONFIG_CMDLINE and got a kernel panic.

I then emerged and installed GRUB2 with the UEFI instructions and got a panic again -- I tried putting grubx64.efi in the other directory suggested and still got a panic.

I've run out of options, I'm thinking of installing ArchLinux instead... I am wondering if using efibootmgr has changed things so that grub won't work...


This would be sad ... :-(

Please dont forget: efibootmgr installs nothing; it "talks" only to your UEFI. You can add and remove UEFI boot entries with it; also you can define which is first binary which UEFI shall start. Start it to see what is actually defined (this is mine):
Code:
# efibootmgr
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0002,0000
Boot0000* gentoo        HD(2,GPT,e6cccc9a-40e0-4b59-b6d2-082596500077,0x1800,0x1fe800)/File(\EFI\gentoo\grubx64.efi)
Boot0001* DIRECT        HD(2,GPT,e6cccc9a-40e0-4b59-b6d2-082596500077,0x1800,0x1fe800)/File(\EFI\Boot\bzImage.efi)
Boot0002* UNLOCKED      HD(2,GPT,e6cccc9a-40e0-4b59-b6d2-082596500077,0x1800,0x1fe800)/File(\EFI\unlocked\bzImage.efi)


If you want to give Gentoo (with a self-configured kernel) a last chance, then I would recommend:

Do it all by yourself. Dont work with genkernel or binkernel. Start with our AMD64 handbook and my little article I have given you above. Enable all important kernel drivers static into your kernel (I have a monolithic stub kernel which will be started from UEFI directly; but I have also an entry for grub as backup; so its a good idea to go with our handbook and change to stub kernel later). If you want you can take a look into my german installation guide; here you will find my course of action as list of all I did (in english) in A.1 - A.3: https://forums.gentoo.org/viewtopic-t-1112798.html

Also B.2 is very important; a short version in english is here: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Kernel_Hardening_with_KSPP

If you read all kernel related stuff you will learn more about Linux than with every other distribution. I wish you:

Have fun with gentoo !
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Mon Sep 12, 2022 5:19 pm    Post subject: Reply with quote

I would like to install Gentoo on it but this problem with the loader not being able to find the root partition has me stuck.

I have been installing Gentoo on my machines for several years now -- the Lenovo laptop I'm using for this post runs it -- and I have manually configured the kernels using the Handbook as well. This laptop has an SSD but all the other machines had hard disks. It has just seemed as if the NVMe in the new laptop needs something more that I haven't managed to find.

As well as that, the last time I installed Gentoo was on this laptop in 2018 and the kernel configuration seems to have at least doubled in size since then.

Obviously Linux can be installed on it -- I have installed Ubuntu and Manjaro but taken them off again as I like the involvement with the system I get from Gentoo.

OK, I'll give it another try using your guide and see if I can get it to work

Thank you for your encouragement...
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Tue Sep 20, 2022 3:03 pm    Post subject: Reply with quote

I've reconfigured the kernel starting from a clean slate -- I deleted the partitions and recreated them again.

I first went through the recommendations in https://wiki.gentoo.org/wiki/Framework_Laptop, then I went through those in the Handbook and finally through those in pietinger's wiki page. I used efibootmgr as the boot loader which I have used since I got the first machine with a UEFI BIOS and things have gone backwards -- I don't get anything on the screen at all so something's wrong with the graphics on booting...

I seem to have come to the end of the road...
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Tue Sep 20, 2022 3:52 pm    Post subject: Reply with quote

wynnmc wrote:
I've reconfigured the kernel starting from a clean slate -- I deleted the partitions and recreated them again.

I first went through the recommendations in https://wiki.gentoo.org/wiki/Framework_Laptop, then I went through those in the Handbook and finally through those in pietinger's wiki page. I used efibootmgr as the boot loader which I have used since I got the first machine with a UEFI BIOS and things have gone backwards -- I don't get anything on the screen at all so something's wrong with the graphics on booting...

I seem to have come to the end of the road...


Some of the functional keys at boot time should give you a choice what to do. If nothing works, you might have bricked the laptop, although I doubt it.

Regards,
Georgi
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 20, 2022 4:59 pm    Post subject: Reply with quote

wynnmc,

The boot loader does not find the root filesystem.
The kernel does, helped by the root= statement on the kernel command line and maybe an initrd.

See the PC Boot Process
_________________
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
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Tue Sep 20, 2022 5:48 pm    Post subject: Reply with quote

Yes, I have set the kernel command line ... hmmm ... I set it to
Code:
"root=/dev/nvme0n1p3"
but in the .config it comes out as
Code:
CONFIG_CMDLINE="\"root=/dev/nvme0n1p3\""


That's probably where it's going wrong.

In the config for the kernel running on this laptop it is set in
Code:
 make menuconfig
as
Code:
root=/dev/sda4
without the quotes...

Try again...

Thanks for drawing my attention to this
Back to top
View user's profile Send private message
wynnmc
n00b
n00b


Joined: 01 Dec 2019
Posts: 59

PostPosted: Wed Sep 21, 2022 4:26 pm    Post subject: Reply with quote

Well, a big bit of good news ... balanced by a small bit of not so good news.

I have managed to get the laptop to boot Gentoo.

I started by deleting the partitions again and recreating them and going through the Handbook setting up /mnt/gentoo.

Instead of manually configuring a kernel I downloaded gentoo-kernel-bin and used GRUB as the boot loader.

I have two problems:

1) The output on the screen -- a console, Xorg is a mountain in the distance -- is very small and I don't know how to increase its size. I think I've seen something in GRUB which would do it but I can't remember it now.

2) I can't get the wireless to work. The relevant bits in the kernel log are:
Code:
 kernel: cfg80211: Loading compiled-in X.509 certificates for regulatory database
 kernel: cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
 kernel: Loading firmware: regulatory.db
 kernel: Loading firmware: regulatory.db.p7s
 kernel: Intel(R) Wireless WiFi driver for Linux
 kernel: iwlwifi 0000:a6:00.0: enabling device (0000 -> 0002)

 kernel: Loading firmware: iwlwifi-ty-a0-gf-a0-66.ucode
 kernel: iwlwifi 0000:a6:00.0: api flags index 2 larger than supported by driver
 kernel: iwlwifi 0000:a6:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 0.63.2.2
 kernel: iwlwifi 0000:a6:00.0: loaded firmware version 66.f1c864e0.0 ty-a0-gf-a0-66.ucode op_mode iwlmvm
 kernel: Loading firmware: iwl-debug-yoyo.bin
 kernel: iwlwifi 0000:a6:00.0: Detected Intel(R) Wi-Fi 6 AX210 160MHz, REV=0x420

 kernel: Loading firmware: iwlwifi-ty-a0-gf-a0.pnvm
 kernel: iwlwifi 0000:a6:00.0: loaded PNVM version 0x881c99e1
 kernel: iwlwifi 0000:a6:00.0: Detected RF GF, rfid=0x10d000
 kernel: iwlwifi 0000:a6:00.0: base HW address: 04:cf:4b:21:ea:76

 kernel: iwlwifi 0000:a6:00.0 wlp166s0: renamed from wlan0

but it is not active. I've also install sys-firmware/intel-microcode.

I would appreciate further help... :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
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