HOWTO: Recommendations for gentoo chroot installation
How gentoo should work? You know how, only you, it’s your system. But sometimes people can forget about it. Want more?
First of all, what do you want it to use for? You know, you can use uclibc instead of glibc. It’s a great C lib, works pretty stable, and it’s pretty less bloated. You’ll have pretty good performance, size of your binaries also would be pretty pretty. BUT!, this lib is made only for amd64. You’ll not be able to use multilib (it’s critical for proprietary software using, especially proprietary games. Sad but true, even now many games are made for x86 only), but if you don’t need to support them – try it.
Second, it’s really a sick topic for talking about it – I mean ethernal “systemd vs. other-init-systems” holy war. Wont talk about first one much. Let’s imagine that you have chosen default openrc, it works fine and does it’s job without any useless services or unexpected behavior.
We’re using chroot method, it means we have working linux- or BSD-based host OS, downloaded current stage3 and portage tree.
So, at first you need several partitions: / – depends (5-50G) in ext4, swap (if you want to use suspend or hibernation – at least whole RAM amount plus 0.5G or 1G, if you don’t need it you’ll be fine with 1G swap), /home – the rest of HDD, preferably ext4.
After partitioning you’ll need to mount file system, unpack stage3 and portage, then chroot in:
$ export GENTOO=/mnt/gentoo
# mount /dev/sdb1 $GENTOO
# mount -o rbind /dev $GENTOO/dev
# mount -t proc none $GENTOO/proc
# chroot $GENTOO /bin/bash
# emerge paludis
That’s our first and, maybe, the last one. Paludis is source-based package manager, which greatly works on gentoo and written on C++. Works really faster, so it worth it. More info about migration and configuration can be found at paludis.exherbo.org
# cave resolve eix
After it, let’s get rid of some systemd-related packages:
# cave uninstall udev
# cave install eudev
Now it’s time for setting up needed services, such as cron, network config etc. All those instructions are available in current revision of gentoo handbook.