Skip to main content

gentoo test

gentoo install doc from handbook 

mount rootfs
mount /dev/sdaX /mnt/
 

dl stage 3  rootfs

https://www.gentoo.org/downloads/ 
https://distfiles.gentoo.org/releases/amd64/autobuilds/ 
to get list of tarballs from terminal only : 
curl https://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3.txt 
20230917T164636Z/stage3-amd64-hardened-nomultilib-openrc-20230917T164636Z.tar.xz 239532616
 
curl https://distfiles.gentoo.org/releases/amd64/autobuilds/20230917T164636Z/stage3-amd64-hardened-nomultilib-openrc-20230917T164636Z.tar.xz > stage3.tar.xz
 
 

extract  rootfs

sudo tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner -C /mnt
or
sudo tar xpvf stage3-amd64-hardened-nomultilib-openrc-20230917T164636Z.tar.xz  --xattrs-include='*.*' --numeric-owner -C /mnt 
 

nano -w /mnt/etc/portage/make.conf

COMMON_FLAGS="-march=native -O2 -pipe"
##our nproc is 4 so j4 
MAKEOPTS="-j4"
 
ACCEPT_LICENSE="*"
VIDEO_CARDS="intel "
INPUT_DEVICES="libinput" 
 
## -kmod for all modules built inside kernel
 USE="-kmod -dbus -elogind -gnome  -kde -consolekit  -polkit -introspection -vala -pulseaudio -llvm -X -vulkan wayland"

ACCEPT_LICENSE="*"
VIDEO_CARDS="intel "
INPUT_DEVICES="libinput"

LC_MESSAGES=C.utf8
FFTOOLS="aviocat ffescape ffeval fourcc2pixfmt"

PORTAGE_SCHEDULING_POLICY="idle"
L10N="en_US"
LINGUAS="en_US"
LUA_TARGETS="luajit"
 
 
 mkdir -p /mnt/etc/portage/repos.conf

 cp /mnt/usr/share/portage/config/repos.conf /mnt/etc/portage/repos.conf/gentoo.conf

 cat /mnt/etc/portage/repos.conf/gentoo.conf
 
cp --dereference /etc/resolv.conf /mnt/etc/ 
ls -la  /mnt/etc/resolv.conf 
-rw-r--r-- 1 root root 84 Sep 24 13:44 /mnt/etc/resolv.conf
  cat /mnt/etc/resolv.conf 
# Resolver configuration file.
# See resolv.conf(5) for details.
nameserver 1.1.1.1
 
 
 cat chroot.sh 
#!/bin/sh
mount --rbind /dev /mnt/dev && mount --make-rslave /mnt/dev
mount --rbind /dev/pts /mnt/dev/pts && mount --make-rslave /mnt/dev/pts
mount --rbind /proc /mnt/proc && mount --make-rslave /mnt/proc
mount --rbind /sys /mnt/sys && mount --make-rslave /mnt/sys
chroot /mnt /bin/sh

bash chroot.sh

 source /etc/profile
export PS1="(gentoo) ${PS1}"
 
 for first time

emerge-webrsync
eselect news list,read,purge
man news.eselect
 
eselect profile list
 
 
profile in gentoo has default USE,CFLAGS and other important vars and also locks sys to certain range of pkgs
 
 
after changing profile update @world set
emerge --ask --verbose --update --deep --newuse @world 
 
emerge --info | grep ^USE
less /var/db/repos/gentoo/profiles/use.desc
 
portage git sync
emerge -a app-eselect/eselect-repository  dev-vcs/git  
 eselect repository remove gentoo
eselect repository add gentoo git https://github.com/gentoo-mirror/gentoo.git
portageq repos_config /
 
rm -r /var/db/repos/gentoo
 
emaint sync -r gentoo
 

https://wiki.gentoo.org/wiki/Eix
mkdir /etc/portage/env/
/etc/portage/env/eix-extra-econf.conf 
   EXTRA_ECONF="--enable-security
--enable-new-dialect
--enable-strong-optimization" 
 
 /etc/portage/package.env/eix
app-portage/eix eix-extra-econf.conf
 
emerge --ask app-portage/eix
 
/etc/eixrc/01-cache
OVERLAY_CACHE_METHOD="assign" 
 
cat /etc/portage/package.use/all  
app-admin/doas persist
media-libs/mesa vaapi
sys-auth/seatd server
gui-wm/sway -swaynag
x11-misc/i3blocks -contrib
media-video/mpv -xv alsa vaapi alsa drm jpeg lcms
media-video/ffmpeg alsa libdrm vaapi alsa mp3 vorbis lcms
net-wireless/wpa_supplicant tkip wps wep
media-libs/freetype harfbuzz
sys-apps/util-linux udev
media-libs/libplacebo -vulkan
app-text/poppler -utils cairo
app-misc/jq -oniguruma
dev-libs/light udev
net-wireless/iwd standalone -monitor
sys-apps/openrc -netifrc
net-misc/socat -ssl -ipv6

 
 
 
 

Timezone and locale

ls /usr/share/zoneinfo/Asia

echo "Asia/Kathmandu" > /etc/timezone

rm /etc/localtime

emerge --config sys-libs/timezone-data 

[make symlink to /etc/localtime i.e ln -s /usr/share/zoneinfo/Asia/Kathmandu /etc/localtime  if no file is present]

 

nano /etc/locale.gen

en_US.UTF-8 UTF-8
 
locale-gen
eselect locale list
eselect locale set N
cat /etc/env.d/02locale 
env-update && source /etc/profile && export PS1="(chroot) ${PS1}" 

 

manually download firmware and put in /lib/firmware

 emerge --ask sys-kernel/gentoo-sources
 https://packages.gentoo.org/packages/sys-kernel/gentoo-sources

 

eselect kernel list
eselect kernel set 1
ls -l /usr/src/linux 
 

 emerge --ask sys-apps/pciutils

cd /usr/src/linux 
make menuconfig
make && make modules_install
make install 

blkid 
nano -w /etc/fstab
#/dev/sda3   /            ext4    noatime  0 1
/dev/sda4 /home ext4 rw,noatime 0 0 

emerge --ask app-portage/cpuid2cpuflags
cpuid2cpuflags
CPU_FLAGS_X86: aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3
 
echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags
  
emerge --deselect gnumeric
emerge --update --deep @world
emerge --update --deep --newuse @world
emerge --ask --depclean 
 
 
for iwd 
https://iwd.wiki.kernel.org/gettingstarted
 
scripts/config --enable CONFIG_CRYPTO_USER_API_SKCIPHER
scripts/config --enable CONFIG_CRYPTO_USER_API_HASH
scripts/config --enable CONFIG_CRYPTO_HMAC
scripts/config --enable CONFIG_CRYPTO_CMAC
scripts/config --enable CONFIG_CRYPTO_MD4
scripts/config --enable CONFIG_CRYPTO_MD5
scripts/config --enable CONFIG_CRYPTO_SHA256
scripts/config --enable CONFIG_CRYPTO_SHA512
scripts/config --enable CONFIG_CRYPTO_AES
scripts/config --enable CONFIG_CRYPTO_ECB
scripts/config --enable CONFIG_CRYPTO_DES
scripts/config --enable CONFIG_CRYPTO_CBC
 
for systemd-utils
config:
* - BLK_DEV_BSG
* - DEVTMPFS
* - IDE
* - INOTIFY_USER
* - SYSFS_DEPRECATED
* - SYSFS_DEPRECATED_V2
* - SIGNALFD
* - EPOLL
* - FHANDLE
* - NET
* - UNIX 
 
for wps 
scripts/config --enable CONFIG_KEY_DH_OPERATIONS
 
usermod -a -G netdev <user> 
or wheel group to access iwctl dbus
  
firmware 
nano  /etc/portage/package.license 
 sys-kernel/linux-firmware @BINARY-REDISTRIBUTABLE
 emerge --ask sys-kernel/linux-firmware
 
or copy from linxu-firmware-git repo to /lib/firmware dir
 
 
media-libs/mesa 
 
https://packages.gentoo.org/packages/dev-libs/intel-compute-runtime
 
 manually running ebuild
ebuild /var/db/repos/gentoo/media-libs/mesa/mesa-23.1.6.ebuild compile
>>> Existing ${T}/environment for 'mesa-23.1.6' will be sourced. Run
>>> 'clean' to start with a fresh environment. 
ebuild /var/db/repos/gentoo/media-libs/mesa/mesa-23.1.6.ebuild install
ebuild /var/db/repos/gentoo/media-libs/mesa/mesa-23.1.6.ebuild qmerge
 
or 
 
 
emerge --resume 
 
nano /etc/portage/package.use/all
app-admin/doas persist
sys-auth/seatd server builtin
gui-wm/sway -swaynag
#x11-misc/i3blocks -contrib
dev-libs/light udev
net-wireless/iwd standalone -monitor
media-video/ffmpeg mp3 alsa libdrm x264 x265 vaapi
media-video/mpv alsa X drm -xv vaapi
emerge --ask app-portage/gentoolkit
https://wiki.gentoo.org/wiki/Equery
 
emerge -a wofi 
 ....
note version of adwaita-icon-theme and librsvg 
 
skip rust for now 
 nano /etc/portage/profile/package.provided
x11-themes/adwaita-icon-theme-44.0
gnome-base/librsvg-2.56.3
 

genpatches
https://gitweb.gentoo.org/proj/linux-patches.git/refs/heads
https://gitweb.gentoo.org/proj/linux-patches.git/tree/4567_distro-Gentoo-Kconfig.patch

REFCOUNT_FULL
PAGE_POISONING_ZERO
 

 

ffmpeg

AV1=webm,mkv ,ISOBMFF( MP4, 3GP, 3G2, .mj2, .dvb, .dcf, .m21, .f4v, HEIF),RTP

AV1, VP9, Theora, MPEG-5 Base profile= free

 VVC, HEVC, AVC, MPEG-5 Main profile= propi

GIF, MP3, MPEG-1, MPEG-2, MPEG-4 Part 2 = expired

 

AV1 implementation = Libaom , SVT-AV1, rav1e, dav1d, Cisco AV1

 

vaapi on mesa

https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/mesa/mesa-23.1.6.ebuild

ewarn "Ignoring USE=vaapi      since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau"
 
emerge -a media-libs/libva-intel-media-driver
 
USE=vulkan now needs llvm for mesa
  
emerge -ap firefox-bin
 media-libs/libogg  media-libs/flac  media-libs/libvorbis  media-sound/mpg123  media-libs/speexdsp
  media-libs/webrtc-audio-processing  media-libs/libsndfile  media-libs/libpulse  media-plugins/alsa-plugins
 
 

priority portage

PORTAGE_SCHEDULING_POLICY="idle"
 
 portageq can be used to show the active features:
portageq envvar FEATURES | xargs -n 1
 
To find out what FEATURES are set by default 
emerge --info | grep ^FEATURES= 
 

Userfetch

  

FEATURES="userfetch"

chown --recursive --verbose portage:portage /var/db/repos/gentoo

sudo chmod -R g+rwX /var/db/repos/gentoo/

 

verify distfiles

To re-verify the integrity and (potentially) re-download previously removed/corrupted distfiles for all currently installed packages, run:

emerge --ask --fetchonly --emptytree @world  

 

 

localization 

L10N="en_US"
LINGUAS="en_US"    

 

LINGUAS="", most ebuilds would install only the packages' default language but none of the LC_MESSAGES files.  

A USE_EXPAND variable called L10N decides which extra localization support will be installed.

complex entries have a different syntax because L10N uses IETF language tags (aka BCP 47). For example, pt_BR and sr@latin in LINGUAS become pt-BR and sr-Latn in L10N, respectively. 

 

 cat  /var/db/repos/gentoo/profiles/desc/l10n.desc

grep -i english /var/db/repos/gentoo/profiles/desc/l10n.desc

 

cat /etc/locale.gen

en_US.UTF-8 UTF-8
 

localedef --list-archive

eselect locale list

eselect locale set 1

 

/etc/conf.d/keymaps

keymap="us"

windowkeys="YES"

extended_keymaps="" 

dumpkeys_charset=""
fix_euro="NO"

    


systemd-utils

 * config:
 *  - BLK_DEV_BSG
 *  - DEVTMPFS
 *  - IDE
 *  - INOTIFY_USER
 *  - SYSFS_DEPRECATED
 *  - SYSFS_DEPRECATED_V2
 *  - SIGNALFD
 *  - EPOLL
 *  - FHANDLE
 *  - NET
 *  - UNIX


  /bin/systemd-hwdb
   /lib/udev/ata_id
   /bin/systemd-tmpfiles
   /bin/udevadm
   /lib/udev/cdrom_id
   /lib/udev/mtd_probe
   /lib/udev/fido_id
   /lib/udev/scsi_id
   /lib/udev/v4l_id
   /lib64/libudev.so.1.7.7

 module less system

make.conf

use="-kmod"

  cat  /var/lib/portage/world

app-admin/doas
app-editors/nano
app-editors/neovim
app-eselect/eselect-repository
app-misc/jq
app-misc/neofetch
app-misc/nnn
app-portage/cpuid2cpuflags
app-portage/eix
app-portage/gentoolkit
app-shells/bash-completion
app-text/zathura
app-text/zathura-pdf-poppler
dev-libs/dbus-glib
dev-libs/elfutils
dev-libs/light
dev-python/pip
dev-vcs/git
gui-apps/foot
gui-apps/grim
gui-apps/slurp
gui-apps/swaylock
gui-apps/wl-clipboard
gui-apps/wofi
gui-wm/sway
media-libs/libva-intel-media-driver
media-sound/alsa-utils
media-sound/apulse
media-video/mpv
net-misc/socat
net-misc/yt-dlp
net-wireless/iwd
net-wireless/wireless-regdb
sys-apps/ripgrep
sys-fs/ncdu
sys-fs/ntfs3g
sys-process/htop
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXrandr
x11-libs/libXtst
x11-misc/i3blocks
 

 

 

 refrences:

https://wiki.gentoo.org/wiki/GCC_optimization

https://wiki.gentoo.org/wiki/Safe_CFLAGS 
 
 
https://wiki.gentoo.org/wiki/Localization/Guide
 https://github.com/kzwkt/gentoo-dell-inspiron-3501 

https://wiki.gentoo.org/wiki/Portage_with_Git  

 https://wiki.gentoo.org/wiki/Recommended_applications  
https://wiki.gentoo.org/wiki/List_of_software_for_Wayland 
https://wiki.gentoo.org/wiki/FEATURES
 https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/Features
 

 https://wiki.gentoo.org/wiki/Localization

https://wiki.gentoo.org/wiki/Localization/Guide#Locale_system

 


Comments

Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone https://git.suckless.org/dwm xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim config.mk # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points Ahmia.fi - Clearnet search engine for Tor Hidden Services (allows you

download office 2021 and activate

get office from here  https://tb.rg-adguard.net/public.php open powershell as admin (win+x and a ) type cmd  goto insall dir 1.         cd /d %ProgramFiles(x86)%\Microsoft Office\Office16 2.           cd /d %ProgramFiles%\Microsoft Office\Office16 try 1 or 2 depending on installation  install volume license  for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x" activate using kms cscript ospp.vbs /setprt:1688 cscript ospp.vbs /unpkey:6F7TH >nul cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH cscript ospp.vbs /sethst:s8.uk.to cscript ospp.vbs /act Automatic script (windefender may block it) ------------------------------------------------------------------------------------------------------------------- @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - MSGuides.com&cls&echo =====================================================================================&