Open main menu

Funtoo β

Installing Gentoo Sources

Revision as of 04:56, April 14, 2019 by Drobbins (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
   Note

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.

root # emerge -a sys-kernel/gentoo-sources

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

root # cd /usr/src/linux
root # make menuconfig

Now edit the kernel to fit your needs.

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

root # mount /boot

Now build it.

root # make && make modules_install
root # make install

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

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

Installing a bootloader.

root # emerge -a boot-update

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

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

vmlinuz-4.0.0-gentoo

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

root # nano /etc/boot.conf

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

   /etc/boot.conf
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

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

New School (UEFI) Boot Entry

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

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