§2023-08-29
After kernel was prepared,
¶Step 1. /etc/fstab
(chroot) x8664Arch /usr/src/linux-6.1.46-gentoo # mount /dev/sdb2 /boot
(chroot) x8664Arch /usr/src/linux-6.1.46-gentoo # mkdir /boot/efi
(chroot) x8664Arch /usr/src/linux-6.1.46-gentoo # mount /dev/sdb1 /boot/efi
(chroot) x8664Arch /usr/src/linux-6.1.46-gentoo # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sdb 8:16 0 232.9G 0 disk
├─sdb1 8:17 0 100M 0 part /boot/efi
├─sdb2 8:18 0 512M 0 part /boot
├─sdb3 8:19 0 60G 0 part /
├─sdb4 8:20 0 1K 0 part
├─sdb5 8:21 0 16G 0 part
└─sdb6 8:22 0 156.3G 0 part
sdb
├─sdb1 vfat FAT32 0AC9-EBFE <-- EFI
├─sdb2 vfat FAT32 0E7C-DDB1 <-- boot
├─sdb3 ext4 1.0 ae599083-2605-44af-a30e-fcd0a47bc37e <-- /
├─sdb4 <-- logical
├─sdb5 swap 1 88d07bb3-0772-42ba-a98d-fa53e3144c53
└─sdb6 xfs b73c695c-1626-41e5-b079-a4a9295590fc
/dev/sdb3: UUID="ae599083-2605-44af-a30e-fcd0a47bc37e" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="dccd4c68-03"
/dev/sdb2: UUID="0E7C-DDB1" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="dccd4c68-02"
/dev/sdb5: UUID="88d07bb3-0772-42ba-a98d-fa53e3144c53" TYPE="swap" PARTUUID="dccd4c68-05"
/dev/sdb1: UUID="0AC9-EBFE" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="dccd4c68-01"
/dev/sdb6: UUID="b73c695c-1626-41e5-b079-a4a9295590fc" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="dccd4c68-06"
- /etc/fstab
<fs> <mountpoint> <type> <opts> <dump> <pass>
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdb1
UUID=0AC9-EBFE /boot/efi vfat default 0 2
# /dev/sdb2
UUID=0E7C-DDB1 /boot vfat default 0 2
# /dev/sdb3
UUID=UUID=ae599083-2605-44af-a30e-fcd0a47bc37e / ext4 rw,relatime 0 1
¶Step 2: add alexlai, and root
# passed <-- root
# useradd -u 1026 -m alexlai <-- -g 1026 will be auto created
# passwd alexlai
¶Step 3. add additionla softweare
¶Step 4 emerge -av sys-kernel/genkernek
(chroot) x8664Arch /usr/src/linux-6.1.46-gentoo # emerge -av sys-kernel/genkernel
* IMPORTANT: 15 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 4.47 s.
!!! All ebuilds that could satisfy "sys-kernel/linux-firmware" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-kernel/linux-firmware-99999999::gentoo (masked by: || ( ) linux-fw-redistributable license(s), missing keyword)
A copy of the 'linux-fw-redistributable' license is located at '/usr/portage/licenses/linux-fw-redistributable'.
- sys-kernel/linux-firmware-20230804::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
- sys-kernel/linux-firmware-20230625_p20230724::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
- sys-kernel/linux-firmware-20230625_p20230707::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
- sys-kernel/linux-firmware-20230515::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
(dependency required by "sys-kernel/genkernel-4.3.5::gentoo[firmware]" [ebuild])
(dependency required by "sys-kernel/genkernel" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
fix echo
I apologize for any confusion. It seems like there's an issue with the directory structure or permissions. If you're still facing difficulties creating the file, let's try a slightly different approach:
Open a terminal in your Gentoo system.
Create the necessary directory and file using the mkdir and echo commands:
sh
sudo mkdir -p /etc/portage/package.accept_keywords/sys-kernel
sudo touch /etc/portage/package.accept_keywords/sys-kernel/linux-firmware
Edit the newly created file to add the keyword using a text editor:
sh
sudo nano /etc/portage/package.accept_keywords/sys-kernel/linux-firmware
Add the keyword line:
bash
=sys-kernel/linux-firmware-20230804 **
cd /etc/portage/package.accept_keywords/sys-kernel
Edit the package.accept_keywords File: Inside the category directory, you should find a file named package.accept_keywords. Edit this file using a text editor:
bash
sudo nano package.accept_keywords
Add the Keyword Line: Add a line to unmask the desired package version with the appropriate keyword, as mentioned earlier. For instance:
plaintext
sys-kernel/linux-firmware-20230804 <keyword>
Replace <keyword> with either ~amd64 for testing or amd64 for stable.
Save and Exit: After adding the line, save the file and exit the text editor.
Update Portage and Install: Follow the previous steps to update Portage and install the package:
bash
sudo emerge --sync
sudo emerge -av sys-kernel/genkernel
¶Step 4. o install the GRUB Bootloader,
(chroot) x8664Arch /usr/src/linux-6.1.46-gentoo # emerge --ask sys-boot/grub
* IMPORTANT: 15 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 4.16 s.
[ebuild N ] sys-apps/hwdata-0.372
[ebuild N ] media-libs/libpng-1.6.40-r1 USE="-apng -static-libs" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse"
[ebuild N ] app-text/mandoc-1.14.6 USE="-cgi (-selinux) -system-man -test"
[ebuild N ] media-libs/freetype-2.13.0 USE="adobe-cff bzip2 cleartype-hinting png -X -brotli -debug -doc -fontforge -harfbuzz (-infinality) -static-libs -svg -utils" ABI_X86="(64) -32 (-x32)"
[ebuild N ] sys-apps/pciutils-3.10.0 USE="kmod udev zlib -dns -static-libs" ABI_X86="(64) -32 (-x32)"
[ebuild N ] sys-libs/efivar-38 USE="-test"
[ebuild N ] sys-boot/efibootmgr-18-r1
[ebuild N ] sys-boot/grub-2.06-r7 USE="fonts nls themes -device-mapper -doc -efiemu -libzfs -mount -sdl (-test) -truetype -verify-sig" GRUB_PLATFORMS="efi-64 pc -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh"
Would you like to merge these packages? [Yes/No] yes
..
/usr/sbin/grub-bios-setup
/usr/sbin/grub-probe
/usr/bin/grub-mkrelpath
/usr/bin/grub-mkimage
/usr/sbin/grub-sparc64-setup
/usr/bin/grub-script-check
/usr/bin/grub-editenv
/usr/sbin/grub-ofpathname
/usr/bin/grub-mkpasswd-pbkdf2
/usr/sbin/grub-macbless
/usr/bin/grub-fstest
/usr/bin/grub-mkrescue
/usr/bin/grub-mklayout
/usr/sbin/grub-install
/usr/bin/grub-mknetdir
/usr/bin/grub-mkstandalone
/usr/bin/grub-file
/usr/bin/grub-menulst2cfg
/usr/bin/grub-glue-efi
/usr/bin/grub-syslinux2cfg
/usr/bin/grub-render-label
mount /dev/sdb2 /boot
mkdir /boot/efi
mkdir /boot/grub
mount /dev/sdb1 /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi grub-mkconfig -o /boot/grub/grub.cfg