Table of Content
- Usefull Tools
- Update Your Gentoo System
- Chroot Into Your Gentoo System
- Cleanup Gentoo System
- Usefull Links
I will add more information related to Gentoo Linux from time to time.
Since my employer uses Ubuntu as the operating system, I only have a Gentoo Linux running on my private server.
Usefull Tools
eix – A Set Of Utilities For Searching
If you want to know if a package (program) is available you should use eix (wiki)!
Installation
emerge -av app-portage/eixKeep eix Up-To-Date
eix-syncSearching With eix
To search for a package containing foo keyword:
eix fooTo search for an installed package containing foo keyword:
eix -I fooUpdate Your Gentoo System
The following lines will update your Gentoo System. The first step is to create binary packages (with config files) before performing update steps to keep a backup of the current installed package version.
# update your package database
eix -uc
# create binary package for each package which will be updated later
quickpkg --include-config=y $(eix -uc --only-names)
# update all packages
emerge @world -uvaDN --autounmask-write --with-bdeps=y
# rebuild packages if need
emerge -va @preserved-rebuild @module-rebuild
revdep-rebuild -v -- --askMaybe you want to remove unused binary packages from time to time. I prefer eclean because I have app-portage/gentoolkit installed already.
Cleanup with eclean
eclean is part of app-portage/gentoolkit
eclean packagesCleanup with qpkg
qpkg is part of app-portage/portage-utils
qpkg -cChroot Into Your Gentoo System
Mount all devices and folder (Gentoo is located under /repair/:
mount --rbind /dev /repair/dev
mount --make-rslave /repair/dev
mount -t proc /proc /repair/proc
mount --rbind /sys /repair/sys
mount --make-rslave /repair/sys
mount --rbind /tmp /repair/tmpchroot into Gentoo:
chroot /repair /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"Cleanup Gentoo System
cleanup source directory (distfiles)
# -p -- only display what would be cleaned, remove -p after checking
eclean -p distfilescleanup binary files from system
# -p -- only display what would be cleaned, remove -p after checking
eclean -p packages