View previous topic :: View next topic |
Author |
Message |
agustinfortnite2008 n00b
Joined: 28 Nov 2024 Posts: 32 Location: Argentina
|
Posted: Sat Jan 25, 2025 5:27 pm Post subject: |
|
|
place holder im editing this and adding things psdaspoasdoaunsdi
genkernel.conf:
Code: | # Configuration file for genkernel
# This file is sourced by genkernel at startup and determines which options
# we will be using to compile our kernel. The order of precidence is simple,
# with the internal settings being least important, configuration file
# settings next, and command line options being most important.
# =========COMMON COMMAND LINE OPTION DEFAULTS=========
# Install to $BOOTDIR
#INSTALL="yes"
# Run 'make oldconfig' before compiling this kernel
OLDCONFIG="yes"
# Run 'make menuconfig' before compiling this kernel
MENUCONFIG="tes"
# Run 'make gconfig' before compiling this kernel
#GCONFIG="no"
# Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel
#NCONFIG="no"
# Run 'make xconfig' before compiling this kernel
#XCONFIG="no"
# Run 'make mrproper' before compiling this kernel
#MRPROPER="yes"
# Run 'make clean' before compiling this kernel
# Only needed if MRPROPER is set to NO because
# MRPROPER implies 'make clean'.
CLEAN="yes"
# Mount BOOTDIR automatically if it isn't mounted
#MOUNTBOOT="yes"
# Make symlinks in BOOTDIR automatically
#SYMLINK="no"
# Save the new configuration in /etc/kernels upon
# successful compilation
#SAVE_CONFIG="yes"
# Enable color output in genkernel
NOCOLOR="false"
# Clear build cache dir on gernkernel start
#CLEAR_CACHEDIR="no"
# Clear all tmp files and caches after genkernel has run
#POSTCLEAR="no"
# Check for x MB free disk space in BOOTDIR
#CHECK_FREE_DISK_SPACE_BOOTDIR=0
# Check for x MB free disk space in kernel outputdir
#CHECK_FREE_DISK_SPACE_KERNELOUTPUTDIR=0
# Genkernel uses an independent configuration for MAKEOPTS, and does not source
# /etc/portage/make.conf . You can override the default setting by uncommenting
# and tweaking the following line. Default setting is set up by
# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j
# argument is: <number of processors>*<number of cores per processor>+1
MAKEOPTS="-j12"
# Run the kernel make at the following NICE level
#NICE=10
# Add bcache support
#BCACHE="no"
# Add LVM support
LVM="yes"
# Add LUKS support
#LUKS="no"
# Add GnuPG support
#GPG="no"
# Add keyctl support for loading LUKS passphrase into a keyring
#KEYCTL="no"
# Add in early microcode support: this sets the kernel options for early microcode loading
# Possible values: empty/"no", "all", "intel", "amd"
MICROCODE="amd"
# Include early microcode in generated initramfs.
# Only needed if system cannot load multiple initramfs.
# NOTE: >=sys-boot/grub-2 will detect and auto-load {amd,intel}-uc.img file
# provided by sys-firmware/intel-microcode[initramfs] or
# sys-kernel/linux-firmware[initramfs].
MICROCODE_INITRAMFS="yes"
# Add NFS support
#NFS="no"
# Add DMRAID support
#DMRAID="no"
# Add SSH support
#SSH="no"
# Add b2sum support
#B2SUM="no"
# Include busybox in the initramfs. If included, busybox is rebuilt
# if the cached copy is out of date.
#BUSYBOX="yes"
# Add MDRAID support
#MDADM="no"
# Specify a custom mdadm.conf.
# By default the initramfs will be built *without* an mdadm.conf and will auto-detect
# arrays during bootup. Usually, this should not be needed.
#MDADM_CONFIG="/etc/mdadm.conf"
# Add Multipath support
#MULTIPATH="no"
# Add iSCSI support
#ISCSI="no"
# Add e2fsprogs support
#E2FSPROGS="no"
# Include support for unionfs
#UNIONFS="no"
# Include support for zfs volume management. If unset, genkernel will attempt
# to autodetect and enable this when rootfs is on zfs.
ZFS="yes"
# Add BTRFS support
#BTRFS="no"
# Add xfsprogs support
#XFSPROGS="no"
# Install firmware onto root filesystem
# Will conflict with sys-kernel/linux-firmware package
#FIRMWARE_INSTALL="no"
# Include full contents of FIRMWARE_DIR
# (if FIRMWARE option below is set to YES).
#ALLFIRMWARE="no"
# Add firmware(s) to initramfs required by copied modules
FIRMWARE="yes"
# Specify directory to pull from
FIRMWARE_DIR="/lib/firmware"
# Specify a comma-separated list of firmware files or directories to include,
# relative to FIRMWARE_DIR (if FIRMWARE option above is set to YES
# and ALLFIRMWARE is set to NO).
#FIRMWARE_FILES=""
# Add new kernel to grub
# Possible values: empty/"no", "grub", "grub2"
#BOOTLOADER="no"
# Use sandbox when building initramfs
#SANDBOX="yes"
# Embed and set font early on boot
# Possible values: empty/"none", "current", <PSF file>
#BOOTFONT="none"
# Add boot splash using splashutils
#SPLASH="yes"
# Use this splash theme. If commented out - the "default" name theme is used.
# Also, SPLASH="yes" needs to be enabled for this one to work.
# This supersedes the "SPLASH_THEME" option in '/etc/conf.d/splash'.
#SPLASH_THEME="gentoo"
# Includes or excludes Plymouth from the initramfs. If "splash" is
# passed at boot, Plymouth will be activated.
#PLYMOUTH="yes"
# Embeds the given plymouth theme in the initramfs.
#PLYMOUTH_THEME="text"
# Run "emerge @module-rebuild" automatically when possible and necessary
# after kernel and modules have been compiled
MODULEREBUILD="yes"
# Run the specified command in the current environment after the kernel and
# modules have been compiled, useful to rebuild external kernel module
# (see MODULEREBUILD above) or installing additional
# files (use 'copy_image_with_preserve dtb path/to/dtb dtb <kernelname>')
#CMD_CALLBACK=""
# =========KEYMAP SETTINGS=========
#
# Force keymap selection at boot
#DOKEYMAPAUTO="no"
# Enables keymap selection support
#KEYMAP="yes"
# =========LOW LEVEL COMPILE SETTINGS=========
#
# Assembler to use for the kernel. See also the --kernel-as command line
# option.
#KERNEL_AS="as"
# Archiver to use for the kernel. See also the --kernel-ar command line
# option.
#KERNEL_AR="ar"
# Compiler to use for the kernel (e.g. distcc). See also the --kernel-cc
# command line option.
#KERNEL_CC="gcc"
# Linker to use for the kernel. See also the --kernel-ld command line option.
#KERNEL_LD="ld"
# NM utility to use for the kernel. See also the --kernel-nm command line option.
#KERNEL_NM="nm"
# GNU Make to use for kernel. See also the --kernel-make command line option.
#KERNEL_MAKE="make"
# objcopy utility to use for the kernel. See also the --kernel-objcopy command
# line option.
#KERNEL_OBJCOPY="objcopy"
# objdump utility to use for the kernel. See also the --kernel-objdump command
# line option.
#KERNEL_OBJDUMP="objdump"
# ranlib utility to use for the kernel. See also the --kernel-ranlib command
# line option.
#KERNEL_RANLIB="ranlib"
# readelf utility to use for the kernel. See also the --kernel-readelf command
# line option.
#KERNEL_READELF="readelf"
# strip utility to use for the kernel. See also the --kernel-strip command line
# option.
#KERNEL_STRIP="strip"
# Assembler to use for the utilities. See also the --utils-as command line
# option.
#UTILS_AS="as"
# Archiver to use for the utilities. See also the --utils-ar command line
# option.
#UTILS_AR="ar"
# C Compiler to use for the utilities (e.g. distcc). See also the --utils-cc
# command line option.
#UTILS_CC="gcc"
# C++ Compiler to use for the utilities (e.g. distcc). See also the --utils-cxx
# command line option.
#UTILS_CXX="g++"
# Linker to use for the utilities. See also the --utils-ld command line
# option.
#UTILS_LD="ld"
|
LLVM=1 make -j12 && LLVM=1 make modules_install && cp arch/x86/boot/bzImage /boot/EFI/test/bzImage.efi
genkernel --kernel-config/usr/src/linux/.config initramfs
efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Gentoo ZFS 6.12.10" --loader "\EFI\test\bzImage.efi" --unicode "rootfs=ZFS=rpool/ROOT/gentoo ro dozfs=cache,force initrd='\EFI\test\initramfs-6.12.10-gentoo-x86_64.img"
do i post the kernel .config also??? _________________ Xorg es mierda, Wayland tambien |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1456 Location: Richmond Hill, Canada
|
Posted: Sat Jan 25, 2025 6:18 pm Post subject: |
|
|
If this work then good for you.
But as far as my understand efi stub does not understand the additional "rootfs=ZFS=rpool/ROOT/gentoo ro dozfs=cache,force initrd='\EFI\test\initramfs-6.12.10-gentoo-x86_64.img". I am under impression it only understand initrd=XXX
for using efi stub, I think you need to setup kernel command line(CONFIG_CMDLINE="...") in the .config file. |
|
Back to top |
|
|
agustinfortnite2008 n00b
Joined: 28 Nov 2024 Posts: 32 Location: Argentina
|
Posted: Sat Jan 25, 2025 6:26 pm Post subject: |
|
|
it does as i was testing genkernel not mounting the pool, the output changed depending on what do i put in the cmd line on the efistub entry
it doesn't matter since everything is the same it seems, openzfs haves a dracut.zfs for example
and grub functions in the same way ( somewhat ) you can change the cmd options in the grub config file _________________ Xorg es mierda, Wayland tambien |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5344 Location: Bavaria
|
Posted: Sat Jan 25, 2025 6:34 pm Post subject: |
|
|
pingtoo wrote: | [...] for using efi stub, I think you need to setup kernel command line(CONFIG_CMDLINE="...") in the .config file. |
No ... you have always two choices:
1) Built-in (as you mentioned) OR,
2) The UEFI/bootloader/bootmanger give some options to the kernel.
(See more: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Kernel_Commandline_Parameter )
pingtoo wrote: | But as far as my understand efi stub does not understand the additional [...] |
Yes, this is true ... but a bootmanager/bootloader (e.g. grub) would not understand it too ... and would do the same as UEFI does: Give it to the kernel.
... and YES ... if you give an option to the kernel, which is not understood, then the kernel will give it to (and it will be logged also in the system log):
a) init of the initramfs, or
b) /sbin/init when not having/using an initramfs. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1456 Location: Richmond Hill, Canada
|
Posted: Sat Jan 25, 2025 6:36 pm Post subject: |
|
|
agustinfortnite2008 wrote: | it does as i was testing genkernel not mounting the pool, the output changed depending on what do i put in the cmd line on the efistub entry
it doesn't matter since everything is the same it seems, openzfs haves a dracut.zfs for example
and grub functions in the same way ( somewhat ) you can change the cmd options in the grub config file |
It will become problematic if you mixing grub and efi stub. Each of them is a boot loader and with different way of configuration.
efi stub is an embedded boot loader in kernel image file.
grub is an external boot loader (second stage) that bios/UEFI boot loader will load during bootstrap process.
boot loader (any one of) is responsible for loading kernel image and initrd, And pass command line arguments to the kernel image.
Kernel also pass its command line arguments to initrd's init script (for initramfs, it is "init" and for initrd it is "initrc") |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1456 Location: Richmond Hill, Canada
|
Posted: Sat Jan 25, 2025 6:41 pm Post subject: |
|
|
pietinger wrote: | pingtoo wrote: | [...] for using efi stub, I think you need to setup kernel command line(CONFIG_CMDLINE="...") in the .config file. |
No ... you have always two choices:
1) Built-in (as you mentioned) OR,
2) The UEFI/bootloader/bootmanger give some options to the kernel.
(See more: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Kernel_Commandline_Parameter )
pingtoo wrote: | But as far as my understand efi stub does not understand the additional [...] |
Yes, this is true ... but a bootmanager/bootloader (e.g. grub) would not understand it too ... and would do the same as UEFI does: Give it to the kernel.
... and YES ... if you give an option to the kernel, which is not understood, then the kernel will give it to (and it will be logged also in the system log):
a) init of the initramfs, or
b) /sbin/init when not having/using an initramfs. |
The reason I said that is because I was under impression that efi stub does not understand(as in it will ignore and not pass on) kernel parameters. maybe this changed since my last time checking. |
|
Back to top |
|
|
agustinfortnite2008 n00b
Joined: 28 Nov 2024 Posts: 32 Location: Argentina
|
Posted: Sat Jan 25, 2025 6:41 pm Post subject: |
|
|
i am not using grub and efistub xdxdxd, i mentioned it just to prove a point _________________ Xorg es mierda, Wayland tambien |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5344 Location: Bavaria
|
Posted: Sat Jan 25, 2025 6:42 pm Post subject: |
|
|
pingtoo wrote: | It will become problematic if you mixing grub and efi stub. Each of them is a boot loader and with different way of configuration. |
Hmm ... yes and no ...
Yes, you CAN load your kernel via grub OR directly via UEFI.
No, there is no problem using a stub-kernel and boot it with grub. Our Gentoo distribution kernel (gentoo-kernel / gentoo-kernel-bin) is configured as stub kernel ... and the default in our AMD64 handbook is: using grub for it _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1456 Location: Richmond Hill, Canada
|
Posted: Sat Jan 25, 2025 6:52 pm Post subject: |
|
|
pietinger wrote: | pingtoo wrote: | It will become problematic if you mixing grub and efi stub. Each of them is a boot loader and with different way of configuration. |
Hmm ... yes and no ...
Yes, you CAN load your kernel via grub OR directly via UEFI.
No, there is no problem using a stub-kernel and boot it with grub. Our Gentoo distribution kernel (gentoo-kernel / gentoo-kernel-bin) is configured as stub kernel ... and the default in our AMD64 handbook is: using grub for it |
Sorry for my poor English.
I mean to point out in post that mixing grub and efi stub in same conversation without clarify can lead to problem assumption and lead to wrong diagnostic.
I did not know grub can load efi stub kernel. I remember saw past posts that create some confusion. does Grub need configuration in order to know the image file is efi app or it can automatically detect? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5344 Location: Bavaria
|
Posted: Sun Jan 26, 2025 1:08 am Post subject: |
|
|
pingtoo wrote: | [...] does Grub need configuration in order to know the image file is efi app or it can automatically detect? |
No, there is no configuration in grub necessary. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1456 Location: Richmond Hill, Canada
|
Posted: Sun Jan 26, 2025 12:25 pm Post subject: |
|
|
pietinger wrote: | pingtoo wrote: | [...] does Grub need configuration in order to know the image file is efi app or it can automatically detect? |
No, there is no configuration in grub necessary. | Thank you for conformation. |
|
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
|
|