ยง2023-08-26
(chroot) hc4Gentoo /usr/src # ln -sf linux-6.1.46-gentoo/ linux
(chroot) hc4Gentoo /usr/src # mount /dev/sda1 /boot/
(chroot) hc4Gentoo /usr/src # mount /dev/sda1 /boot/
(chroot) hc4Gentoo /usr/src # genkernel initramfs
* Gentoo Linux Genkernel; Version 4.3.5
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: initramfs
* Working with Linux kernel 6.1.46-gentoo for arm64
* Using kernel config file '/usr/share/genkernel/arch/arm64/generated-config' ...
* Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-arm64' because kernel was not built ...
* initramfs: >> Initializing ...
* >> Appending devices cpio data ...
* >> Appending base_layout cpio data ...
* >> Appending util-linux cpio data ...
* >> Appending eudev cpio data ...
* >> Appending auxiliary cpio data ...
* >> Appending busybox cpio data ...
* >> Appending modprobed cpio data ...
* >> Appending modules cpio data ...
* >> Deduping cpio ...
* >> Pre-generating initramfs' /etc/ld.so.cache ...
* >> Compressing cpio data (.xz) ...
xz: Reduced the number of threads from 4 to one. The automatic memory usage limit of 917 MiB is still being exceeded. 1250 MiB of memory is required. Continuing anyway.
*
* You will find the initramfs in '/boot/initramfs-6.1.46-gentoo.img'.
* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly:
* 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.
* Failed to determine session leader; Will not try to stop child processes
Creating an initramfs (initial RAM file system) image is an important step in setting up a chroot environment for installing Gentoo or any other Linux distribution. The initramfs image is used to provide the necessary drivers, modules, and tools required to boot into the real root file system, especially when dealing with complex storage configurations or encryption. Here's a general outline of the process:
Prepare Your System:
Before creating the initramfs image, make sure you have the necessary tools installed. You'll need the genkernel tool, which is commonly used in Gentoo to generate kernel and initramfs images. If you haven't installed it already, you can do so using Gentoo's package manager emerge:
sh
Copy code
emerge genkernel
Configure Your Kernel:
If you haven't configured and compiled your kernel yet, you'll need to do that first. You can use the make menuconfig, make xconfig, or other kernel configuration tools to set up your kernel. Make sure to include the necessary drivers and modules for your hardware, especially for disk controllers or filesystems that you'll need to access before the real root filesystem is mounted.
Generate the Initramfs:
Once your kernel is configured, you can generate the initramfs image using genkernel. The following command will generate an initramfs image using the configuration of the currently running kernel:
sh
Copy code
genkernel initramfs
This command will create an initramfs image named initramfs-linux.img in the /boot directory.
Co
- `emerge sys-kernel/genkernel` error and fix
It appears that you're encountering a package mask issue related to the sys-kernel/linux-firmware package when trying to install sys-kernel/genkernel. This issue arises because the sys-kernel/linux-firmware package has some licensing restrictions that are preventing it from being installed automatically.
To address this, you have a few options:
Accept the License:
If you're comfortable with the licensing terms, you can accept the license for the linux-fw-redistributable package. This will allow you to install sys-kernel/linux-firmware and subsequently sys-kernel/genkernel. Run the following command to accept the license:
sh
Copy code
echo "sys-kernel/linux-firmware linux-fw-redistributable" >> /etc/portage/package.license
After that, you can try running emerge sys-kernel/genkernel again.
Unmask the Package:
If you're okay with unmasking the sys-kernel/linux-firmware package, you can do so by adding the package to the package.unmask file. Create the file if it doesn't exist:
sh
Copy code
touch /etc/portage/package.unmask
Then, add the following line to the package.unmask file:
bash
Copy code
sys-kernel/linux-firmware
After that, try running emerge sys-kernel/genkernel again.
Install Without Firmware:
If your system doesn't require the linux-firmware package for your specific use case, you can try to install sys-kernel/genkernel without its firmware dependency. Run the following command to avoid installing firmware:
sh
Copy code
USE="-firmware" emerge sys-kernel/genkernel
This will exclude the firmware dependency while installing genkernel.
Remember that your choice should depend on your specific requirements and how the software on your system is impacted by these licensing restrictions. Always make sure you understand the implications of license agreements and follow best practices for your situation.