Exherbo doesn’t recommend particular filesystems or installation procedures but the following is a simple example of how to install Exherbo. You can customise the process any way you like from changing the choice of filesystems to more advanced installations including LVM2 or preparing for diskless installations.
Read the documentation
Boot a live system
Download SystemRescueCD (it has both 32 and 64 bit support)
# links http://www.sysresccd.org/Download
Burn it to a CD or use UNetbootin to put it on a USB stick
Reboot, choose the right kernel, and get your network up
# net-setup wlan0
Prepare the hard disk
Create a boot partition (~16MB), a root partition (>=4GB), and a home partition
# cfdisk /dev/sda
Format the filesystems for each partition
# mkfs.ext4 /dev/sda1
# mkfs.ext4 /dev/sda2
# mkfs.ext4 /dev/sda3
Mount root and cd into it
# mkdir /mnt/exherbo && mount /dev/sda2 /mnt/exherbo && cd /mnt/exherbo
Get the latest archive of Exherbo from Stages and verify the consistence of the file
# wget http://dev.exherbo.org/stages/exherbo-amd64-current.tar.xz
# wget http://dev.exherbo.org/stages/sha1sum
# grep exherbo-amd64-current.tar.xz sha1sum | sha1sum -c
Extract the stage
# unxz -c exherbo*xz | tar xpf -
Update fstab
# cat <<EOF > /mnt/exherbo/etc/fstab
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/sda1 /boot ext2 defaults 1 2
/dev/sda2 / ext3 defaults 0 1
/dev/sda3 /home ext3 defaults 0 2
EOF
Chroot into the system
Mount everything for the chroot
# mount -o rbind /dev /mnt/exherbo/dev/
IMPORTANT: Take a closer look that you really use the “rbind” option to bind mount /dev, otherwise paludis will not work properly.
# mount -o bind /sys /mnt/exherbo/sys/
# mount -t proc none /mnt/exherbo/proc/
# mount /dev/sda1 boot/
# mount /dev/sda3 home/
Make sure the network can resolve DNS
# cp /etc/resolv.conf etc/resolv.conf
Change your root
# env -i TERM=$TERM SHELL=/bin/bash HOME=$HOME $(which chroot) /mnt/exherbo /bin/bash
# source /etc/profile
# export PS1="(chroot) $PS1"
Update the install
Make sure Paludis is configured correctly
# cd /etc/paludis && vim bashrc && vim *conf
Sync all the trees – now it is safe to sync
# cave sync
Make bootable
Download and extract the latest stable kernel from The Linux Kernel Archives.
Install the kernel
# cd path-to-kernel && make menuconfig
# make && make modules_install && cp arch/x86/boot/bzImage /boot/kernel
Install GRUB
# grub-install /dev/sda
GRUB 2 example configuration
# cat<<EOF > /boot/grub/grub.cfg
set timeout=10
set default=0
menuentry "Exherbo" {
set root=(hd0,1)
linux /kernel root=/dev/sda2
}
EOF
Install an init system
There’s no init system in our stages. This allows you to choose whatever init system (or none) you’d like to use:
Here’s a HowTo for installing systemd on Exherbo.
Be sure to set either the “systemd” or the “baselayout” option (preferrably globally, for example by adding “*/* systemd” to /etc/paludis/options.conf) before you proceed with installing packages so that you get the init scripts/services you want.
You may want to re-install the packages included in the stage which have either flag:
# cave resolve world -cx
This will pick up the changes and re-install affected packages.
# cave resolve -x sys-apps/systemd
Configure your hostname for your chosen init system.
Make sure your hostname is mapped to localhost in /etc/hosts, otherwise some packages test suites will fail because of network sandboxing.
# cat<<EOF > /etc/hosts
127.0.0.1 my-hostname.domain.foo my-hostname localhost
::1 localhost
EOF
Install any hardware stuff you might need, check the FAQ for “Masked by unavailable” errors
# cave resolve -x iwlwifi-4965-ucode
Set root password
# passwd
Install any locales you might need
# localedef -i en_US -f ISO-8859-1 en_US
# localedef -i en_US -f UTF-8 en_US.UTF-8
And change the LANG environment variable if you prefer a different system wide locale than the default en_GB.UTF-8
# echo LANG="en_US.UTF-8" > /etc/env.d/99locale
Set system timezone, eg. to Copenhagen in Danmark, Europe
# ln -s /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime
Reboot
# reboot && sacrifice a goat && pray
Post-installation Tasks
Remove the stage tarball
The stage tarball is no longer needed and can be safely removed.
Clean up packages
The installation images (stages) contain additional tools which are useful for the installation process but are not part of the system nor world sets.
You can identify the additional packages using cave purge:
# cave purge
If you wish to remove them, you can simply execute the resolution:
# cave purge -x
Alternatively, you can add packages you wish to retain to the world set by using the update-world command. As an example, the following adds gptfdisk to the world set.
# cave update-world sys-apps/gptfdisk
Add a new user for daily use.
Some useful groups with a brief description:
- Administrative Groups:
+ adm used for system monitoring tasks (e.g. journalctl)
+ users traditional group for identifying user accounts (versus system/daemon accounts)
+ wheel used to indicate permission to perform certain restricted operations (e.g. su)
- Device Access Groups:
+ disk allows access to various disk device nodes
+ usb allows access to usb device nodes
+ video allows access to video device nodes (for accelerated video)
# useradd -m -G adm,disk,wheel,cdrom,video,usb,users ${username}
Copyright 2008, 2009, 2010 Jonathan Dahan Copyright 2012 Saleem Abdulrasool
This work is licensed under the Creative Commons Attribution Share Alike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/; or, (b) send a letter to Creative Commons, 171 2nd Street, Suite 300, San Francisco, California, 94105, USA.