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.ext2 /dev/sda1
# mkfs.ext3 /dev/sda2
# mkfs.ext3 /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 extract it
# wget http://dev.exherbo.org/stages/exherbo-amd64-current.tar.xz && 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 0
/dev/sda3 /home ext3 defaults 0 0
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, and mtab is correct
# cp /etc/resolv.conf etc/resolv.conf
# cat /proc/mounts > etc/mtab
Change your root
# chroot /mnt/exherbo /bin/bash
# eclectic env update
# source /etc/profile
# export PS1="(chroot) $PS1"
Update the install
Make sure Paludis is configured correctly – changing C/CXXFLAGS to -march=native might be a good idea
# cd /etc/paludis && vim bashrc && vim *conf
IMPORTANT: Update Paludis before syncing – since Paludis is very actively developed, it’s a good idea to update the client to take advantage of new features that might show up with a sync
# paludis -i paludis
Sync all the trees – now it is safe to sync
# paludis --sync
Update the configuration files
# eclectic config interactive
Make bootable
Download a kernel from The Linux Kernel Archives.
# links http://kernel.org/
Extract it to /usr/src and create the linux symlink
# tar xvjf linux-2.6.31.3.tar.bz2 -C /usr/src && ln -s /usr/src/linux-2.6.31.3 /usr/src/linux
Install the kernel
# cd /usr/src/linux && make menuconfig && make && make modules_install && cp arch/x86/boot/bzImage /boot/kernel
Install GRUB
# grub-install /dev/sda1
NOTE: The configuration of GRUB is wildly different between GRUB Legacy and GRUB 2. Consult /usr/share/doc/grub\*/ and the GRUB website for those changes.
If you are using GRUB Legacy (amd64), grub-install isn’t enough
# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
GRUB Legacy example configuration (amd64)
# cat<<EOF > /boot/grub/menu.lst
timeout 10
default 0
title Exherbo
root (hd0,0)
kernel /kernel root=/dev/sda2
EOF
GRUB 2 example configuration (x86)
# 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 any hardware stuff you might need, check the FAQ for “Masked by unavailable” errors
# paludis -i 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
Reboot
# reboot && sacrifice a goat && pray
Copyright 2008, 2009 Jonathan Dahan
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.