Installing Gentoo Sources

From Funtoo
Revision as of 04:56, April 14, 2019 by Drobbins (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This should probably be moved to a Package:Gentoo Sources page.

This is a guide for installing and getting a functional gentoo-sources kernel.

Emerge the gentoo-sources kernel.

# emerge -a sys-kernel/gentoo-sources

Then change to the kernel directory and enter the kernel config menu.

# cd /usr/src/linux
# make menuconfig

Now edit the kernel to fit your needs.

Before building the kernel, ensure that /boot is mounted.

# mount /boot

Now build it.

# make && make modules_install
# make install

You need to install a initramfs. We will use genkernel for this.

# emerge -a sys-kernel/genkernel
# genkernel --install initramfs

Installing a bootloader.

# emerge -a boot-update

If you do ls in the boot directory you will probably see a file like this.

# mount /dev/sda1 /boot
# ls /boot


This means that you have to edit the boot.conf a bit. Change bzImage to vmlinuz.

# nano /etc/boot.conf

Your boot.conf should look like this after edit (vmlinuz is the important part).

boot {
	generate grub
	default "Funtoo Linux 
	timeout 3 

"Funtoo Linux" {
	kernel vmlinuz[-v]

"Funtoo Linux genkernel" {
	kernel kernel[-v]
	initrd initramfs[-v]
	params += real_root=auto 

"Funtoo Linux better-initramfs" {
	kernel vmlinuz[-v]
	initrd /initramfs.cpio.gz

Old School (BIOS) MBR

# grub-install --target=i386-pc --no-floppy /dev/sda
# boot-update

New School (UEFI) Boot Entry

# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda
# boot-update

Make sure that boot-update completes without warnings, then proceed with the rest of the installation from the funtoo install guide.