§2023-10-24
- liveGUI USB, passwd, sshd and add user alexlai
- default user gentoo, no password
/etc/init.d/sshd start
to start sshd service- I still can not ssh in as gentoo
sudo useradd -m -u 1026 -G wheel,video alexlai
sudo passwd alexlai
then I could ssh into it usingalexlai
efivar -l
to verify you are in efi mode
- When you ssh in
[alexlai@x8664Arch ~]$ ssh 192.168.48.6
(alexlai@192.168.48.6) Password:
Welcome to the Gentoo Linux LiveCD!
The root password on this system has been auto-scrambled for security.
If any ethernet adapters were detected at boot, they should be auto-configured
if DHCP is available on your network. Type "net-setup eth0" to specify eth0 IP
address settings by hand.
Check /etc/kernels/kernel-config-* for kernel configuration(s).
The latest version of the Handbook is always available from the Gentoo web
site by typing "links https://wiki.gentoo.org/wiki/Handbook".
To start an ssh server on this system, type "/etc/init.d/sshd start". If you
need to log in remotely as root, type "passwd root" to reset root's password
to a known value.
Please report any bugs you find to https://bugs.gentoo.org. Be sure to include
detailed information about how to reproduce the bug you are reporting.
Thank you for using Gentoo Linux!
- prtition hard disk as
$ sudo gdisk /dev/sdb
Number Start (sector) End (sector) Size Code Name
1 2048 999423 487.0 MiB EF00 EFI system partition
2 999424 17776639 8.0 GiB 8200 Linux swap
3 17776640 151994367 64.0 GiB 8300 Linux filesystem
$ sudo mkfs.ext4 -F 32 /dev/sdb3
$ sudo mkfs.ext4 /dev/sdb3
$ sudo mkswap /dev/sdb2
- verify time
$ date
$ tzselect
ntpdate pool.ntp.org
ntpdate
not found
- Installing the Gentoo base system, stage3
$ wget https://distfiles.gentoo.org/releases/amd64/autobuilds/20231022T164658Z/stage3-amd64-systemd-20231022T164658Z.tar.xz
$ sudo mkdir /mnt/gentoo
$ sudo mount /dev/sdb3 /mnt/gentoo
$ cd /mnt/gentoo
$ sudo tar xvf stage3-amd64-systemd-20231022T164658Z.tar.xz --xattrs -C /mnt/gentoo/
$ ls /mnt/gentoo/
bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin sys tmp usr var
$ ls /mnt/gentoo/boot/ <--- empty
- Configuring compile options
$ gcc -c -Q -march=native --help=target | awk '/^ -march=/ {print $2}'
goldmont-plus
$ lscpu | awk '/^CPU\(s\):/ {print $2}'
4
sudo nano -w /mnt/gentoo/etc/portage/make.conf
, as
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
# COMMON_FLAGS="-O2 -pipe"
COMMON_FLAGS="-march=goldmont-plus -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8
# MAKEOPTS
MAKEOPTS="--jobs 4 --load-average 3"
Load Average Below the Number of CPU Cores: A common rule of thumb is to keep the load average below the number of physical CPU cores or threads available on your system. For example, on a quad-core CPU, a load average of 4 or below is generally considered good.
- Selecting mirrors
$ sudo mirrorselect -D -s4 -o >> /mnt/gentoo/etc/portage/make.conf
-bash: /mnt/gentoo/etc/portage/make.conf: Permission denied
$ sudo passwd root
New password:
Retype new password:
passwd: password updated successfully
$ su
Password:
livecd /home/alexlai # mirrorselect -D -s4 -o >> /mnt/gentoo/etc/portage/make.conf
* Using url: https://api.gentoo.org/mirrors/distfiles.xml
* Downloading a list of mirrors...
Got 249 mirrors.
* Downloading 100k files from each mirror... [249 of 249]
- /mnt/gentoo/etc/portage/make.conf as,
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8
# EMERGE_DEFAULT_OPTS is set automatically by livecd-tools autoconfig during first live boot.
# This should be equal to number of processors, see "man emerge" for details.
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs=4 --load-average=4"
livecd /home/alexlai # cat /mnt/gentoo/etc/portage/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
# gcc -c -Q -march=native --help=target | awk '/^ -march=/ {print $2}'
# COMMON_FLAGS="-O2 -pipe"
COMMON_FLAGS="-march=goldmont-plus -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8
# MAKEOPTS
MAKEOPTS="--jobs 4 --load-average 3"
GENTOO_MIRRORS="http://ftp.vectranet.pl/gentoo/ \
http://gentoo.mirror.root.lu/ \
http://tux.rainside.sk/gentoo/ \
ftp://ftp.vectranet.pl/gentoo/"
- Configuring the main Gentoo repository
lexlai@livecd ~ $ sudo mkdir -p /mnt/gentoo/etc/portage/repos.conf
$ sudo cp -v /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
'/mnt/gentoo/usr/share/portage/config/repos.conf' -> '/mnt/gentoo/etc/portage/repos.conf/gentoo.conf'
- /mnt/gentoo/etc/portage/repos.conf/gentoo.conf, as
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /var/db/repos/gentoo
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes
sync-rsync-verify-jobs = 1
sync-rsync-verify-metamanifest = yes
sync-rsync-verify-max-age = 24
sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
sync-openpgp-keyserver = hkps://keys.gentoo.org
sync-openpgp-key-refresh-retry-count = 40
sync-openpgp-key-refresh-retry-overall-timeout = 1200
sync-openpgp-key-refresh-retry-delay-exp-base = 2
sync-openpgp-key-refresh-retry-delay-max = 60
sync-openpgp-key-refresh-retry-delay-mult = 4
sync-webrsync-verify-signature = yes
- Copy DNS info
$ sudo cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
--> `--dereference follow links`
$ cat /mnt/gentoo/etc/resolv.conf
# Generated by NetworkManager
search munetaka.me
nameserver 192.168.48.254
- arch-chroot
$ sudo arch-chroot /mnt/gentoo /bin/bash
livecd / # source /etc/profile
- add the following lines to the end of /etc/profile
# export PS1
export PS1="(chroot) $PS1"
``
- then
livecd / # source /etc/profile (chroot) livecd / #
10) first sync
(chroot) livecd / # emerge --sync (chroot) livecd / # ls -l /var/lib/portage/world -rw-r--r-- 1 root portage 0 Oct 22 19:23 /var/lib/portage/world
11) Choosing the right profile
(chroot) livecd / # eselect profile list Available profile symlink targets: [1] default/linux/amd64/17.1 (stable) [2] default/linux/amd64/17.1/selinux (stable) [3] default/linux/amd64/17.1/hardened (stable) [4] default/linux/amd64/17.1/hardened/selinux (stable) [5] default/linux/amd64/17.1/desktop (stable) [6] default/linux/amd64/17.1/desktop/gnome (stable) [7] default/linux/amd64/17.1/desktop/gnome/systemd (stable) [8] default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr (stable) [9] default/linux/amd64/17.1/desktop/plasma (stable) [10] default/linux/amd64/17.1/desktop/plasma/systemd (stable) [11] default/linux/amd64/17.1/desktop/plasma/systemd/merged-usr (stable) [12] default/linux/amd64/17.1/desktop/systemd (stable) [13] default/linux/amd64/17.1/desktop/systemd/merged-usr (stable) [14] default/linux/amd64/17.1/developer (exp) [15] default/linux/amd64/17.1/no-multilib (stable) [16] default/linux/amd64/17.1/no-multilib/hardened (stable) [17] default/linux/amd64/17.1/no-multilib/hardened/selinux (stable) [18] default/linux/amd64/17.1/no-multilib/systemd (dev) [19] default/linux/amd64/17.1/no-multilib/systemd/merged-usr (dev) [20] default/linux/amd64/17.1/no-multilib/systemd/selinux (exp) [21] default/linux/amd64/17.1/no-multilib/systemd/selinux/merged-usr (exp) [22] default/linux/amd64/17.1/systemd (stable) * <-- * indicate the default [23] default/linux/amd64/17.1/systemd/merged-usr (stable) [24] default/linux/amd64/17.1/systemd/selinux (exp) [25] default/linux/amd64/17.1/systemd/selinux/merged-usr (exp) [26] default/linux/amd64/17.1/clang (exp) [27] default/linux/amd64/17.1/systemd/clang (exp) [28] default/linux/amd64/17.1/systemd/clang/merged-usr (exp) [29] default/linux/amd64/17.0/x32 (dev) [30] default/linux/amd64/17.0/x32/systemd (exp) [31] default/linux/amd64/17.0/x32/systemd/merged-usr (exp) [32] default/linux/amd64/17.0/musl (dev) [33] default/linux/amd64/17.0/musl/clang (exp) [34] default/linux/amd64/17.0/musl/hardened (exp) [35] default/linux/amd64/17.0/musl/hardened/selinux (exp)
> if not ` eselect profile set 22 ` <-- to set the default
12) Configuring the USE variable
As we said, [USE flags](https://wiki.gentoo.org/wiki/USE_flag) are a core feature of Gentoo. Therefore, a good understanding of how to deal with them is needed to have a customized and healthy Gentoo system.
The USE variables can be defined system-wide or per package domain. You can read more info here:
- System-wide in [/etc/portage/make.conf](https://wiki.gentoo.org/wiki//etc/portage/make.conf#USE)
- Per package in [/etc/portage/package.use](https://wiki.gentoo.org/wiki//etc/portage/package.use)
We can see the list of USE flags that are set up in our system by running:
(chroot) livecd / # emerge --info | grep ^USE
USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl systemd test-rust udev unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
- for example
USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl systemd test-rust udev unicode xattr zlib"
This USE flag information can be broken down as follows:
- USE: These flags are used to control various options and dependencies for packages. Here's a breakdown of some of the specific USE flags listed in the output:
- amd64: This flag indicates that the system architecture is 64-bit AMD.
- bzip2: This flag indicates that the Bzip2 compression library support is enabled.
- dri: Direct Rendering Infrastructure for accelerated graphics.
- fortran: Fortran language support is enabled.
- ipv6: IPv6 support is enabled.
- systemd: Systemd support is enabled.
- test-rust: This flag is likely related to Rust language testing.
- udev: Udev device manager support is enabled.
- unicode: Unicode character support is enabled.
- zlib: Zlib compression library support is enabled.
We can find a description of all USE flags in ` less /var/db/repos/gentoo/profiles/use.desc `.
Additionally, the utility named ` quse ` from portage-utils package can tell us which package uses what USE flags.
For example, if you want to know which packages use the systemd flag we simply need to run:
` quse systemd ` --> shows the list of packages affected by systemd.
>In your case, since the USE variable is not present in your /etc/portage/make.conf file, your system is likely using the default USE flags provided by the selected profile. This is a common configuration for many Gentoo systems, as it simplifies the management of USE flags by relying on profile defaults.
13) Configuring the CPU Flags
USE flags that are available for our system. We could use the advantages of some CPU instruction sets using what are called CPU flags. You can read more on the [Gentoo CPU_FLAGS_X86 wiki page](https://wiki.gentoo.org/wiki/CPU_FLAGS_X86).
To know what optimizations we can use for our CPU, we're going to use a tool called cpuid2cpuflags:
` emerge --ask app-portage/cpuid2cpuflags `
(chroot) livecd / # cpuid2cpuflags CPU_FLAGS_X86: aes mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3
nano /etc/portage/make.conf
- And we add our CPU_FLAGS_X86 somewhere in the file.
```bash
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
# gcc -c -Q -march=native --help=target | awk '/^ -march=/ {print $2}'
# COMMON_FLAGS="-O2 -pipe"
COMMON_FLAGS="-march=goldmont-plus -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8
# MAKEOPTS
MAKEOPTS="--jobs 4 --load-average 3"
# GENTOO_MIRRORS
GENTOO_MIRRORS="http://ftp.vectranet.pl/gentoo/ \
http://gentoo.mirror.root.lu/ \
http://tux.rainside.sk/gentoo/ \
ftp://ftp.vectranet.pl/gentoo/"
# CPU_FLAGS_X86
CPU_FLAGS_X86="aes mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3"
- Re-compile and update @world
After setting up the USE and CPU flags, we're ready to re-compile and update all packages that we have installed in our base system before moving forward:
When you select a Gentoo profile during the installation of your Gentoo system, the profile typically includes a set of default USE flags that are already configured for you. These default USE flags are designed to be a good starting point based on the intended purpose of the profile.
emerge --ask --verbose --update --deep --newuse @world
- Allow licenses for packages
Each package in our Gentoo system defines what kind of license it uses. Setting what licenses we accept in our system is crucial to avoid problems installing free or binary redistributable packages. Also, to get installed automatically without asking us every time they get installed or updated.
You can read more about Gentoo licenses here.
Licenses acceptance is set in our /etc/portage/make.conf in the variable ACCEPT_LICENSE, like:
ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE"
- This line defines which licenses are acceptable and which are not. Let's break it down:
- ACCEPT_LICENSE="-*": The - symbol followed by * means that you are denying all licenses by default. In other words, you are saying that any package with an unspecified license (or a license not explicitly listed in the ACCEPT_LICENSE variable) is not acceptable.
- @FREE: This part of the line specifies that packages released under licenses that are categorized as "free" are acceptable. Free licenses generally grant you the freedom to use, modify, and distribute the software without significant restrictions.
- @BINARY-REDISTRIBUTABLE: This part of the line specifies that packages with licenses categorized as "binary redistributable" are also acceptable. These are licenses that allow you to redistribute compiled binary versions of the software.
- Timezone
We can use the tool tzselect to interactively select our country, and it will tell us what the value of /etc/timezone file should be.
(chroot) livecd / # tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", "TZ", or "time".
1) Africa 5) Asia 9) Indian Ocean 13) time - I know local time already.
2) Americas 6) Atlantic Ocean 10) Pacific Ocean
3) Antarctica 7) Australia 11) coord - I want to use geographical coordinates.
4) Arctic Ocean 8) Europe 12) TZ - I want to specify the timezone using the Posix TZ format.
#? 5
Please select a country whose clocks agree with yours.
1) Afghanistan 6) Bhutan 11) East Timor 16) Indonesia 21) Jordan 26) Kyrgyzstan 31) Mongolia 36) Palestine 41) Saudi Arabia 46) Taiwan 51) United Arab Emirates
2) Armenia 7) Brunei 12) French S. Terr. 17) Iran 22) Kazakhstan 27) Laos 32) Myanmar (Burma) 37) Philippines 42) Seychelles 47) Tajikistan 52) Uzbekistan
3) Azerbaijan 8) Cambodia 13) Georgia 18) Iraq 23) Korea (North) 28) Lebanon 33) Nepal 38) Qatar 43) Singapore 48) Thailand 53) Vietnam
4) Bahrain 9) China 14) Hong Kong 19) Israel 24) Korea (South) 29) Macau 34) Oman 39) Russia 44) Sri Lanka 49) Turkey 54) Yemen
5) Bangladesh 10) Cyprus 15) India 20) Japan 25) Kuwait 30) Malaysia 35) Pakistan 40) Réunion 45) Syria 50) Turkmenistan
#? 46
Based on the following information:
Taiwan
TZ='Asia/Taipei' will be used.
Selected time is now: Wed Oct 25 05:37:20 CST 2023.
Universal Time is now: Tue Oct 24 21:37:20 UTC 2023.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Asia/Taipei'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Taipei
?? ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime ??
- Configure locales
(chroot) livecd / # nano /etc/locale.gen
(chroot) livecd / # locale-gen
* Generating 3 locales (this might take a while) with 4 jobs
* (3/3) Generating C.UTF-8 ... [ ok ]
* (2/3) Generating ja_JP.UTF-8 ... [ ok ]
* (1/3) Generating en_US.UTF-8 ... [ ok ]
* Generation complete
* Adding locales to archive ... [ ok ]
(chroot) livecd / # locale -a
C
C.utf8
POSIX
en_US.utf8
ja_JP.utf8
(chroot) livecd / # eselect locale list
Available targets for the LANG variable:
[1] C
[2] C.utf8
[3] POSIX
[4] en_US.utf8
[5] ja_JP.utf8
[6] C.UTF8 *
[ ] (free form)
(chroot) livecd / # eselect locale set 4
Setting LANG to en_US.utf8 ...
Run ". /etc/profile" to update the variable in your shell.
(chroot) livecd / # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
(chroot) livecd / # echo $LANG
en_US.utf8
(chroot) livecd / # echo $LC_ALL
- Installing external firmware
Linux kernel is an open-source project, but some hardware manufacturers don't like the idea of open-source the code of its firmware (or modules), releasing a compiled binary version of them. These binaries can't be included in the Linux kernel repository, and they are packed in a package called sys-kernel/linux-firmware
.
So, before compiling the kernel, it is essential to know that some devices require additional firmware to make the system run properly. Second, these are more common than we think, from network adapters, wireless cards, graphic cards, and CPUs.
For the most common firmware requirements, we will install the sys-kernel/linux-firmware:
$ emerge --ask sys-kernel/linux-firmware `
...
>>> Completed (1 of 1) sys-kernel/linux-firmware-20230919::gentoo
* Messages for package sys-kernel/linux-firmware-20230919:
* Your configuration for sys-kernel/linux-firmware-20230919 has been saved in
* "/etc/portage/savedconfig/sys-kernel/linux-firmware-20230919" for your editing pleasure.
* You can edit these files by hand and remerge this package with
* USE=savedconfig to customise the configuration.
* You can rename this file/directory to one of the following for
* its configuration to apply to multiple versions:
* ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/
* [${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]
* If you are only interested in particular firmware files, edit the saved
* configfile and remove those that you do not want.
* GNU info directory index is up-to-date.
* IMPORTANT: 10 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
sys-firmware/intel-microcode
Additionally, check the Microocode page in the Gentoo wiki to see if you need any additional firmware to make your CPU work properly. For example, intel CPUs are usually required to install the Intel microcode package sys-firmware/intel-microcode
.
(chroot) livecd / # emerge --ask sys-firmware/intel-microcode
...
>>> Completed (2 of 2) sys-firmware/intel-microcode-20230808_p20230804::gentoo
* Messages for package sys-firmware/intel-microcode-20230808_p20230804:
* Unable to find kernel sources at /usr/src/linux
* Unable to calculate Linux Kernel version for build, attempting to use running version <-- ???
* GNU info directory index is up-to-date.
* IMPORTANT: 10 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
(chroot) livecd / # emerge --ask sys-kernel/gentoo-sources
(chroot) livecd / # eselect kernel list
Available kernel symlink targets:
[1] linux-6.1.57-gentoo
(chroot) livecd / # eselect kernel set 1
(chroot) livecd / # ls -l /usr/src
total 4
lrwxrwxrwx 1 root root 19 Oct 24 23:43 linux -> linux-6.1.57-gentoo
drwxr-xr-x 27 root root 4096 Oct 24 23:40 linux-6.1.57-gentoo
From this point, only two things are missing: configure and compile it. There are two ways to do that:
- Manual configuration and automated build
- Semi-automated by using `genkernel`
- Fully automated via distribution kernels (not covered in this guide. Follow the official documentation [here](https://wiki.gentoo.org/wiki/Project:Distribution_Kernel))