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.
- 1 Base system installation
- 1.1 Part 1 to 5 of the handbook
- 1.2 Installing the Gentoo base system
- 1.3 Configuring the kernel
- 1.4 Configuring the system
- 1.5 Installing necessary system tools
- 1.6 Configuring the bootloader
- 1.7 Finalizing the installation
- 2 X server installation
- 3 GNOME 3 installation
Base system installation
Hereafter are the modifications to bring to the Gentoo Handbook for an amd64 platform.
Part 1 to 5 of the 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/13.0  default/linux/amd64/13.0/selinux  default/linux/amd64/13.0/desktop  default/linux/amd64/13.0/desktop/gnome  default/linux/amd64/13.0/desktop/gnome/systemd  default/linux/amd64/13.0/desktop/kde  default/linux/amd64/13.0/desktop/kde/systemd  default/linux/amd64/13.0/developer  default/linux/amd64/13.0/no-multilib  default/linux/amd64/13.0/x32  hardened/linux/amd64  hardened/linux/amd64/selinux  hardened/linux/amd64/no-multilib  hardened/linux/amd64/no-multilib/selinux  hardened/linux/amd64/x32  hardened/linux/uclibc/amd64
Select the profile ending in gnome/systemd:
eselect profile set default/linux/amd64/13.0/desktop/gnome/systemd
On the amd64 platform there is also a profile ending in systemd. Select this option if a desktop environment is not required for the system (servers, etc).
An asterisk indicates the currently selected profile. Verify the correct profile has been selected:
eselect profile list
Available profile symlink targets:  default/linux/amd64/13.0  default/linux/amd64/13.0/selinux  default/linux/amd64/13.0/desktop  default/linux/amd64/13.0/desktop/gnome  default/linux/amd64/13.0/desktop/gnome/systemd *  default/linux/amd64/13.0/desktop/kde  default/linux/amd64/13.0/desktop/kde/systemd  default/linux/amd64/13.0/developer  default/linux/amd64/13.0/no-multilib  default/linux/amd64/13.0/x32  hardened/linux/amd64  hardened/linux/amd64/selinux  hardened/linux/amd64/no-multilib  hardened/linux/amd64/no-multilib/selinux  hardened/linux/amd64/x32  hardened/linux/uclibc/amd64
Updating the system
The choice of the desktop/gnome/systemd profile implies a lot of changes in the packages to be installed, it is advised to perform a full system update before going on:
emerge --ask --update --deep --newuse @world
Configuring the kernel
emerge --ask sys-kernel/genkernel-next
If your are using raid for your partitions, don't forget to add the
dmraidUSE flag while emerging sys-kernel/genkernel-next.
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 kernel will not compile.
emerge --ask sys-kernel/linux-firmware
May not be necessary at this stage but does not hurt to add the VIDEO_CARDS variable set with an appropriate video card value to /etc/portage/make.conf.
Use option menuconfig with genkernel and optionally lvm and mdadm when using lvm and RAID. Do not forget to install sys-fs/lvm2 and sys-fs/mdadm if this is the case. Please see LVM#Software for details about lvm.
emerge --ask sys-fs/lvm2
genkernel [--lvm] [--mdadm] --menuconfig all
Select the systemd init system without disabling Openrc
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.
Create the symlink for /etc/mtab (see this for details)
ln -sf /proc/self/mounts /etc/mtab
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 !