切腹のイラスト

Gentoo Install Battle

{
  date: "",
  category: "/unix-like",
  tags: ["Gentoo"]
}

自分用のメモ。

A. 共通

A.1. 下拵え

cd /mnt/gentoo
curl https://ftp.dyama.net/pub/gentoo-from-scratch/23.0-llvm/stage3-*.tar.xz | \
  tar xpvJ --xattrs-include='*.*' --numeric-owner
rm -r **/.keep* etc/.pwd.lock etc/xml/.lock
vim etc/fstab
arch-chroot .
mount -t tmpfs tmpfs /var/tmp

A.2. プロファイルの設定

emerge-webrsync
# USE='mrustc-bootstrap d' emerge -1j rust:1.86.1 gcc:11
emerge -1j dev-vcs/git mold
mv /etc/portage /tmp
git clone https://github.com/yamader/gentoo-config /etc/portage
eselect profile set yamad:llvm-desktop-systemd # or yamad:llvm-desktop
nano /etc/portage/binrepos.conf
rm -r /var/db/repos/*
emerge --sync
emerge -uDNgk @world
emerge -gk yamad/candy yamad/cloud yamad/dev yamad/editors yamad/extra yamad/fonts yamad/games yamad/gentoo yamad/gnome yamad/gui yamad/i18n yamad/langs yamad/laptop yamad/libs yamad/net yamad/office yamad/sci-ml yamad/srv yamad/sys yamad/themes yamad/utils yamad/vm-containers yamad/wayfire yamad/wayland yamad/X

A.3. その他共通設定

emerge -1n dracut
mkdir -p /etc/dracut.conf.d
echo "hostonly=no" >> /etc/dracut.conf.d/95-no-hostonly.conf

emerge -1n logrotate
cat > /etc/logrotate.d/portage <<-EOF
	# /etc/logrotate.d/portage
	
	/var/log/emerge-fetch.log {
	    createolddir 755 portage portage
	    olddir /var/log/portage/old
	    su portage portage
	    copytruncate
	    missingok
	}
	
	/var/log/emerge.log {
	    createolddir 755 portage portage
	    olddir /var/log/portage/old
	    su portage portage
	    copytruncate
	    missingok
	}
	
	/var/log/portage/*.log {
	    su portage portage
	    missingok
	    nocreate
	}
EOF

B. OpenRC

todo

C. SystemD

下拵え

仕上げ