View previous topic :: View next topic |
Author |
Message |
nkostovsky n00b
Joined: 18 Dec 2024 Posts: 3
|
Posted: Wed Dec 18, 2024 8:14 pm Post subject: VFS: cannot open root device, unknown-block(0,0): error -6 |
|
|
Hi, I'm new in gentoo and I'm trying to boot kernel directly from UEFI.
I was able to run gentoo with grub/efi/initramfs(?), now I'd like to save a couple of seconds on booting gentoo (trying that for about a day) by skipping grub step.
But I'm getting an error when trying to boot bzImage from uefi (as well as from grub) (photo: https://imgur.com/a/VOxvTeS):
/dev/root: Can't open blockdev
VFS: cannot open root device "/dev/nvmen1p3", unknown-block(0,0): error -6
Could please anyone tell what could be wrong in my setup?
What I tried to achieve that (actually I was trying to reproduce this setup found on the internet - https://handheld.computer/?page_id=1131, as well as gentoo guides like uefi_stub - https://wiki.gentoo.org/wiki/EFI_stub):
Laptop: one netbook a1 pro
configured kernel - https://wiki.gentoo.org/wiki/Project:Distribution_Kernel#Modifying_kernel_configuration
Code: |
a1 /var/db/repos/gentoo/sys-kernel/gentoo-kernel # ebuild gentoo-kernel-6.12.4-r1.ebuild configure
a1 /var/db/repos/gentoo/sys-kernel/gentoo-kernel # cd /var/tmp/portage/sys-kernel/gentoo-kernel-6.12.4-r1/work/modprep
a1 /var/tmp/portage/sys-kernel/gentoo-kernel-6.12.4-r1/work/modprep # make nconfig
# ^^^modified config, including CMDLINE, unset CONFIG_BLK_DEV_INITRD, CONFIG_BOOT_CONFIG
diff --changed-group-format="%>" --unchanged-group-format="" .config.old .config | tee -a /etc/kernel/config.d/my-kernel.config
|
then I can build kernel using ebuild compile/install/qmerge, or using emerge:
Code: |
a1 /var/db/repos/gentoo/sys-kernel/gentoo-kernel # ebuild gentoo-kernel-6.12.4-r1.ebuild compile
a1 /var/db/repos/gentoo/sys-kernel/gentoo-kernel # ebuild gentoo-kernel-6.12.4-r1.ebuild qmerge
#### or ####
emerge -avq gentoo-kernel
|
Then I'm trying to copy my bzImage to /efi/EFI/boot/ and configure efi to load it
Code: |
cp /usr/src/linux/arch/x86/boot/bzImage /efi/EFI/boot/bootx64.efi
efibootmgr -c -d /dev/nvme0n1 -p1 -L 'Gentoo' -l '\EFI\boot\bootx64.efi'
|
I've also set some flags for efi partifion:
Code: |
# parted -l /dev/nvme0n1
Model: One-Netbook PCI-E 512G SSD (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 537MB 536MB fat16 primary boot, esp
2 537MB 1074MB 537MB ext2 primary
3 1074MB 512GB 511GB ext4 primary
|
my fstab (just noticed that I don't have / here):
Code: |
# cat /etc/fstab | grep -v ^#
/dev/nvme0n1p1 /efi vfat umask=0077 0 2
/dev/nvme0n1p2 /boot ext4 defaults,noatime 0 2
|
my cmdline from /etc/kernel/config.d/my-kernel.config
Code: |
CONFIG_CMDLINE="root=/dev/nvme0n1p3 fbcon=rotate:3 i915.lvds_downclock=1 i915.i915_enable_fbc=1 i915.enable_psr=1"
### I've also tried PARTUUID of root partition
# #CONFIG_CMDLINE="root=PARTUUID=81637d56-3934-4d9c-abde-d985b20db1de fbcon=rotate:3 i915.lvds_downclock=1 i915.i915_enable_fbc=1 i915.enable_psr=1"
|
Code: |
# blkid
/dev/nvme0n1p3: LABEL="root" UUID="5a51be21-a88a-42e7-bf14-b23f4d91bad5" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="81637d56-3934-4d9c-abde-d985b20db1de"
/dev/nvme0n1p1: SEC_TYPE="msdos" LABEL_FATBOOT="efi" LABEL="efi" UUID="B245-287B" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="primary" PARTUUID="dc033bfd-331a-4483-b224-90bdbbcbd1ee"
/dev/nvme0n1p2: LABEL="boot" UUID="e04f9f1d-7788-4397-b53e-512b2d6e3222" BLOCK_SIZE="4096" TYPE="ext2" PARTLABEL="primary" PARTUUID="cacddbcb-8b2a-4c28-8574-36f6bb8227af"
|
my mounting points:
Code: |
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 511M 0 part /efi
├─nvme0n1p2 259:2 0 512M 0 part /boot
└─nvme0n1p3 259:3 0 475.9G 0 part /
|
lspci -k
Quote: |
00:00.0 Host bridge: Intel Corporation Device 9a12 (rev 01)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
00:02.0 VGA compatible controller: Intel Corporation Tiger Lake-UP4 GT2 [Iris Xe Graphics] (rev 01)
DeviceName: Onboard - Video
Subsystem: Intel Corporation Device 2212
Kernel driver in use: i915
Kernel modules: i915
00:04.0 Signal processing controller: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant (rev 01)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: proc_thermal
Kernel modules: processor_thermal_device_pci_legacy
00:07.0 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #0 (rev 01)
Subsystem: Intel Corporation Device 7270
Kernel driver in use: pcieport
00:07.1 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #1 (rev 01)
Subsystem: Intel Corporation Device 7270
Kernel driver in use: pcieport
00:08.0 System peripheral: Intel Corporation GNA Scoring Accelerator module (rev 01)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
00:0a.0 Signal processing controller: Intel Corporation Tigerlake Telemetry Aggregator Driver (rev 01)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel_vsec
Kernel modules: intel_vsec
00:0d.0 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller (rev 01)
DeviceName: Onboard - Other
Kernel driver in use: xhci_hcd
00:0d.2 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 (rev 01)
DeviceName: Onboard - Other
Kernel driver in use: thunderbolt
Kernel modules: thunderbolt
00:14.0 USB controller: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller (rev 20)
DeviceName: Onboard - Other
Kernel driver in use: xhci_hcd
00:14.2 RAM memory: Intel Corporation Tiger Lake-LP Shared SRAM (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
00:14.3 Network controller: Intel Corporation Wi-Fi 6 AX201 (rev 20)
DeviceName: Onboard - Ethernet
Subsystem: Intel Corporation Device 0074
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
00:15.0 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:15.1 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:15.2 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #2 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:15.3 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #3 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:16.0 Communication controller: Intel Corporation Tiger Lake-LP Management Engine Interface (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: mei_me
Kernel modules: mei_me
00:19.0 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #4 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:19.1 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #5 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:1c.0 PCI bridge: Intel Corporation Device a0bb (rev 20)
Kernel driver in use: pcieport
00:1d.0 PCI bridge: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 (rev 20)
Subsystem: Intel Corporation Device 7270
Kernel driver in use: pcieport
00:1e.0 Communication controller: Intel Corporation Tiger Lake-LP Serial IO UART Controller #0 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:1e.3 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO SPI Controller #1 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-lpss
00:1f.0 ISA bridge: Intel Corporation Device a087 (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
00:1f.3 Audio device: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
DeviceName: Onboard - Sound
Subsystem: Intel Corporation Device 7270
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl
00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
00:1f.5 Serial bus controller: Intel Corporation Tiger Lake-LP SPI Controller (rev 20)
DeviceName: Onboard - Other
Subsystem: Intel Corporation Device 7270
Kernel driver in use: intel-spi
Kernel modules: spi_intel_pci
57:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Subsystem: Realtek Semiconductor Co., Ltd. Device 0123
Kernel driver in use: r8169
Kernel modules: r8169
58:00.0 Non-Volatile memory controller: Phison Electronics Corporation PS5013-E13 PCIe3 NVMe Controller (DRAM-less) (rev 01)
Subsystem: Phison Electronics Corporation PS5013-E13 PCIe3 NVMe Controller (DRAM-less)
Kernel driver in use: nvme
Kernel modules: nvme
|
my /etc/kernel/config.d/my-kernel.config: https://pastebin.com/vWtsSFgn
full /etc/portage/savedconfig/sys-kernel/gentoo-kernel-6.12.4-r1: https://pastebin.com/2A1Uh4jV
emerge --info
Code: |
$ emerge --info
Portage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0/desktop, gcc-14, glibc-2.40-r5, 6.6.62-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.6.62-gentoo-dist-x86_64-11th_Gen_Intel-R-_Core-TM-_i5-1130G7_@_1.10GHz-with-glibc2.40
KiB Mem: 16102968 total, 14610836 free
KiB Swap: 0 total, 0 free
Timestamp of repository gentoo: Sun, 15 Dec 2024 15:30:00 +0000
Head commit of repository gentoo: 752ee4cbaf480ba2bfd9bdaafe4dd8cb3644f823
Timestamp of repository steam-overlay: Wed, 11 Dec 2024 12:06:22 +0000
Head commit of repository steam-overlay: 94ba87e4a1cd7686d25b3520adee8a63e13785ee
sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
distcc 3.4 x86_64-pc-linux-gnu [enabled]
ccache version 4.10.2 [disabled]
app-misc/pax-utils: 1.3.8::gentoo
app-shells/bash: 5.2_p37::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.30.6::gentoo
dev-build/libtool: 2.4.7-r4::gentoo
dev-build/make: 4.4.1-r100::gentoo
dev-build/meson: 1.5.2::gentoo
dev-lang/perl: 5.40.0::gentoo
dev-lang/python: 3.12.8::gentoo, 3.13.1::gentoo
dev-lang/rust-bin: 1.82.0-r101::gentoo
dev-util/ccache: 4.10.2-r1::gentoo
llvm-core/clang: 18.1.8-r6::gentoo, 19.1.4::gentoo
llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.4::gentoo
sys-apps/baselayout: 2.17::gentoo
sys-apps/openrc: 0.55.1::gentoo
sys-apps/sandbox: 2.39::gentoo
sys-devel/binutils: 2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc: 14.2.1_p20241116::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.40-r5::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 3
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1
steam-overlay
location: /var/db/repos/steam-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
masters: gentoo
volatile: False
Binary Repositories:
gentoobinhost
priority: 1
sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64
Installed sets: @esteam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=tigerlake -flto=9 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O2 -pipe -march=tigerlake -flto=9 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 20"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=tigerlake -flto=9 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=tigerlake -flto=9 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j81 -l8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bash-completion bluetooth branding bzip2 cairo cdda cdr cet crypt dbus dist-kernel dri dts dvd dvdr elogind encode exif flac gdbm gif gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses ogg opengl openmp pam pango pcre pdf pgo png policykit ppds pulseaudio qdoc qml qt6 readline sdl seccomp sound ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vaapi vim vim-syntax vorbis vulkan wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vp2intersect avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="intel i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
|
dmesg from working kernel (old 6.6.62-gentoo-dist): https://pastebin.com/uNjigMg8
Thanks in advance |
|
Back to top |
|
|
bstaletic Guru
Joined: 05 Apr 2014 Posts: 406
|
|
Back to top |
|
|
nkostovsky n00b
Joined: 18 Dec 2024 Posts: 3
|
Posted: Wed Dec 18, 2024 9:49 pm Post subject: |
|
|
thanks for reply
could you please clarify, are you talking about CONFIG_BLK_DEV_NVME? (I'm a complete newbie in kernel compilation)
I'm sorry for posting outdated savedconfig, in /etc/kernel/config.d/my-kernel.config this parameter is already =y
up to date /etc/kernel/config.d/my-kernel.config:
https://pastebin.com/vWtsSFgn
up to date savedconfig:
https://pastebin.com/JXDhQFUA
I'd like to boot kernel without initramfs if it's possible. As far as I understood from https://wiki.gentoo.org/wiki/Initramfs/Guide (and from the guide about gentoo on "one netbook a1") it should be possible to avoid it (i have simple partitioning, no lvm, no encrypted disks, etc), please correct me if I'm wrong |
|
Back to top |
|
|
bstaletic Guru
Joined: 05 Apr 2014 Posts: 406
|
Posted: Wed Dec 18, 2024 10:33 pm Post subject: |
|
|
I'm booting without an initramfs, so it's definitely possible.
For that, you need a few things:
- root=/dev/whatever_partition in your kernel command line.
- The filesystem drtiver built into the kernel.
- The NVMe controller driver built into the kernel.
From the output of your lspci:
Code: | 58:00.0 Non-Volatile memory controller: Phison Electronics Corporation PS5013-E13 PCIe3 NVMe Controller (DRAM-less) (rev 01)
Subsystem: Phison Electronics Corporation PS5013-E13 PCIe3 NVMe Controller (DRAM-less)
Kernel driver in use: nvme
Kernel modules: nvme |
That means your NVMe controller needs a loadable module and that it is not built in.
Now, I've never had a NVMe device in my hands, so I might be missing something. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5228 Location: Bavaria
|
|
Back to top |
|
|
sublogic Apprentice
Joined: 21 Mar 2022 Posts: 281 Location: Pennsylvania, USA
|
Posted: Wed Dec 18, 2024 11:53 pm Post subject: |
|
|
@Nikita: one way to bootstrap your way into a working kernel:- Install a distribution kernel (sys-kernel/gentoo-kernel). Finish the handbook.
- Install sys-kernel/gentoo-sources. Update the /usr/src/linux link (eselect kernel).
- make localyesconfig
- make menuconfig
- make, make modules_install, make install
That sould give you a kernel that boots. You can tweak it later as needs arise.
Step 3 converts the drivers loaded at the time to builtin, and drops all the others.
At step 4, you want to turn some of them back to modular, and maybe add back some that were dropped. Anything that needs firmware, like a wireless driver, is best kept as modular (unless you absolutely need it at boot time, in which case embed its firmware). Also, add back dropped drivers that you might need later (like usb-storage).
Proceed in stages and compare configs with the scripts/diffconfig tool in the kernel tree. In my cases there were more changes at step 4 than I expected. I can elaborate if you want. |
|
Back to top |
|
|
nkostovsky n00b
Joined: 18 Dec 2024 Posts: 3
|
Posted: Thu Dec 19, 2024 12:09 am Post subject: |
|
|
thanks to all of you, i will try to read all of this and use/reconfigure gentoo-sources from scratch to do it right |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5228 Location: Bavaria
|
Posted: Thu Dec 19, 2024 4:50 am Post subject: |
|
|
sublogic,
there are now some cases where the procedure with “make localyesconfig / make localmodconfig” no longer works because the default config does not contain some important options. An example: Some (modern) mainboards ONLY accept x2APIC and therefore need to have CONFIG_X86_X2APIC enabled to boot, which unfortunately is not enabled in the default config (see this thread: https://forums.gentoo.org/viewtopic-t-1171781-highlight-.html ). Likewise, some mainboards also require CONFIG_X86_INTEL_LPSS, which is also not activated in the default config. This is the reason why I ALWAYS refer to my articles that address both and why I NEVER recommend the above (outdated) procedure (which CAN still work, of course) - but this way you are on the safe side. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5228 Location: Bavaria
|
|
Back to top |
|
|
|
|
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
|
|