ยง2023-10-21
- create a disk
16G seems not enough, go for 32G
$ qemu-img create -f qcow2 install-amd64-minimal-20231015T161657Z.qcow2 32G
Formatting 'install-amd64-minimal-20231015T161657Z.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=17179869184 lazy_refcounts=off refcount_bits=16
- Simulate with
skip -enable-kvm
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
$ qemu-system-x86_64 -m 4G -boot order=d \
-cdrom ./install-amd64-minimal-20231015T161657Z.iso \
./install-amd64-minimal-20231015T161657Z.qcow2
- in qemu simulation
-
ip ad
ping -c 3 google.com
-
gdisk /dev/sda
- /dev/sda1 as EFI, mkfs.vfat -F 32 /dev/sda1
- /dev/sda2 as ext4, mkfs.ext4 /dev/sda2
-
mount /dev/sda1 to /mnt/gentoo ( /mnt/gentoo already exits)
-
date
to see if it is OK- if not
chronyd -q
- if network is not accessible
date 100313162021
set toOctober 3rd, 13:16 in the year 2021
- if not
-
cd /mnt/gentoo
&&wget https://distfiles.gentoo.org/releases/amd64/autobuilds/20231015T161657Z/stage3-amd64-systemd-20231015T161657Z.tar.xz
-
Unpacking the stage tarball
tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner
--xattrs-include='*.*': This option instructs tar to include extended file attributes (xattrs) in the extraction process. Extended file attributes can store additional metadata about files, such as SELinux security context or file capabilities. The argument '*.*' is a pattern that includes all files and directories when extracting xattrs. This ensures that any extended file attributes associated with the files are preserved.
--numeric-owner: This option tells tar to preserve the numeric ownership (user and group IDs) of the files and directories being extracted. It's essential in order to maintain the ownership and permissions of files when extracting the tarball, as it ensures that the original user and group IDs are retained.
- Configuring compile options
nano /mnt/gentoo/etc/portage/make.conf
- add
MAKEOPTS="-j4 -l4"
, --> -l responsive
- add
-
Gentoo ebuild repository
mkdir --parents /mnt/gentoo/etc/portage/repos.conf
cp -v /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
-
edity DNS info
- ` nano /mnt/gentoo/etc/resolv.conf as
nameserver 8.8.8.8
nameserver 8.8.4.4
arch-chroot /mnt/gentoo /bin/bash
source /etc/profile
- add this line to /etc/profile
export PS1="(chroot) $PS1"
source /etc/profile
again the prompt will be(chroot) livecd
nano /etc/locale.gen
- uncomment
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
- locale-gen
- add the following lines to the end of /etc/profile`
#
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# export PS1
export PS1="(chroot) $PS1"
source /etc/profile
--> error bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF=8)
- Configuring Portage
emerge-webrsync
- Choosing the right profile
eselect profile list
eselect profile set
- sync with the @wolrd
emerge --ask --verbose --update --deep --newuse @world