Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928384 - genkernel ignores options
Summary: genkernel ignores options
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-01 12:41 UTC by Roman Gruber
Modified: 2024-04-01 19:29 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Gruber 2024-04-01 12:41:02 UTC
Sienna_Cichlid /usr/src # binwalk initramfs-6.6.23-gentoo-x86_64.cpio.gz 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             xz compressed data
2304151       0x232897        ASCII cpio archive (SVR4 with no CRC), file name: "lib/modules/6.6.23-gentoo-x86_64/kernel/drivers/net/mii.ko.zst", file name length: "0x0000003F", file size: "0x00001739"
2310275       0x234083        ASCII cpio archive (SVR4 with no CRC), file name: "lib/modules/6.6.23-gentoo-x86_64/kernel/drivers/net/phy", file name length: "0x00000038", file size: "0x00000000"
2310443       0x23412B        ASCII cpio archive (SVR4 with no CRC), file name: "lib/modules/6.6.23-gentoo-x86_64/kernel/drivers/net/phy/libphy.ko.zst", file name length: "0x00000046", file size: "0x00011885"

Sienna_Cichlid /usr/src # man genkernel
Sienna_Cichlid /usr/src # genkernel --lvm --keymap --busybox --luks --real-root=3aece922-55dc-4841-8b47-740a45c39807 --kernel-config=/usr/src/.config --no-mrproper --microcode=none --compress-initramfs-type=gzip all
* Gentoo Linux Genkernel; Version 4.3.10
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --lvm --keymap --busybox --luks --real-root=3aece922-55dc-4841-8b47-740a45c39807 --kernel-config=/usr/src/.config --no-mrproper --microcode=none --compress-initramfs-type=gzip all

* Working with Linux kernel 6.6.23-gentoo-x86_64 for x86_64
* Using kernel config file '/usr/src/.config' ...
* 
* Note: The version above is subject to change (depends on config and status of kernel sources).

* kernel: >> Initializing ...
*         >> Running 'make clean' ...
*         >> --no-mrproper is set; Skipping 'make mrproper' ...
*         >> Will ignore kernel config from '/usr/src/.config'
*            in favor of already existing but different kernel config
*            found in '/usr/src/linux/.config' ...
*         >> Running 'make oldconfig' ...


Options are ignored

Sienna_Cichlid /usr/src/linux # grep MODULE_COMPRESS /usr/src/linux/.config
# CONFIG_MODULE_COMPRESS_NONE is not set
# CONFIG_MODULE_COMPRESS_GZIP is not set
# CONFIG_MODULE_COMPRESS_XZ is not set
CONFIG_MODULE_COMPRESS_ZSTD=y
Sienna_Cichlid /usr/src/linux # grep MODULE_COMPRESS /usr/src/.config
# CONFIG_MODULE_COMPRESS_NONE is not set
# CONFIG_MODULE_COMPRESS_GZIP is not set
# CONFIG_MODULE_COMPRESS_XZ is not set
CONFIG_MODULE_COMPRESS_ZSTD=y

.config file was copied, as previous genkernel packages overwrote that .config

I am kinda upset, that I get a faulty compression on purpose

Sienna_Cichlid /usr/src # cp initramfs-6.6.23-gentoo-x86_64.img initramfs-6.6.23-gentoo-x86_64.cpio.gz
Sienna_Cichlid /usr/src # binwalk initramfs-6.6.23-gentoo-x86_64.cpio.gz 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             xz compressed data

This circumvents the rebuild with safer algorithm

Not the faulty backdor lzma and xz algorithm.

Bad Software ignores options

--kernel-config=/usr/src/.config

I gave a parameter to the command. It is beeing ignored. A Feature is broken ( I will not write that someone is an idiot, although i think the coder is an idiot, for not following the usual behaviour since 1996 or earlier of commands in a bash shell in my expierience)

*         >> Will ignore kernel config from '/usr/src/.config'
*            in favor of already existing but different kernel config
*            found in '/usr/src/linux/.config' ...

Second Feature broken

The coder is an idiot

*         >> Appending modules cpio data ...
*         >> Deduping cpio ...
*         >> Pre-generating initramfs' /etc/ld.so.cache ...
*         >> Compressing cpio data (.gz) ...
cp: error writing '/boot/initramfs-6.6.23-gentoo-x86_64.img': No space left on device
* ERROR: Failed to copy '/var/tmp/genkernel/initramfs-x86_64-6.6.23-gentoo-x86_64' to '/boot/initramfs-6.6.23-gentoo-x86_64.img'!
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
* 
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* '/var/log/genkernel.log' so that your issue can be dealt with effectively.
* 
* Please do *not* report kernel compilation failures as genkernel bugs!
* 
Sienna_Cichlid /usr/src # ls /boot/initramfs-6.6.23-gentoo-x86_64.im
ls: cannot access '/boot/initramfs-6.6.23-gentoo-x86_64.im': No such file or directory
Sienna_Cichlid /usr/src # ls /boot/initramfs-6.6.23-gentoo-x86_64.img
/boot/initramfs-6.6.23-gentoo-x86_64.img


File exists

cp command usually replaces a file
which i have to do - as previous feature is broken - build with safe compression algorithm

--

2 errors found - do guys ever use their own software?

Sienna_Cichlid /usr/src # rm /boot/initramfs-6.6.23-gentoo-x86_64.img
Sienna_Cichlid /usr/src # genkernel --lvm --keymap --busybox --luks --real-root=genkernel_coder_is_an_idiot --kernel-config=/usr/src/.config --no-mrproper --microcode=none --compress-initramfs-type=gzip all







Reproducible: Always

Actual Results:  
Too many features broken


Expected Results:  
Commands should follow parameters, as always since 1996.

i Know genkernel generates a lot of lint files. A bit of intelligence should be coded, to see, user roman compiled 10 minutes ago genkernel, just replace the exisiting file in /boot.
Replace File in /boot when same gentoo sources and same genkernel package is used

name output which is needed as far as i know by kernel source properly - very old bug i know of

Kernel needs to have file name as name.cpio.xz not .img

-rwxr-xr-x 1 root root 5.1M Nov  2 18:14 initramfs-6.6.0-gentoo_20_10_2023.cpio.xz
-rwxr-xr-x 1 root root 5.7M Jan  8 01:45 initramfs-6.6.10-gentoo-x86_64.cpio.xz
-rwxr-xr-x 1 root root 5.7M Jan  8 01:42 initramfs-6.6.10-gentoo-x86_64.img
-rwxr-xr-x 1 root root 5.7M Apr  1 14:14 initramfs-6.6.23-gentoo-x86_64.cpio.gz
-rwxr-xr-x 1 root root 5.7M Apr  1 14:12 initramfs-6.6.23-gentoo-x86_64.img

I really wonder, do gentoo guys never build their own kernels? Or use genkernel to generate initramfs to build an efi stub kernel to boot from

i need initramfs to be in the file for the efi stub kernel, and htat kernel script only wants .cpio.xz (I hope cpio.gz works also)

More Lint Garbage from genkernel. Just replace those files!
Sienna_Cichlid /boot # rm System.map-6.6.23-gentoo-x86_64.old 
Sienna_Cichlid /boot # rm System.map-6.6.23-gentoo-x86_64

Less lint Garbage in my System - when it is not properly utilized.


No User Rights for - No option in this bug tamplete to do it. Fix it! or do not write do something when there is no option. I file bugs from time to time on several different platforms. Or be more specific how to do it properly. An useless text should not be used.

* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* '/var/log/genkernel.log' so that your issue can be dealt with effectively.


Please paste all information from 'emerge --info' in this section!

Sure if you can guarentee me that there are no personal information shared with the public. Like disk identifiers or others stuff which i need to delete beforehand. emerge --info is like a fingerprint of myself and my computer and account. Generic output without anything which could determine who i am.

like timestamp of the emerge --sync including minutes and which date. How many people are out there with the same timestamp?

How many people are out there with the same system uname? I say no one else!

or with accept_license ...

Fix emerge --info with a feature which is not so intrusive.

--

Removed the genkernel lint files

Surprise - Surprise - it worked

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
* 
* Make sure you have the latest ~arch genkernel before reporting bugs.

There was enough disk space on /boot ... too much before i turned on the computer today. Genkernel should generates lint and is not able to remove it!
Comment 1 Roman Gruber 2024-04-01 12:47:09 UTC
Major Features are broken for years and are not beeing adressed or fixed.

Initramfs with wrong name and other stuff.

These are just basics principles


Command line parameters are beeing ignored.

If you do that - than write in the first 5 lines of the generated output and the first 5 lines of the manpage and help section, that you do not follow basic principles.

Basic Principles should be followed

also the FHS Standard - which is beeing ignored also since 5 years at least here.

--

MAybe someone write an useful text for the genkernel garbage!


At the end of filling a bug at bugs.gentoo.org.
Go to the top right

In the add Line add please the following email adress genkernel@gentoo.org

Than click on the right top corner Save

--

I do not think I am the first ot see these errors.

--

save all files your program generates.

Tell the user maybe to delete theese lint files
or remove it yourself

as the file output is the same

/boot/something.img you could just overwrite the othter stuff

or make a more useful command like


Do you want the following files

/boot/filea
/boot/fileb
/boot/filec

or do you want to save those files as

/boot/duplicate/filea
...
...
...

With a yes or no dialogue. I do not htink that this is such complicated to code
Comment 2 Roman Gruber 2024-04-01 12:48:20 UTC
 Remove me from the CC list

I wrote a comment

and I put on the cc List again

Please fix that bug also for bugs.gentoo.org
Comment 3 Roman Gruber 2024-04-01 12:50:38 UTC
Expected Result

Sienna_Cichlid /boot # cp System.map-6.6.23-gentoo-x86_64 /usr/src/
Sienna_Cichlid /boot # cp initramfs-6.6.23-gentoo-x86_64.img /usr/src/


Sienna_Cichlid /usr/src # cp initramfs-6.6.23-gentoo-x86_64.img initramfs-6.6.23-gentoo-x86_64.cpio.gz 
Sienna_Cichlid /usr/src # binwalk initramfs-6.6.23-gentoo-x86_64.cpio.gz 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             gzip compressed data, maximum compression, has original file name: "initramfs-x86_64-6.6.23-gentoo-x86_64", from Unix, last modified: 2024-04-01 12:36:47
Comment 4 Ionen Wolkens gentoo-dev 2024-04-01 12:53:33 UTC
genkernel is effectively unmaintained and barely on life support for those that really want to keep using it, so ranting about it won't accomplish much.

I would recommend switching to dracut, and distribution kernels[1] (e.g. sys-kernel/gentoo-kernel)

[1] https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
Comment 5 Ben Kohler gentoo-dev 2024-04-01 14:31:25 UTC
(In reply to Roman Gruber from comment #2)
>  Remove me from the CC list
> 
> I wrote a comment
> 
> and I put on the cc List again
> 
> Please fix that bug also for bugs.gentoo.org

Please open a new bug if you believe that bugzilla is misbehaving with CC, but I suspect that is user error.  Thanks!
Comment 6 Enne Eziarc 2024-04-01 18:24:22 UTC
> The coder is an idiot

So I couldn't help but notice that in the very first line of this bug report you are running binwalk as root on files you claim to be unsafe.

I mean, disregarding that the version of genkernel you're using is pinned to xz 5.4.3 and so that whole rant about their safety is demonstrably false...
Comment 7 Mike Gilbert gentoo-dev 2024-04-01 19:29:37 UTC
This reads more like a rant than a bug report. Feel free to try again with a more concise explanation.