I started genkernel --menuconfig all, only difference - i added Device Drivers/Real Time Clock, then i started compiling. All compiles perfectly (kernel/modules), but initramfs file is not created. A log with error is attached. Reproducible: Always
Created attachment 341380 [details] emerge --info
Created attachment 341382 [details] genkernel.log
Is xz present on your system?
Yes, when i type xz, it shows xz: Compressed data cannot be written to a terminal xz: Try 'xz --help' for more information
May be this is important, i don't know, i run genkernel under ssh session, with screen program.
Same problem here, I try to install a new Gentoo system on a really old laptop. Minimal DVD -> mount everything, chroot, emerge everything and 'genkernel all' compiles until the end but exits with an error ERROR: Compression (/usr/bin/xz -e --check=none -z -f -9) failed xz is reinstalled from repository, but gives same message as Vladimir: > /usr/bin/xz xz: Compressed data cannot be written to a terminal xz: Try 'xz --help' for more information
Could you please try again, but adding --loglevel=5 to the command, and post the log generated from that?
Created attachment 342532 [details] New genkernel.log
Tried to emerge old kernel (3.0.something) - still not compiles. Same error.
Well, seems i have resolved an issue. I run only genkernel initramfs And it says: /usr/bin/xz /var/tmp/genkernel/initramfs-3.7.10-gentoo: could not allocate memory I looked at compression command line: /usr/bin/xz -e --check=none -z -f -9 /var/tmp/genkernel/initramfs-3.7.10-gentoo Well, i have 370MB of RAM. But it is not sufficient. But why -9 (best compression)? I removed -9, and all worked fine. I need only to copy initramfs to /boot (and rename it). May be one can use --memlimit option. So, 370MB now is not sufficient to compile Linux Kernel, because of this xz option. Question - can we add some genkernel option to limit memory, used by xz? It's annoying to copy/pack initramfs each time.
Confirming this issue. web ~ # eix xz-utils -c [I] app-arch/xz-utils (5.0.4-r1@18.02.2013): utils for managing LZMA compressed files web ~ # eix genkernel -c [I] sys-kernel/genkernel (3.4.45@18.02.2013): Gentoo automatic kernel building scripts I have 1G memory on server and still have 'cannot allocate memory' from xz
It is not compiling the kernel that is limited, it is compressing the initramfs. I think I should take a look into this, I think we may need to have defaults for the compresor like now, but we should really let the user has a possiblity to pass their own options to the compressor.
Agreed.
By the way, if you will make a way to do so, don't forget to write about it in Installation Handbook. I think, this is related to installation to old computers.
Haaaaa, did you forget to edit your /etc/fstab and put in your SWAP partition? > swapon /dev/sda2 > genkernel initramfs solved it for me. No more out of memory error. But your solution without the compression level worked also very well. Regards, Boris
Well, my swap partition is 150Mb, and it is activated. May be 300M+150M is still not enough, i don't know.
I'm seeing this same problem on my system, and I have 4GB of swap. # swapon -s Filename Type Size Used Priority /dev/zram0 partition 511996 374008 16383 /dev/zram1 partition 511996 373632 16383 /dev/zram2 partition 511996 373940 16383 /dev/zram3 partition 511996 373328 16383 /dev/dm-3 partition 966652 110612 -1 /dev/dm-4 partition 966652 112924 -2
I can't reproduce this even on a VM with only 256MB of ram and no swap. If you still have an issue, patch in setting XZ_DEFAULTS. Eg: XZ_DEFAULTS=--memlimit=150MiB. Or re-open, and we'll add the ability to tweak it more; the xz manpage does describe how much memory is used by the presets like -9 (674MiB for compression)