Skip to content

Instantly share code, notes, and snippets.

@kyberorg
Last active October 30, 2020 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyberorg/db3418b20b310dbda438 to your computer and use it in GitHub Desktop.
Save kyberorg/db3418b20b310dbda438 to your computer and use it in GitHub Desktop.
Gentoo install
#Network and ssh
ifconfig enp0s3 192.168.220.3/24 up
route add default gw 192.168.220.1
vi /etc/resolv.conf
service sshd start
passwd #Temporary liveCD root password
#Since now you can connect via SSH (root@192.168.220.3)
# MBR
parted /dev/sda
mklabel msdos
quit
#Creating /dev/sda1 (1 Gb) and /dev/sda2 (the rest space)
fdisk /dev/sda
>n
>1
>p
> (enter)
> +1G
>a
>n
>2
>p
> (enter)
> (enter)
>w
#Creating /dev/sdb2 (all space)
fdisk /dev/sdb
>n
>1
>p
> (enter)
> (enter)
>w
#LVM
/dev/vda1 boot_flag 512M linux
/dev/vda2 rest linux LVM (8e)
pvcreate /dev/vda2
vgcreate vg /dev/vda2
lvcreate -L 49.5G -n root vg
lvcreate -L 4G -n swap vg
#FS
mkfs.ext2 /dev/sda1
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sdb1
#Base system (stage 3)
mount /dev/sda2 /mnt/gentoo
cd /mnt/gentoo
wget http://mirror.yandex.ru/gentoo-distfiles/releases/amd64/autobuilds/current-stage3-amd64/stage3-amd64-20150226.tar.bz2 # (!!!) Update this path to latest
tar pxvf stage3-amd64-20141016.tar.bz2
#Chroot
mount /dev/sda1 /mnt/gentoo/boot
mount /dev/sdb1 /mnt/gentoo/home
mount -o bind /dev /mnt/gentoo/dev
mount -o bind /proc /mnt/gentoo/proc
mount -o bind /sys /mnt/gentoo/sys
#Screen (very optional)
vi ~/.screenrc
screen
chroot /mnt/gentoo /bin/bash
#
echo "nameserver 8.8.4.4" > /etc/resolv.conf
mkdir -p /usr/portage/metadata
echo "masters = gentoo" > /usr/portage/metadata/layout.conf
#All actions will be at chroot until cancel
env-update && source /etc/profile
export PS1="(chroot) $PS1"
#locale
nano -w /etc/locale.gen
locale-gen
eselect locale list
eselect locale set 4
. /etc/profile
#configure make options (optional)
nano -w /etc/portage/make.conf
mkdir /etc/portage/package.keywords
nano -w /etc/portage/package.keywords/custom
nano -w /etc/portage/package.mask/custom
nano -w /etc/portage/package.use/custom
#sync settings
mkdir /etc/portage/repos.conf
cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf
#sync
emerge-webrsync
emerge --sync
emerge --oneshot portage
#если будет баг с сборкой питона, то надо сделать (https://bugs.gentoo.org/show_bug.cgi?id=496328):
chmod 1777 /dev/shm
eselect news read
eselect profile list
#GUI profile
eselect profile set 3
#re-build world (optional)
emerge -av -u --newuse @world
#build
emerge -av app-editors/vim
#clock
#ls /usr/share/zoneinfo
echo "Europe/Moscow" > /etc/timezone
emerge --config sys-libs/timezone-data
#hostname and network
#if eth0 needed
touch /etc/udev/rules.d/80-net-name-slot.rules
# else узнаём имя адаптера (если используется live CD gentoo, то в этом нет смысла, мы уже знаем имя адаптера)
udevadm test-builtin net_id /sys/class/net/eth0
vim /etc/conf.d/hostname
vim /etc/conf.d/net
cd /etc/init.d
# Стандартный демон
ln -s net.lo net.enp0s3
#Кастомный демон
vim /etc/init.d/net (Source from: net deamon)
chmod +x net
ln -s /etc/init.d/net /etc/init.d/net.enp0s3
rc-update add net.enp0s3 default
#SSHD (optional)
rc-update add sshd default
#LVM at boot (if needed)
emerge -av sys-fs/lvm2
#здесь может не собраться boost
# собираем dev-util/boost-build-1.55.0 всеми потоками (оно вроде собирается)
emerge -av dev-util/boost-build
# даже перезапускаем собираться только сам boost (одним потоком)
MAKEOPTS="-j1" emerge -av dev-libs/boost
# собираем остальной lvm2 (уже всеми потоками)
emerge -av sys-fs/lvm2
rc-update add lvm boot
rc-update add lvmetad boot
#Syslog NG
emerge syslog-ng app-admin/logrotate
rc-update add syslog-ng default
vim /etc/syslog-ng/syslog-ng.conf
#Cron
emerge -av sys-process/vixie-cron
rc-update add vixie-cron default
#Hardware detection
emerge -av pciutils
#fstab
vim /etc/fstab
#Kernel
emerge -av gentoo-sources
#dmesg
emerge -av app-admin/mcelog
#genkernel script
emerge -av sys-kernel/genkernel
vim /etc/genkernel.conf
genkernel --menuconfig --lvm2 all
(menuconfig)# DeviceDrivers->multidevices(RAID)->(*)mapper
#e1000 (leave it as module)
Device Drivers -->Network device support --->Ethernet driver support
Inter devices
#Tux at boot
genkernel --menuconfig all
Device Drivers --> Graphics support --> Bootup Logo --> Standard 224-color Linux logo
Device Drivers --> Graphics support --> Support for frame buffer devices --> VESA VGA graphics support.
#Gentoo as KVM Guest
genkernel --menuconfig all
Processor type and features --->
[*] Linux guest support --->
[*] Enable Paravirtualization code
[*] KVM Guest support (including kvmclock)
Device Drivers --->
Virtio drivers --->
<*> PCI driver for virtio devices
[*] Block devices --->
<*> Virtio block driver
[*] Network device support --->
<*> Virtio network driver
#iptables NAT
Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> IP: Netfilter Configuration --->
всё делаем либо *, либо М
Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -->
<M> LOG target support
<M> "owner" match support
#optional kernel flags
General setup --> Disable heap randomization - [ ]
General setup --> Stack Protector buffer overflow detection (Regular)
RANDOMIZE_BASE [=y]
#Есть genkernel ругается на zfs, то спасет опция
genkernel --no-zfs
#Конфиг копируется сюда:
/etc/kernels/kernel-config-x86_64-3.18.7-gentoo
#Gentoo as VirtualBox guest
emerge --ask app-emulation/virtualbox-guest-additions
#grub
emerge -av sys-boot/grub:0
emerge --noreplace sys-boot/grub:0
vim /boot/grub/grub.conf
#доп.шаг для диска virtio
echo "(hd0) /dev/vda" >> /boot/grub/device.map
grub
#доп.шаг для диска virtio
grub> device (hd0) /dev/vda
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
#Root password (for new system)
passwd
# exit chroot
exit
#quit installation
umount -l /mnt/gentoo/dev
umount -l /mnt/gentoo{/boot,/proc,/sys}
umount -l /mnt/gentoo
reboot
#and plug'n'pray
#rm stage archive
rm /stage3-*.tar.bz2
#sync
emerge --sync
#update all system (gcc+...)
emerge -avDuN world
emerge --depclean
#Some useful stuff
emerge -av eix
eix-update
eix-sync
emerge -av screen
emerge -av app-misc/screen
#optional
emerge -av app-vim/screen
#config
vim /root/.screenrc
#optional (for all new users)
cp /root/.screenrc /etc/skel/.screenrc
emerge -av sys-process/htop
emerge -av net-dns/bind-tools
#ZSH
eix zsh
emerge -av app-shells/zsh app-shells/zsh-completions app-shells/gentoo-zsh-completions app-doc/zsh-lovers
vim ~/.zshrc
chsh -s /bin/zsh
ln -sf /bin/zsh /bin/sh
#users
useradd -g wheel -m -N -s /bin/zsh username
su - username
%vim ~/.zshrc
%exit
#sudo
USE="offensive" emerge -av sudo
emerge --config mail-mta/nullmailer
EDITOR="vim" visudo
#SSH key
su - username
mkdir ~/.ssh/
vim ~/.ssh/authorized_keys2
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys2
#SSHD config
see sshd_config
#########################################
#overlay
emerge layman
#uncomment "source ..." string at make.conf
#user guide
http://www.gentoo.org/proj/en/overlays/userguide.xml
#watch all overlays
layman -L
#install one
layman -a php
#update overlay
layman -S
#install package
emerge -av <category>/<package>
#DE/WM
layman -f -a kde-sunset
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/sda1 /boot ext2 defaults 0 2
/dev/sda2 / ext4 defaults 0 1
/dev/sdb1 /home ext4 noatime,commit=30,data=writeback,nobh,user_xattr 0 2
tmpfs /var/tmp/portage tmpfs uid=portage,gid=portage,mode=775,size=2048M,noatime 0 0
# Configuration file for genkernel
# This file is sourced by genkernel at startup and determines which options
# we will be using to compile our kernel. The order of precidence is simple,
# with the internal settings being least important, configuration file
# settings next, and command line options being most important.
# =========Common Command Line Option Defaults=========
# Should we install to $BOOTDIR? Default is "no" because genkernel is used in
# catalyst and stage building.
#INSTALL="yes"
# Run 'make oldconfig' before compiling this kernel?
OLDCONFIG="yes"
# Run 'make menuconfig' before compiling this kernel?
MENUCONFIG="yes"
# Run 'make clean' before compilation?
# If set to NO, implies MRPROPER WILL NOT be run
# Also, if clean is NO, it won't copy over any configuration
# file, it will use what's there.
CLEAN="yes"
# Run 'make mrproper' before configuration/compilation?
MRPROPER="yes"
# Override the arch detection?
#ARCH_OVERRIDE="x86"
# Mount BOOTDIR automatically if it isn't mounted?
MOUNTBOOT="yes"
# Make symlinks in BOOTDIR automatically?
SYMLINK="yes"
# Save the new configuration in /etc/kernels upon
# successfull compilation
SAVE_CONFIG="yes"
# Use Color output in Genkernel?
USECOLOR="yes"
# Clear build cache dir
#CLEAR_CACHE_DIR="yes"
# Clear all tmp files and caches after genkernel has run
#POSTCLEAR="1"
# Genkernel uses an independent configuration for MAKEOPTS, and does not source
# /etc/make.conf . You can override the default setting by uncommenting and
# tweaking the following line. Default setting is set up by
# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j
# argument is: <number of processors>*<number of cores per processor>+1
MAKEOPTS="-j13"
# Add in LVM support from static binaries if they exist on the system, or
# compile static LVM binaries if static ones do not exist.
LVM="yes"
# Add in Luks support. Needs sys-fs/cryptsetup with -dynamic installed.
#LUKS="no"
# Add in GnuPG support
#GPG="no"
# Add DMRAID support.
#DMRAID="no"
# Include (or suppresses the inclusion of) busybox in the initrd or initramfs.
# If included, busybox is rebuilt if the cached copy is out of date.
#BUSYBOX="yes"
# Includes mdadm/mdmon binaries in initramfs.
# Without sys-fs/mdadm[static] installed, this will build a static mdadm.
#MDADM="no"
# Specify a custom mdadm.conf.
# By default the ramdisk will be built *without* an mdadm.conf and will auto-detect
# arrays during bootup. Usually, this should not be needed.
#MDADM_CONFIG="/etc/mdadm.conf"
# Add Multipath support.
#MULTIPATH="no"
# Add iSCSI support.
#ISCSI="no"
# Add e2fsprogs support.
#E2FSPROGS="no"
# Include support for unionfs
#UNIONFS="1"
# Include support for zfs volume management.
ZFS="no"
# Enable copying of firmware into initramfs
FIRMWARE="yes"
# Specify directory to pull from
#FIRMWARE_DIR="/lib/firmware"
# Specify specific firmware files to include. This overrides FIRMWARE_DIR
#FIRMWARE_FILES=""
# Enable disklabel support (copies blkid to initrd)
DISKLABEL="yes"
# Add new kernel to grub?
BOOTLOADER="grub"
# Enable splashutils in early space (initrd). Default is "no".
#SPLASH="yes"
# Use this splash theme. If commented out - the "default" name theme is used.
# Also, SPLASH="yes" needs to be enabled for this one to one work.
# This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space).
#SPLASH_THEME="gentoo"
# Run the specified command in the current environment after the kernel and
# modules have been compiled, useful to rebuild external kernel module.
# use "emerge --quiet @module-rebuild" for >=portage-2.2
#CMD_CALLBACK=""
# =========Keymap Settings=========
#
# Force keymap selection at boot
#DOKEYMAPAUTO="yes"
# Disables keymap selection support
#KEYMAP="0"
# =========Low Level Compile Settings=========
#
# GNU Make to use for kernel. See also the --kernel-make command line option.
#KERNEL_MAKE="make"
# Compiler to use for the kernel (e.g. distcc). See also the --kernel-cc
# command line option.
#KERNEL_CC="gcc"
# Assembler to use for the kernel. See also the --kernel-as command line
# option.
#KERNEL_AS="as"
# Linker to use for the kernel. See also the --kernel-ld command line option.
#KERNEL_LD="ld"
# GNU Make to use for the utilities. See also the --utils-make command line
# option.
#UTILS_MAKE="make"
# Compiler to use for the utilities (e.g. distcc). See also the --utils-cc
# command line option.
#UTILS_CC="gcc"
# Assembler to use for the utilities. See also the --utils-as command line
# option.
#UTILS_AS="as"
# Linker to use for the utilities. See also the --utils-ld command line
# option.
#UTILS_LD="ld"
# Common prefix of cros compile commands
#UTILS_CROSS_COMPILE="x86_64-pc-linux-gnu"
# Value of CROSS_COMPILE utils variable
# during kernel compilation
#KERNEL_CROSS_COMPILE="x86_64-pc-linux-gnu"
# =========GENKERNEL LOCATION CONFIGURATION============
# Variables:
# %%ARCH%% - Final determined architecture
# %%CACHE%% - Final determined cache location
# Set genkernel's temporary work directory. Default is /var/tmp/genkernel
#TMPDIR="/var/tmp/genkernel"
# Set the boot directory, default is /boot
#BOOTDIR="/boot"
# Default share directory location
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
# Location of the default cache
CACHE_DIR="/var/cache/genkernel"
# Location of DISTDIR, where our source tarballs are stored
DISTDIR="${CACHE_DIR}/src"
# Log output file
LOGFILE="/var/log/genkernel.log"
# Debug Level
LOGLEVEL=1
# =========COMPILED UTILS CONFIGURATION============
#
# Default location of kernel source
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
# Default kernel config (only use to override using
# arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)
#DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"
# Specifies a user created busybox config
#BUSYBOX_CONFIG="/path/to/file"
#BUSYBOX_APPLETS="[ ash sh mount uname echo cut cat"
# NOTE: Since genkernel 3.4.41 the version of
# busybox, lvm, mdadm, .. have been moved to
# /usr/share/genkernel/defaults/software.sh in order to
# reduce the merging you have to do during etc-update.
# You can still override these settings in here.
# =========MISC KERNEL CONFIGURATION============
#
# Tag the kernel and ramdisk with a name:
# If not defined the option defaults to
# 'genkernel'
#KNAME="genkernel"
# This option is only valid if kerncache is
# defined. If there is a valid kerncache no checks
# will be made against a kernel source tree
#KERNEL_SOURCES="0"
# Build a static (monolithic kernel)
#BUILD_STATIC="1"
# Make and install kernelz image (PowerPC)
#GENZIMAGE="1"
# File to output a .tar.bz2'd kernel contents
# of /lib/modules/ and the kernel config
# NOTE: This is created before the callbacks
# are run!
#KERNCACHE="/path/to/file"
# Prefix to kernel module destination, modules
# will be installed in <prefix>/lib/modules
# (.conf equivalent of --module-prefix=<dir>)
#INSTALL_MOD_PATH=""
# =========MISC INITRD CONFIGURATION============
#
# Copy all kernel modules to the ramdisk
#ALLRAMDISKMODULES="1"
# Don't copy any modules to the ramdisk
#RAMDISKMODULES="0"
# File to output a .tar.bz2'd kernel and ramdisk:
# No modules outside of the ramdisk will be
# included...
#MINKERNPACKAGE="/path/to/file.bz2"
# File to output a .tar.bz2'd modules after the
# callbacks have run
#MODULESPACKAGE="/path/to/file.bz2"
# Directory structure to include in the initramfs,
# only available on >=2.6 kernels
#INITRAMFS_OVERLAY=""
# Build the generated initramfs into the kernel instead of
# keeping it as a separate file
#INTEGRATED_INITRAMFS="1"
# Compress generated initramfs
#COMPRESS_INITRD="yes"
# Types of compression: best, xz, lzma, bzip2, gzip, lzop, fastest
# "best" selects the best available compression method
# "fastest" selects the fastest available compression method
#COMPRESS_INITRD_TYPE="best"
# Create a self-contained env in the initramfs
#NETBOOT="1"
# =========MISC BOOT CONFIGURATION============
#
# Specify a default for real_root=
REAL_ROOT="/dev/vg/root"
default 0
timeout 3
splashimage=(hd0,0)/grub/splash.xpm.gz
title Gentoo
root (hd0,0)
kernel /kernel-genkernel-x86_64-3.14.14-gentoo root=/dev/sda2 nosplash vga=0x318 video=uvesafb:1024x768-24,mtrr:3,ywrap
initrd /initramfs-genkernel-x86_64-3.14.14-gentoo
title Gentoo(Rescue)
root (hd0,0)
kernel /kernel-genkernel-x86_64-3.14.14-gentoo root=/dev/sda2 nosplash init=/bin/bash
initrd /initramfs-genkernel-x86_64-3.14.14-gentoo
title Gentoo (LVM)
root (hd0,0)
kernel /kernel-genkernel-x86_64-3.18.7-gentoo dolvm real_root=/dev/mapper/vg-root nosplash vga=0x318 video=uvesafb:1024x768-24,mtrr:3,ywrap
initrd /initramfs-genkernel-x86_64-3.18.7-gentoo
title Gentoo (LVM+RAID)
root (hd0,0)
kernel /kernel-genkernel-x86_64-3.18.7-gentoo dolvm real_root=/dev/mapper/vg-root lvmraid=/dev/md0 nosplash vga=0x318 video=uvesafb:1024x768-24,mtrr:3,ywrap
initrd /initramfs-genkernel-x86_64-3.18.7-gentoo
hostname="myhost.domain.tld"
en_US ISO-8859-1
en_US.UTF-8 UTF-8
ru_RU.UTF-8 UTF-8
# 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.
CFLAGS="-O2 -march=native -pipe"
CXXFLAGS="${CFLAGS}"
#WARNING: adjust to yours CPU
CPU_FLAGS_X86="mmx sse sse2"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j13" #CPU num + 1
#LINGUAS="ru"
FEATURES="nodoc noinfo"
PYTHON_TARGETS="python2_7 python3_4"
USE_PYTHON="2.7 3.4"
INPUT_DEVICES="keyboard mouse"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="-X -apache2 -dbus -emacs -ipv6 mmx -ruby sse sse2 -systemd symlink "
ACCEPT_LICENSE="*"
#source /var/lib/layman/make.conf
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
SYNC="rsync://rsync2.ru.gentoo.org/gentoo-portage"
#DHCP example
config_enp0s3="dhcp"
# static
config_enp0s3="192.168.220.3/24"
routes_enp0s3="default gw 192.168.220.1"
dns_servers_enp0s3="8.8.4.4 8.8.8.8"
#!/sbin/runscript
extra_commands="restartdelay"
adapter="enp0s3"
start(){
source /etc/conf.d/net
ifconfig $adapter $config_enp0s3 up
route add $routes_enp0s3
#firewall script
#/srv/fw/fw.sh
}
stop(){
source /etc/conf.d/net
route del $routes_enp0s3
ifconfig $adapter down
}
restartdelay(){
stop
sleep 5
start
}
=dev-libs/libdbusmenu-12.10.2 ~amd64
=dev-libs/nss-3.17.2 ~amd64
=net-im/skype-4.3.0.37 ~amd64
virtual/jre ~amd64
www-client/firefox ~amd64
media-libs/mesa ~amd64
x11-libs/libdrm ~amd64
sys-boot/grub:2
sys-fs/udisks:0
dev-lang/ruby:1.9
app-editors/vim -X -minimal
app-emulation/libvirt policykit python
app-emulation/libvirt-glib python
app-emulation/virt-manager policykit spice
app-portage/layman git
dev-java/oracle-jre-bin nsplugin
dev-lang/python sqlite
dev-lang/ruby -gdbm -ncurses -rdoc -readline -ssl -yaml
dev-libs/libcdio -minimal
dev-libs/libxml2 python
dev-vcs/git -gpg -gtk
net-analyzer/nmap -gtk -lua
net-dns/bind-tools -ssl
net-fs/nfs-utils -nfsv4 -tcpd
net-libs/gtk-vnc python
net-libs/libsoup -ssl
net-libs/opal sip
net-libs/ptlib wav v4l2
net-misc/dhcpcd -compat -zeroconf
net-misc/openssh -X -tcpd
net-misc/spice-gtk -pulseaudio python
sys-apps/iproute2 -minimal
sys-apps/portage python3
sys-apps/util-linux -crypt
sys-block/parted -debug -device-mapper
sys-devel/gcc -gtk
sys-devel/gettext -git
sys-fs/udisks -crypt -gptfdisk
sys-kernel/gentoo-sources symlink
sys-libs/zlib static-libs minizip
sys-process/psmisc -X
nameserver 8.8.4.4
nameserver 8.8.8.8
hardstatus on
hardstatus alwayslastline
hardstatus string "%w"
ListenAddress 1.2.3.4:321 #do NOT forget to add rc_need="net.enp0s3" to /etc/conf.d/ssh, where enp0s3 is interface with IP 1.2.3.4
PermitRootLogin no
StrictModes yes
MaxAuthTries 2
MaxSessions 10
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys2
X11Forwarding no
PrintMotd yes
PrintLastLog yes
TCPKeepAlive yes
UseDNS no
VersionAddendum OpenBSD-666
@version: 3.4
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo,v 1.2 2013/06/02 01:18:35 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux
# https://bugs.gentoo.org/show_bug.cgi?id=426814
@include "scl.conf"
options {
threaded(yes);
chain_hostnames(no);
# The default action of syslog-ng is to log a STATS line
# to the file every 10 minutes. That's pretty ugly after a while.
# Change it to every 12 hours so you get a nice daily update of
# how many messages syslog-ng missed (0).
stats_freq(43200);
# The default action of syslog-ng is to log a MARK line
# to the file every 20 minutes. That's seems high for most
# people so turn it down to once an hour. Set it to zero
# if you don't want the functionality at all.
mark_freq(3600);
};
source src { system(); internal(); };
# Create message recievers
destination authlog { file("/var/log/auth.log"); };
destination messages { file("/var/log/messages"); };
destination sys_log { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination mail { file("/var/log/mail.log"); };
destination debug { file("/var/log/debug"); };
destination console { usertty("root"); };
# Create filters
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_user { facility(user); };
filter f_debug { not facility(auth, authpriv, news, mail); };
filter f_messages { level(info..warn)
and not facility(auth, authpriv, mail, news); };
filter f_emergency { level(emerg); };
filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };
filter f_failed { message("failed"); };
filter f_denied { message("denied"); };
# Connect filters with recievers
log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_syslog); destination(sys_log); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(src); filter(f_lpr); destination(lpr); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };
@kyberorg
Copy link
Author

lvcreate -l +100%FREE -n swap vg

@kyberorg
Copy link
Author

kyberorg commented Aug 16, 2016

!!! SYNC setting found in make.conf.
This setting is Deprecated and no longer used. Please ensure your 'sync-type' and 'sync-uri' are set correctly in /etc/portage/repos.conf/gentoo.conf

# mkdir /etc/portage/repos.conf
# cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf
# nano -w /etc/portage/repos.conf/gentoo.conf

change to

sync-type = webrsync

@kyberorg
Copy link
Author

kyberorg commented Aug 16, 2016

Form Gentoo News:

For example, if the following USE flags were present:
USE="mmx mmxext sse sse2 sse3"
Those flags need to be copied into:
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3"

The L10N variable is replacing LINGUAS as a USE_EXPAND, to avoid a
conceptual clash with the standard gettext LINGUAS behaviour.

@kyberorg
Copy link
Author

emerge -auDN world . That'll re-emerge anything that was built with different flags than what you have now.

When that is finished, it is also often a good idea to do a revdep-rebuild (from gentoolkit to ensure that libraries are in good shape.

Finally, when all this is done, you can optionally do a emerge -pv --depclean to remove any packages which are no longer required.

@kyberorg
Copy link
Author

Vmware tools

emerge pciutils
mkinitrd 
mkdir /etc/rc.d 
cd /etc/rc.d 
for i in seq 0 6; do mkdir rc$i.d; done 

File -> Install VMware Tools

 mount /mnt/cdrom 
cd /tmp 
tar xvfz /mnt/cdrom/VMwareTools-3.5.0-158874.tar.gz 
cd vmware-tools-distrib/ 
./vmware-install.pl

All defaults with the exception of: * /etc/rc.d -> location of the rc.d directories * /etc/init.d -> location of the init scripts
When prompted to run vmware-tools-config, decline

rc-update add vmware-tools default
/usr/bin/vmware-config-tools.pl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment