Part 1 - Base System
In my previous post, I mentioned that my 10-year-old PC went haywire and upgraded some components to fix them. One of them was the main hard disk that had Slackware installed. I replaced it with a new SSD disk, hoping to get some speed in processing (my PC was so old that I'm not expecting much of speed boost). Since my primary drive needed a replacement, I had to install new OS on it. I was thinking of putting Slackware as usual but it got me thinking a bit. Its last release was 4 years ago. I love its simplicity and stable build but didn't feel like installing a 4-year-old OS.
I've tried Debian, Arch, and Manjaro Linux before, but I always came back to Slackware before I knew it. While debating whether to put Slackware 14.2 again, I came across with Gentoo Linux. I knew the existance of Gentoo Linux and you'd need to compile every package, like Ports in FreeBSD. Well, I wanted to start a new so I decided to give it a try to see how I'd like it.
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.
I wanted the set up of my work environment be the same as what I had before (See Building My Work Environment (Part 1)), so most of applications that'll be installed will be the same. At any rate, the installation of Gentoo was a bit of trial and error, and it took quite a while to get it installed. I'll leave the steps to its Handbook, but its installation procedure is not a menu driven, like other distos. It involes a lot of typings. It reminded me of the Arch Linux installation.
Even Slackware installation is a console menu based, so that makes a big difference between these two distros. I would think the installation procedure for Gentoo or Arch is more flexible.
I have this 256GB SSD as a primary disk and 1TB SATA disk for /home. The SSD disk was brand new so I partitioned it as follows with parted;
|/dev/sda1||2MiB||-||BIOS boot partition|
For the secondary disk, I converted its partition table to gpt and created one partition for /home.
This below is my /etc/fstab. I have /var/tmp and /var/tmp/portage as tmpfs. I took an advice from Portage TMPDIR on tmpfs in Gentoo wiki.
|tmpfs||/var/tmp||tmpfs||rw,nosuid,noatime,nodev, size=10G,mode=1777||0 0|
|tmpfs||/var/tmp/portage||tmpfs||rw,nosuid,noatime,nodev,size=10G, mode=775,uid=portage,gid=portage, x-mount.mkdir=775||0 0|
Some of websites mention the use of discard mount option in fstab, but as SSD from Gentoo wiki and Solid State Drive from Archwiki stated, using the discard mount option is called continuous TRIM and it's not recommended. Instead, it suggests to run fstrim periodically. So, that's what I did using cron.
# crontab -e
# Global variables
# For details see man 5 crontab
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
15 04 * * 6 /sbin/fstrim /
XDG cache on tmpfs:
Many X Window System programs, such as Chromium, Firefox, etc..., make frequent disk I/O every few seconds to cache. To reduce strains to SSD, the default cache location can be changed to tmpfs. The default cache location is ~/.cache and this is HDD for my case but I sent it to tmpfs anyway.
# nvim /etc/profile.d/xdg_cache_home.sh
if [ $USER ]; then
/etc/portage/make.conf is used to customize the Portage environment for the entire system (not per package or user). The settings defined in this file will be applied to all packages that are being installed (or emerged). So far, these are my custom settings:
# cat /etc/portage/make.conf
CFLAGS="-march=native -O2 -pipe"
# The number of parallel make jobs that can be used
# USE flags
USE="-emacs -kde -gnome -bluetooth alsa"
# Language codes for US English and Japanese
L10N="en en-US ja"
If startx can't be found, it most likely X11 didn't get installed.
# emerge --ask x11-base/xorg-server
During the installation, I chose to install system logger (app-admin/sysklogd) and this may display the following messages in console:
sysklogd: /dev/xconsole: No such file or directory
When the message starts to appear, updating its configuration file should solve it.
# nvim /etc/syslog.conf
# *.=notice;*.=warn |/dev/xconsole
I have another post with more details about issues with ALSA sound, but to sum it up,I need to enable SND_HDA_CODEC_CONEXANT in the kernel options. The HD-audio component apparently consists of two parts, the driver and codec, and correct options need to be enabled.
eix is a set of utilities for searching and diffing local ebuild repositories using a binary cache. This is used to audit installed packages for maintenance. Use eix Gentoo wiki for how to set it up.
# emerge --ask app-portage/eix
- Part 1 - Base System
- Part 2 - Configuring Other Applications
- Part 3 - Setting up i3 Window Manager
- Part 4 - Virtualization with VirtualBox
Things To Be Installed:Fonts:
- Kochi (Japanese)
- cmus - Console based music player
- lxappearance - Change GTK based themes
- nitrogen - Set wallpapers
- My customized Morning Glory theme
- i3pystatus - Replacement for i3status
- rofi - Replacement for dmenu
- scrot - Command line screen capture
- neofetch - ASCII art to show logo and system info