systemd/Installing Gnome3 from scratch
- Instructions for configuring a static IP
To install a desktop environment such as GNOME 3 requires the use of systemd but the present Gentoo Handbook is based on the use of OpenRC. It just indicates that changes have to be made when using systemd but never tells the user where the changes occur.
As for the systemd page, it mainly concentrate on an update starting from an existing system. Thus, it can be a kind of challenge, especially for a new comer to Gentoo, to install a GNOME 3 desktop from scratch. The purpose of this page is to indicate where changes have to be made to the current Gentoo Handbook to do so.
The indications given refer mainly to an amd64 install.
Base system installation
Hereafter are the modifications to bring to the Gentoo Handbook for an amd64 platform.
Part 1 to 5 of the Gentoo Handbook
No changes here.
Installing the Gentoo base system
Choosing the right stage3 tarball
A stage3 tarball already configured for systemd is available for most architectures. You will find it along with the other stage3 tarballs in the autobuilds directory of your preferred mirror. To save time and effort, use this tarball when installing the base system.
Choosing the right profile
eselect profile list
Available profile symlink targets:  default/linux/amd64/17.1 (stable)  default/linux/amd64/17.1/selinux (stable)  default/linux/amd64/17.1/hardened (stable)  default/linux/amd64/17.1/hardened/selinux (stable)  default/linux/amd64/17.1/desktop (stable)  default/linux/amd64/17.1/desktop/gnome (stable)  default/linux/amd64/17.1/desktop/gnome/systemd (stable)  default/linux/amd64/17.1/desktop/plasma (stable)  default/linux/amd64/17.1/desktop/plasma/systemd (stable)  default/linux/amd64/17.1/desktop/systemd (stable)
Select the profile ending in gnome/systemd:
eselect profile set default/linux/amd64/17.1/desktop/gnome/systemd
On the amd64 platform there are also two other profiles ending in systemd. Select systemd if a desktop environment is not required for the system (servers, etc). A KDE option plasma/systemd is also available.
An asterisk indicates the currently selected profile. Verify the correct profile has been selected:
eselect profile list
Available profile symlink targets:  default/linux/amd64/17.1 (stable)  default/linux/amd64/17.1/selinux (stable)  default/linux/amd64/17.1/hardened (stable)  default/linux/amd64/17.1/hardened/selinux (stable)  default/linux/amd64/17.1/desktop (stable)  default/linux/amd64/17.1/desktop/gnome (stable)  default/linux/amd64/17.1/desktop/gnome/systemd (stable) *  default/linux/amd64/17.1/desktop/plasma (stable)  default/linux/amd64/17.1/desktop/plasma/systemd (stable)  default/linux/amd64/17.1/desktop/systemd (stable)
Updating the system
The choice of the desktop/gnome/systemd profile implies a lot of changes in the list of packages to be installed. Perform a full system update before going on:
emerge --ask --update --deep --newuse @world
Configuring the kernel
When planning to include support for a graphic card that requires proprietary binary blobs be sure to emerge the sys-kernel/linux-firmware package. Otherwise the kernel will not compile.
emerge --ask sys-kernel/linux-firmware
It may not be necessary at this stage, but it does not hurt to add the VIDEO_CARDS variable, set with an appropriate video card value, to /etc/portage/make.conf.
For a quick and dirty kernel, use option menuconfig with genkernel, and optionally lvm and/or mdadm when using LVM and/or RAID. Do not forget to install sys-fs/lvm2 and/or sys-fs/mdadm if you intend to use LVM and/or RAID. Please see LVM#Software for details about LVM.
emerge --ask sys-fs/lvm2
genkernel [--lvm] [--mdadm] --menuconfig all
Select the systemd init system. You may leave the Openrc option set (if you wish to enable both Openrc and systemd), or you can disable Openrc here, to make the kernel smaller.
Gentoo Linux ---> Support for init systems, system and service managers ---> [*] Openrc [*] systemd
When using LVM activate the following kernel options:
Device Drivers ---> Multiple devices driver support (RAID and LVM) ---> <*> Device mapper support <*> Crypt target support <*> Snapshot target <*> Mirror target <*> Multipath target <*> I/O Path Selector based on the number of in-flight I/Os <*> I/O Path Selector based on the service time
Not everything needs to be enabled; some of the options are only needed for LVM2 Snapshots and LVM2 Thin Snapshots, LVM2 Mirrors, LVM2 RAID 0/Stripeset and encryption.
Alternatively, if you want to tailor the kernel yourself, use "make menuconfig", choose systemd (and optionally Openrc) in the Gentoo Linux options as shown above, and select the rest of the kernel options yourself.
When you have configured the kernel, save the configuration, exit the menuconfig dialog, and proceed as explained in the Handbook.
make && make modules_install
If you need an initramfs file (and you probably will need one), dracut works very well.
dracut --hostonly --force
The --force option is necessary because the generated initramfs file will have the same name as the initramfs file used to boot the installation system.
Configuring the system
Defining the keyboard
With systemd, setting
keyboard=fr into /etc/conf.d/keymaps will be effectless. Instead, you should set this into /etc/vconsole.conf.
The various keymaps are stored into subdirectories of /usr/share/keymaps/ and can be listed with the following command
When intending to use a very specific keymap (such as the French bepo typematrix keymap) that is not listed here, get it by any way at your disposal in the form of a .gz file, store it on a drive accessible to the system, mount this drive and copy it into one of the subdirectories of /usr/share/keymaps/. Then run the previous command again to make sure it is available.
Once you have you keymap listed, select it with the following command, replacing
fr-dvorak-bepo with your own keymap:
localectl set-keymap --no-convert fr-dvorak-bepo
Double check by running:
Installing necessary system tools
syslog-ng or sysloggd are no longer necessary since Systemd comes with its own journaling functionality. It is possible to skip this section completely. Please, have also a look at the man page of journalctl or at this more readable page on the Arch Linux wiki (and its subsequents links) to know more about the journalctl command that allows you to read the entries of this journal. Nevertheless, the previous loggers can still be used in conjunction with systemd.
syslog-ng conflicts with systemd  systemd creates /dev/log as datagram socket   so you will need to tell syslog-ng to read from a unix-dgram instead of a unix-stream if you are hitting problems and are using "wrong" stream:
Should be replaced with:
In order to use the syslog-ng service in systemd.
To enable syslog-ng use the following command:
systemctl enable syslog-ng
To disable it, use:
systemctl disable syslog-ng
dhcpcd will not be started at boot unless you enable dhcpcd.service with systemd.
Refer to the systemd page to know how to do it before rebooting. Otherwise you will be able to do so after boot with:
systemctl enable dhcpcd.service
systemctl start dhcpcd.service
Installing systemd itself
If you did the full update as advised before systemd should already be installed.
emerge --ask sys-apps/systemd
You don't have to add systemd flag to /etc/portage/make.conf as it is already set into the chosen profile.
Configuring the bootloader
If you are using lvm, add the
device-mapper USE flag before emerging grub.
After emerging sys-boot/grub, edit the /etc/default/grub configuration file and add the following line (if using ext4 for root partition):
# Append parameters to the linux kernel command line GRUB_CMDLINE_LINUX="rootfstype=ext4 real_init=/usr/lib/systemd/systemd dolvm domdadm"
dolvm and domdadm are required only if you are using lvm and raid.
grub2-mkconfig -o /boot/grub/grub.cfg
Finalizing the installation
It may be necessary to enable and start dcpcd.service and to use systemd to define keyboard layout (see the systemd page).
X server installation
Don't forget to add the following lines to the /etc/portage/make.conf file:
Replace radeon according to the card brand
Then emerge the drivers:
emerge --ask x11-base/xorg-server
Follow the page X server to set the kernel parameters for evdev and the kernel parameters for your graphic card if not already done. Recompile the kernel
emerge --ask x11-terms/xterm x11-wm/twm
Then use the following command:
emerge --ask --depclean --verbose x11-terms/xterm x11-wm/twm
GNOME 3 installation
You are now ready to install GNOME 3:
emerge --ask gnome
In my case, to solve a conflict between two versions of openssl one using the bindist USE flag and the other using the -bindist use flag, I had to add the -bindist USE flag to Openssh in /etc/portage/package.use and re-emerge it with --newuse flag before installing GNOME.
In order to have the GNOME Display Manager after boot, enable it:
systemctl enable gdm.service
Reboot and enjoy GNOME 3!