Installing Gentoo Sources

From Funtoo
Revision as of 17:05, April 19, 2015 by Aryvandaar (talk | contribs) (Created page with "This is a guide for installing and getting a functional gentoo-sources kernel. Add kernel sets. {{console|body= ###i## mkdir /etc/portage/sets ###i## echo sys-kernel/gentoo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Add kernel sets.

root # mkdir /etc/portage/sets
root # echo sys-kernel/gentoo-sources > /etc/portage/sets/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. Afterwards, 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.