https://www.funtoo.org/api.php?action=feedcontributions&user=Lo0na&feedformat=atomFuntoo - User contributions [en]2024-03-28T09:21:35ZUser contributionsMediaWiki 1.36.2https://www.funtoo.org/index.php?title=Install/Network&diff=9474Install/Network2015-04-02T04:41:33Z<p>Lo0na: /* Using wpa_supplicant */ added forgotten step</p>
<hr />
<div><noinclude><br />
{{InstallPart|Network configuration}}<br />
</noinclude><br />
=== Configuring your network ===<br />
<br />
It's important to ensure that you will be able to connect to your local-area network after you reboot into Funtoo Linux. There are three approaches you can use for configuring your network: NetworkManager, dhcpcd, and the [[Funtoo Linux Networking]] scripts. Here's how to choose which one to use based on the type of network you want to set up.<br />
<br />
==== Wi-Fi ====<br />
===== Using NetworkManager =====<br />
For laptop/mobile systems where you will be using Wi-Fi and connecting to various networks, NetworkManager is strongly recommended. The Funtoo version of NetworkManager is fully functional even from the command-line, so you can use it even without X or without the Network Manager applet. Here are the steps involved in setting up NetworkManager:<br />
<br />
<console><br />
(chroot) # ##i##emerge linux-firmware<br />
(chroot) # ##i##emerge networkmanager<br />
(chroot) # ##i##rc-update add NetworkManager default<br />
</console><br />
<br />
Above, we installed linux-firmware which contains a complete collection of available firmware for many hardware devices including Wi-Fi adapters, plus NetworkManager to manage our network connection. Then we added NetworkManager to the <code>default</code> runlevel so it will start when Funtoo Linux boots.<br />
<br />
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:<br />
<br />
{{Note|The following command will not work as long as you are in chroot environment. The reason for this is that addwifi will need dbus and rfkill to be set up. So don't forget to reboot!}}<br />
<br />
<console><br />
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork<br />
</console><br />
<br />
The <code>addwifi</code> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <code>mywifinetwork</code> with the password <code>wifipassword</code>. This network configuration entry is stored in <code>/etc/NetworkManager/system-connections</code> so that it will be remembered in the future. You should only need to enter this command once for each Wi-Fi network you connect to.<br />
<br />
===== Using wpa_supplicant =====<br />
If for some reason you don't want to use a tool such as NetworkManager or <code>wicd</code>, you can use wpa_supplicant for wireless network connections.<br />
<br />
First, emerge wpa_supplicant:<br />
<br />
<console><br />
(chroot) ###i## emerge linux-firmware<br />
(chroot) ###i## emerge -a wpa_supplicant<br />
</console><br />
<br />
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant/wpa_supplicant.conf.<br />
The syntax is very easy:<br />
<pre><br />
network={<br />
ssid="MyWifiName"<br />
psk="lol42-wifi"<br />
}<br />
<br />
network={<br />
ssid="Other Network"<br />
psk="6d96270004515a0486bb7f76196a72b40c55a47f"<br />
}<br />
</pre><br />
<br />
You will need to add both <code>wpa_supplicant</code> and <code>dhcpcd</code> to the default runlevel. <code>wpa_supplicant</code> will connect to your access point, and <code>dhcpcd</code> will acquire an IP address via DHCP:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
(chroot) # ##i##rc-update add wpa_supplicant default<br />
</console><br />
<br />
==== Desktop (Wired Ethernet) ====<br />
<br />
For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add <code>dhcpcd</code> to the default runlevel:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
</console><br />
<br />
When you reboot, <code>dhcpcd</code> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.<br />
<br />
==== Server (Static IP) ====<br />
<br />
For servers, the [[Funtoo Linux Networking]] scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See [[Funtoo Linux Networking]] for information on how to use Funtoo Linux's template-based network configuration system.</div>Lo0nahttps://www.funtoo.org/index.php?title=Rootfs_over_encrypted_lvm&diff=9430Rootfs over encrypted lvm2015-03-27T05:26:41Z<p>Lo0na: /* better-initramfs */ typo</p>
<hr />
<div>This howto describes how to setup LVM and rootfs with cryptoLUKS-encrypted drive. It is not meant to be a standalone installation guide, rather, it is meant to be read alongside the [[Funtoo Linux Installation]] Guide. <br />
<br />
== Prepare the hard drive and partitions ==<br />
This is an example partition scheme, you may want to choose differently.<br />
<code>/dev/sda1</code> used as <code>/boot</code>. <code>/dev/sda2</code> will be encrypted drive with LVM.<br />
* <code>/dev/sda1</code> -- <code>/boot</code> partition.<br />
* <code>/dev/sda2</code> -- BIOS boot partition (not needed for MBR - only needed if you are using GPT) This step required for GRUB2. For more info, see: [http://www.funtoo.org/Funtoo_Linux_Installation#Prepare_Hard_Disk] for more information on GPT and MBR. <br />
* <code>/dev/sda3</code> -- <code>/</code> partition, will be the drive with LUKS and LVM.<br />
<br />
With UEFI:<br />
* <code>/dev/sda1</code> -- <tt>/boot</tt><br />
* <code>/dev/sda2</code> -- <tt>/</tt> partition<br />
<br />
=== Wipe the hard drive ===<br />
<console><br />
# ##i##gdisk /dev/sda<br />
<br />
Command: ##i##x ↵<br />
Expert command: ##i##z ↵<br />
About to wipe out GPT on /dev/sda. Proceed?: ##i##y ↵<br />
GPT data structures destroyed! You may now partition the disk using fdisk or other utilities.<br />
Blank out MBR?: ##i##y ↵<br />
</console><br />
{{Fancywarning|This action will destroy all data on the disk.}}<br />
<br />
== Encrypting the drive ==<br />
Read more about different cipher options here: [http://blog.wpkg.org/2009/04/23/cipher-benchmark-for-dm-crypt-luks/]<br />
<console><br />
# ##i##cryptsetup --cipher aes-xts-plain64 luksFormat /dev/sda3<br />
# ##i##cryptsetup luksOpen /dev/sda3 dmcrypt_root<br />
</console><br />
There you'll be prompted to enter your password phrase for encrypted drive, type your paranoid password there.<br />
{{Fancywarning|The default keymap at boot time is '''us'''. If you enter your passphrase using a different keymap, you won't be able to unlock your crypt volume if the passphrase contains any characters that are located elsewere on your keyboard layout that with the us layout.}}<br />
= Create logical volumes =<br />
<console><br />
# ##i##pvcreate /dev/mapper/dmcrypt_root<br />
# ##i##vgcreate vg /dev/mapper/dmcrypt_root<br />
# ##i##lvcreate -L10G --name root vg <br />
# ##i##lvcreate -L2G --name swap vg<br />
# ##i##lvcreate -L5G --name portage vg<br />
# ##i##lvcreate -l 100%FREE -nhome vg<br />
</console><br />
Feel free to specify your desired size by altering the numbers after the -L flag. For example, to make your portage dataset 20GB's, use the flag -L20G instead of -L5G.<br />
{{fancynote| Please, notice that above mentioned partitioning scheme is an example and not a default recommendation, change it accordingly to desired scheme.}}<br />
<br />
= Create a filesystem on volumes =<br />
<console><br />
# ##i##mkfs.ext2 /dev/sda1<br />
# ##i##mkswap /dev/mapper/vg-swap<br />
# ##i##mkfs.ext4 /dev/mapper/vg-root<br />
# ##i##mkfs.ext4 /dev/mapper/vg-portage<br />
# ##i##mkfs.ext4 /dev/mapper/vg-home<br />
</console><br />
<br />
= Basic system setup =<br />
<console><br />
# ##i##swapon /dev/mapper/vg-swap<br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/mapper/vg-root /mnt/funtoo<br />
# ##i##mkdir -p /mnt/funtoo/{boot,usr/portage,home}<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
# ##i##mount /dev/mapper/vg-portage /mnt/funtoo/usr/portage<br />
# ##i##mount /dev/mapper/vg-home /mnt/funtoo/home<br />
</console><br />
Now perform all the steps required for basic system install, please follow [http://docs.funtoo.org/wiki/Funtoo_Linux_Installation]<br />
don't forget to emerge the following before your install is finished:<br />
<br />
* '''cryptsetup'''<br />
* '''lvm2'''<br />
* '''a bootloader (grub recommended)'''<br />
* '''kernel sources '''<br />
<br />
= Editing the fstab =<br />
Fire up your favorite text editor to edit <code>/etc/fstab</code>. You want to put the following in the file:<br />
<br />
{{file|name=/etc/fstab|desc= |body=<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
/dev/sda1 /boot ext2 noauto,noatime 1 2<br />
/dev/mapper/vg-swap none swap sw 0 0<br />
/dev/mapper/vg-root / ext4 noatime,nodiratime,defaults 0 1<br />
/dev/sr0 /mnt/cdrom auto noauto,ro 0 0<br />
/dev/mapper/vg-portage /usr/portage ext4 noatime,nodiratime 0 0<br />
/dev/mapper/vg-home /home ext4 noatime,nodiratime 0 0<br />
}}<br />
<br />
== Kernel options ==<br />
{{fancynote| This part is particularly important: pay close attention. }}<br><br />
{{kernelop<br />
|title=<br />
|desc=<br />
General setup ---><br />
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Device Drivers ---><br />
Generic Driver Options ---> <br />
[*] Maintain a devtmpfs filesystem to mount at /dev<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Device Drivers ---><br />
[*] Multiple devices driver support ---><br />
<*>Device Mapper Support<br />
<*> Crypt target support<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Cryptographic API ---><br />
<*> XTS support<br />
-*-AES cipher algorithms<br />
}}<br />
<br />
= Initramfs setup and configuration =<br />
== Better-initramfs ==<br />
'''Build your initramfs with [https://bitbucket.org/piotrkarbowski/better-initramfs better-initramfs] project.'''<br />
<br />
{{fancynote| better-initramfs supports neither dynamic modules nor udev, so you should compile your kernel with built-in support for your block devices and file system support.}}<br />
<br />
<console><br />
# ##i##cd /opt<br />
# ##i##git clone git://github.com/slashbeast/better-initramfs.git<br />
# ##i##cd better-initramfs<br />
# ##i##less README.rst<br />
# ##i##bootstrap/bootstrap-all<br />
# ##i##make prepare<br />
# ##i##make image<br />
</console><br />
<br />
Copy resulting <code>initramfs.cpio.gz</code> to <code>/boot</code>:<br />
<console># ##i##cp output/initramfs.cpio.gz /boot</console><br />
<br />
Alternatively, a pre-compiled binary initramfs is available at https://bitbucket.org/piotrkarbowski/better-initramfs/downloads<br />
<console><br />
# ##i##wget https://bitbucket.org/piotrkarbowski/better-initramfs/downloads/release-x86_64-v0.7.2.tar.bz2<br />
# ##i##tar xf release-x86_64-v0.5.tar.bz2<br />
# ##i##cd release*<br />
# ##i##gzip initramfs.cpio<br />
# ##i##cp initramfs.cpio.gz /boot<br />
</console><br />
<br />
Remember, better-initramfs project is a work in progress, so you need to update from time to time. It can be done easily with <code>git</code>. Go to the better-initramfs source dir and follow:<br />
<console><br />
# ##i##cd /opt/better-initramfs<br />
# ##i##git pull<br />
# ##i##less ChangeLog<br />
</console><br />
{{fancynote| Please read the ChangeLog carefuly and perform necessary updates to <code>/etc/boot.conf</code>. Also, please backup the working <code>/boot/initramfs.cpio.gz</code> and <code>/etc/boot.conf</code> before updating better-initramfs.}}<br />
Alternatively and much faster is to install better-initramfs-bin package, recently added to Funtoo's portage tree:<br />
<console><br />
# ##i##emerge better-initramfs-bin<br />
</console><br />
<br />
== Genkernel ==<br />
Funtoo's genkernel capable to create initramfs for encrypted drive. Compile and install kernel and initramfs of your favorite kernel sources:<br />
<console><br />
# ##i##genkernel --kernel-config=/path/to/your/custom-kernel-config --no-mrproper --makeopts=-j5 --install --lvm --luks all </console><br />
<br />
== Bootloader Configuration ==<br />
=== Grub2 configuration ===<br />
==== better-initramfs ====<br />
An example <code>/etc/boot.conf</code> for better-initramfs:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux"<br />
timeout 3<br />
}<br />
"Funtoo Linux" {<br />
kernel vmlinuz[-v]<br />
initrd /initramfs.cpio.gz<br />
params += enc_root=/dev/sda3 lvm luks root=/dev/mapper/vg-root rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet<br />
}<br />
</pre><br />
<br />
Now, run <code>boot-update</code> to write the configuration files to <code>/boot/grub/grub.cfg</code><br />
<br />
==== genkernel ====<br />
Configure the bootloader as described above, with correct kernel and initramfs images names. An example for genkernel and grub2. You will be editing <code>/etc/boot.conf</code>:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux"<br />
timeout 3<br />
}<br />
"Funtoo Linux" {<br />
kernel kernel-genkernel-x86_64-3.13.0<br />
initrd initramfs-genkernel-x86_64-3.13.0<br />
params += crypt_root=/dev/sda3 dolvm real_root=/dev/mapper/vg-root rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet<br />
}<br />
</pre><br />
<br />
=== Lilo configuration ===<br />
For oldschool geeks, an example for lilo bootloader. Emerge lilo with device-mapper support<br />
<console><br />
# ##i##echo 'sys-boot/lilo device-mapper' >> /etc/portage/package.use/lilo<br />
# ##i##emerge lilo<br />
</console><br />
<br />
Example <code>/etc/lilo.conf</code> for genkernel:<br />
<br />
<pre><br />
append="init=/linuxrc dolvm crypt_root=/dev/sda2 real_root=/dev/mapper/vg-root"<br />
boot=/dev/sda<br />
compact<br />
default=funtoo<br />
lba32<br />
prompt<br />
read-only<br />
timeout=50<br />
image=/boot/kernel-genkernel-x86_64-3.13.0<br />
initrd=/boot/initramfs-genkernel-x86_64-3.13.0<br />
label=funtoo<br />
</pre><br />
<br />
=== Syslinux bootloader setup ===<br />
Syslinux is another advanced bootloader which you can find on all live CD's. Syslinux bootloader does not require additional BIOS boot partition. /dev/sda2 is the root partition.<br />
<console><br />
# ##i##emerge syslinux<br />
# ##i##mkdir /boot/extlinux<br />
# ##i##extlinux --install /boot/extlinux<br />
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda<br />
- or -<br />
# ##i##sgdisk /dev/sda --attributes=1:set:2<br />
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda, for GPT partition<br />
</console><br />
<br />
Example <code>/boot/extlinux/extlinux.conf</code> for better-initramfs:<br />
<br />
<pre><br />
LABEL kernel1_bzImage-3.2.1<br />
MENU LABEL Funtoo Linux bzImage-3.2.1<br />
LINUX /bzImage-3.2.1<br />
INITRD /initramfs.cpio.gz<br />
APPEND rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root<br />
</pre><br />
<br />
== Final steps ==<br />
Umount everything, close encrypted drive and reboot<br />
<console><br />
# ##i##umount -l -v /mnt/funtoo/{dev, proc, home, usr/portage, boot} <br />
# ##i##vgchange -a n<br />
# ##i##cryptsetup luksClose /dev/sda2 dmcrypt_root<br />
</console><br />
After reboot you will get the following:<br />
<console><br />
>>> better-initramfs started. Kernel version 2.6.35-gentoo-r10<br />
>>> Create all the symlinks to /bin/busybox.<br />
>>> Initiating /dev/dir<br />
>>> Getting LVM volumes up (if any)<br />
Reding all physical volumes. This make take awhile...<br />
No volume group found<br />
No volume group found<br />
>>> Opening encrypted partition and mapping to /dev/mapper/dmcrypt_root<br />
Enter passphrase fore /dev/sda2:<br />
</console><br />
Type your password<br />
<br />
<console><br />
>>> Again, getting LVM volumes up (if any, after map dmcrypt).<br />
Reading all physical volumes. This may take a while...<br />
Found volume group "vg" using metadata type lvm2<br />
4 logical volume(s) in volume group "vg" now active<br />
>>> Mounting rootfs to /newroot<br />
>>> Umounting /sys and /proc.<br />
>>> Switching root to /newroot and executing /sbin/init.<br />
INIT: version 2.88 booting<br />
Loading /libexec/rc/console/keymap<br />
OpenRC 0.6.1 is starting up Funtoo Linux (x86_64)<br />
...boot messages omitted for clarity<br />
<br />
orion login: oleg<br />
Password:<br />
Last login: Thu Oct 14 20:49:21 EEST 2010 on tty1<br />
oleg@orion ~ %<br />
</console><br />
<br />
== Additional links and information ==<br />
* [[gentoo-wiki:Root filesystem over LVM2, DM-Crypt and RAID|Root filesystem over LVM2, DM-Crypt, and RAID]]<br />
* [http://wiki.archlinux.org/index.php/System_Encryption_with_LUKS_for_dm-crypt System Encryption with LUKS for dm-crypt]<br />
* [http://en.wikipedia.org/wiki/Logical_volume_management Wikipedia article on LVM]<br />
* [https://wiki.archlinux.org/index.php/Dm-crypt_with_LUKS Arch Wiki article]<br />
<br />
[[Category:HOWTO]]</div>Lo0nahttps://www.funtoo.org/index.php?title=Rootfs_over_encrypted_lvm&diff=9429Rootfs over encrypted lvm2015-03-27T05:25:50Z<p>Lo0na: /* genkernel */ typo</p>
<hr />
<div>This howto describes how to setup LVM and rootfs with cryptoLUKS-encrypted drive. It is not meant to be a standalone installation guide, rather, it is meant to be read alongside the [[Funtoo Linux Installation]] Guide. <br />
<br />
== Prepare the hard drive and partitions ==<br />
This is an example partition scheme, you may want to choose differently.<br />
<code>/dev/sda1</code> used as <code>/boot</code>. <code>/dev/sda2</code> will be encrypted drive with LVM.<br />
* <code>/dev/sda1</code> -- <code>/boot</code> partition.<br />
* <code>/dev/sda2</code> -- BIOS boot partition (not needed for MBR - only needed if you are using GPT) This step required for GRUB2. For more info, see: [http://www.funtoo.org/Funtoo_Linux_Installation#Prepare_Hard_Disk] for more information on GPT and MBR. <br />
* <code>/dev/sda3</code> -- <code>/</code> partition, will be the drive with LUKS and LVM.<br />
<br />
With UEFI:<br />
* <code>/dev/sda1</code> -- <tt>/boot</tt><br />
* <code>/dev/sda2</code> -- <tt>/</tt> partition<br />
<br />
=== Wipe the hard drive ===<br />
<console><br />
# ##i##gdisk /dev/sda<br />
<br />
Command: ##i##x ↵<br />
Expert command: ##i##z ↵<br />
About to wipe out GPT on /dev/sda. Proceed?: ##i##y ↵<br />
GPT data structures destroyed! You may now partition the disk using fdisk or other utilities.<br />
Blank out MBR?: ##i##y ↵<br />
</console><br />
{{Fancywarning|This action will destroy all data on the disk.}}<br />
<br />
== Encrypting the drive ==<br />
Read more about different cipher options here: [http://blog.wpkg.org/2009/04/23/cipher-benchmark-for-dm-crypt-luks/]<br />
<console><br />
# ##i##cryptsetup --cipher aes-xts-plain64 luksFormat /dev/sda3<br />
# ##i##cryptsetup luksOpen /dev/sda3 dmcrypt_root<br />
</console><br />
There you'll be prompted to enter your password phrase for encrypted drive, type your paranoid password there.<br />
{{Fancywarning|The default keymap at boot time is '''us'''. If you enter your passphrase using a different keymap, you won't be able to unlock your crypt volume if the passphrase contains any characters that are located elsewere on your keyboard layout that with the us layout.}}<br />
= Create logical volumes =<br />
<console><br />
# ##i##pvcreate /dev/mapper/dmcrypt_root<br />
# ##i##vgcreate vg /dev/mapper/dmcrypt_root<br />
# ##i##lvcreate -L10G --name root vg <br />
# ##i##lvcreate -L2G --name swap vg<br />
# ##i##lvcreate -L5G --name portage vg<br />
# ##i##lvcreate -l 100%FREE -nhome vg<br />
</console><br />
Feel free to specify your desired size by altering the numbers after the -L flag. For example, to make your portage dataset 20GB's, use the flag -L20G instead of -L5G.<br />
{{fancynote| Please, notice that above mentioned partitioning scheme is an example and not a default recommendation, change it accordingly to desired scheme.}}<br />
<br />
= Create a filesystem on volumes =<br />
<console><br />
# ##i##mkfs.ext2 /dev/sda1<br />
# ##i##mkswap /dev/mapper/vg-swap<br />
# ##i##mkfs.ext4 /dev/mapper/vg-root<br />
# ##i##mkfs.ext4 /dev/mapper/vg-portage<br />
# ##i##mkfs.ext4 /dev/mapper/vg-home<br />
</console><br />
<br />
= Basic system setup =<br />
<console><br />
# ##i##swapon /dev/mapper/vg-swap<br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/mapper/vg-root /mnt/funtoo<br />
# ##i##mkdir -p /mnt/funtoo/{boot,usr/portage,home}<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
# ##i##mount /dev/mapper/vg-portage /mnt/funtoo/usr/portage<br />
# ##i##mount /dev/mapper/vg-home /mnt/funtoo/home<br />
</console><br />
Now perform all the steps required for basic system install, please follow [http://docs.funtoo.org/wiki/Funtoo_Linux_Installation]<br />
don't forget to emerge the following before your install is finished:<br />
<br />
* '''cryptsetup'''<br />
* '''lvm2'''<br />
* '''a bootloader (grub recommended)'''<br />
* '''kernel sources '''<br />
<br />
= Editing the fstab =<br />
Fire up your favorite text editor to edit <code>/etc/fstab</code>. You want to put the following in the file:<br />
<br />
{{file|name=/etc/fstab|desc= |body=<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
/dev/sda1 /boot ext2 noauto,noatime 1 2<br />
/dev/mapper/vg-swap none swap sw 0 0<br />
/dev/mapper/vg-root / ext4 noatime,nodiratime,defaults 0 1<br />
/dev/sr0 /mnt/cdrom auto noauto,ro 0 0<br />
/dev/mapper/vg-portage /usr/portage ext4 noatime,nodiratime 0 0<br />
/dev/mapper/vg-home /home ext4 noatime,nodiratime 0 0<br />
}}<br />
<br />
== Kernel options ==<br />
{{fancynote| This part is particularly important: pay close attention. }}<br><br />
{{kernelop<br />
|title=<br />
|desc=<br />
General setup ---><br />
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Device Drivers ---><br />
Generic Driver Options ---> <br />
[*] Maintain a devtmpfs filesystem to mount at /dev<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Device Drivers ---><br />
[*] Multiple devices driver support ---><br />
<*>Device Mapper Support<br />
<*> Crypt target support<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Cryptographic API ---><br />
<*> XTS support<br />
-*-AES cipher algorithms<br />
}}<br />
<br />
= Initramfs setup and configuration =<br />
== Better-initramfs ==<br />
'''Build your initramfs with [https://bitbucket.org/piotrkarbowski/better-initramfs better-initramfs] project.'''<br />
<br />
{{fancynote| better-initramfs supports neither dynamic modules nor udev, so you should compile your kernel with built-in support for your block devices and file system support.}}<br />
<br />
<console><br />
# ##i##cd /opt<br />
# ##i##git clone git://github.com/slashbeast/better-initramfs.git<br />
# ##i##cd better-initramfs<br />
# ##i##less README.rst<br />
# ##i##bootstrap/bootstrap-all<br />
# ##i##make prepare<br />
# ##i##make image<br />
</console><br />
<br />
Copy resulting <code>initramfs.cpio.gz</code> to <code>/boot</code>:<br />
<console># ##i##cp output/initramfs.cpio.gz /boot</console><br />
<br />
Alternatively, a pre-compiled binary initramfs is available at https://bitbucket.org/piotrkarbowski/better-initramfs/downloads<br />
<console><br />
# ##i##wget https://bitbucket.org/piotrkarbowski/better-initramfs/downloads/release-x86_64-v0.7.2.tar.bz2<br />
# ##i##tar xf release-x86_64-v0.5.tar.bz2<br />
# ##i##cd release*<br />
# ##i##gzip initramfs.cpio<br />
# ##i##cp initramfs.cpio.gz /boot<br />
</console><br />
<br />
Remember, better-initramfs project is a work in progress, so you need to update from time to time. It can be done easily with <code>git</code>. Go to the better-initramfs source dir and follow:<br />
<console><br />
# ##i##cd /opt/better-initramfs<br />
# ##i##git pull<br />
# ##i##less ChangeLog<br />
</console><br />
{{fancynote| Please read the ChangeLog carefuly and perform necessary updates to <code>/etc/boot.conf</code>. Also, please backup the working <code>/boot/initramfs.cpio.gz</code> and <code>/etc/boot.conf</code> before updating better-initramfs.}}<br />
Alternatively and much faster is to install better-initramfs-bin package, recently added to Funtoo's portage tree:<br />
<console><br />
# ##i##emerge better-initramfs-bin<br />
</console><br />
<br />
== Genkernel ==<br />
Funtoo's genkernel capable to create initramfs for encrypted drive. Compile and install kernel and initramfs of your favorite kernel sources:<br />
<console><br />
# ##i##genkernel --kernel-config=/path/to/your/custom-kernel-config --no-mrproper --makeopts=-j5 --install --lvm --luks all </console><br />
<br />
== Bootloader Configuration ==<br />
=== Grub2 configuration ===<br />
==== better-initramfs ====<br />
An example <code>/etc/boot.conf</code> for better-initramfs:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux"<br />
timeout 3<br />
}<br />
"Funtoo Linux" {<br />
kernel vmlinuz[-v]<br />
initrd /initramfs.cpio.gz<br />
params += enc_root=/dev/sda3 lvm luks root=/dev/mapper/vg-root rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet<br />
</pre><br />
<br />
Now, run <code>boot-update</code> to write the configuration files to <code>/boot/grub/grub.cfg</code><br />
<br />
==== genkernel ====<br />
Configure the bootloader as described above, with correct kernel and initramfs images names. An example for genkernel and grub2. You will be editing <code>/etc/boot.conf</code>:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux"<br />
timeout 3<br />
}<br />
"Funtoo Linux" {<br />
kernel kernel-genkernel-x86_64-3.13.0<br />
initrd initramfs-genkernel-x86_64-3.13.0<br />
params += crypt_root=/dev/sda3 dolvm real_root=/dev/mapper/vg-root rootfstype=ext4 resume=swap:/dev/mapper/vg-swap quiet<br />
}<br />
</pre><br />
<br />
=== Lilo configuration ===<br />
For oldschool geeks, an example for lilo bootloader. Emerge lilo with device-mapper support<br />
<console><br />
# ##i##echo 'sys-boot/lilo device-mapper' >> /etc/portage/package.use/lilo<br />
# ##i##emerge lilo<br />
</console><br />
<br />
Example <code>/etc/lilo.conf</code> for genkernel:<br />
<br />
<pre><br />
append="init=/linuxrc dolvm crypt_root=/dev/sda2 real_root=/dev/mapper/vg-root"<br />
boot=/dev/sda<br />
compact<br />
default=funtoo<br />
lba32<br />
prompt<br />
read-only<br />
timeout=50<br />
image=/boot/kernel-genkernel-x86_64-3.13.0<br />
initrd=/boot/initramfs-genkernel-x86_64-3.13.0<br />
label=funtoo<br />
</pre><br />
<br />
=== Syslinux bootloader setup ===<br />
Syslinux is another advanced bootloader which you can find on all live CD's. Syslinux bootloader does not require additional BIOS boot partition. /dev/sda2 is the root partition.<br />
<console><br />
# ##i##emerge syslinux<br />
# ##i##mkdir /boot/extlinux<br />
# ##i##extlinux --install /boot/extlinux<br />
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda<br />
- or -<br />
# ##i##sgdisk /dev/sda --attributes=1:set:2<br />
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda, for GPT partition<br />
</console><br />
<br />
Example <code>/boot/extlinux/extlinux.conf</code> for better-initramfs:<br />
<br />
<pre><br />
LABEL kernel1_bzImage-3.2.1<br />
MENU LABEL Funtoo Linux bzImage-3.2.1<br />
LINUX /bzImage-3.2.1<br />
INITRD /initramfs.cpio.gz<br />
APPEND rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root<br />
</pre><br />
<br />
== Final steps ==<br />
Umount everything, close encrypted drive and reboot<br />
<console><br />
# ##i##umount -l -v /mnt/funtoo/{dev, proc, home, usr/portage, boot} <br />
# ##i##vgchange -a n<br />
# ##i##cryptsetup luksClose /dev/sda2 dmcrypt_root<br />
</console><br />
After reboot you will get the following:<br />
<console><br />
>>> better-initramfs started. Kernel version 2.6.35-gentoo-r10<br />
>>> Create all the symlinks to /bin/busybox.<br />
>>> Initiating /dev/dir<br />
>>> Getting LVM volumes up (if any)<br />
Reding all physical volumes. This make take awhile...<br />
No volume group found<br />
No volume group found<br />
>>> Opening encrypted partition and mapping to /dev/mapper/dmcrypt_root<br />
Enter passphrase fore /dev/sda2:<br />
</console><br />
Type your password<br />
<br />
<console><br />
>>> Again, getting LVM volumes up (if any, after map dmcrypt).<br />
Reading all physical volumes. This may take a while...<br />
Found volume group "vg" using metadata type lvm2<br />
4 logical volume(s) in volume group "vg" now active<br />
>>> Mounting rootfs to /newroot<br />
>>> Umounting /sys and /proc.<br />
>>> Switching root to /newroot and executing /sbin/init.<br />
INIT: version 2.88 booting<br />
Loading /libexec/rc/console/keymap<br />
OpenRC 0.6.1 is starting up Funtoo Linux (x86_64)<br />
...boot messages omitted for clarity<br />
<br />
orion login: oleg<br />
Password:<br />
Last login: Thu Oct 14 20:49:21 EEST 2010 on tty1<br />
oleg@orion ~ %<br />
</console><br />
<br />
== Additional links and information ==<br />
* [[gentoo-wiki:Root filesystem over LVM2, DM-Crypt and RAID|Root filesystem over LVM2, DM-Crypt, and RAID]]<br />
* [http://wiki.archlinux.org/index.php/System_Encryption_with_LUKS_for_dm-crypt System Encryption with LUKS for dm-crypt]<br />
* [http://en.wikipedia.org/wiki/Logical_volume_management Wikipedia article on LVM]<br />
* [https://wiki.archlinux.org/index.php/Dm-crypt_with_LUKS Arch Wiki article]<br />
<br />
[[Category:HOWTO]]</div>Lo0nahttps://www.funtoo.org/index.php?title=Install/BootLoader&diff=9423Install/BootLoader2015-03-27T01:40:51Z<p>Lo0na: /* New School (UEFI) Boot Entry */ typo</p>
<hr />
<div><noinclude><br />
{{InstallPart|boot loader configuration}}<br />
</noinclude><br />
=== Installing a Bootloader ===<br />
<br />
These install instructions show you how to use GRUB to boot using BIOS (old-school) or UEFI (new-school). As of boot-update-1.7.2, now in Portage, the steps are very similar.<br />
<br />
First, emerge <code>boot-update</code>. This will also cause <code>grub-2</code> and {{c|efibootmgr}} to be merged, since they are dependencies:<br />
<br />
<console><br />
(chroot) # ##i##emerge boot-update<br />
</console><br />
<br />
Then, edit <code>/etc/boot.conf</code> using {{c|nano}} and specify "<code>Funtoo Linux genkernel</code>" as the <code>default</code> setting at the top of the file, replacing <code>"Funtoo Linux"</code>. <br />
<br />
<code>/etc/boot.conf</code> should now look like this:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel" <br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
kernel kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
} <br />
<br />
"Funtoo Linux better-initramfs" {<br />
kernel vmlinuz[-v]<br />
initrd /initramfs.cpio.gz<br />
}<br />
</pre><br />
<br />
If you are booting a custom or non-default kernel, please read <code>man boot.conf</code> for information on the various options available to you.<br />
<br />
==== Old School (BIOS) MBR ====<br />
<br />
When using "old school" BIOS booting, run the following command to install GRUB to your MBR, and generate the {{c|/boot/grub/grub.cfg}} configuration file that GRUB will use for booting:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --target=i386-pc --no-floppy /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
==== New School (UEFI) Boot Entry ====<br />
<br />
If you're using "new school" UEFI booting, run of the following sets of commands, depending on whether you are installing a 64-bit or 32-bit system. This will add GRUB as a UEFI boot entry.<br />
<br />
For x86-64bit systems:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
For x86-32bit systems:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --target=i386-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
==== First Boot, and in the future... ====<br />
<br />
OK -- you are ready to boot! <br />
<br />
You only need to run <code>grub-install</code> when you first install Funtoo Linux, but you need to re-run <code>boot-update</code> every time you modify your <code>/etc/boot.conf</code> file or add new kernels to your system. This will regenerate {{c|/boot/grub/grub.cfg}} so that you will have new kernels available in your GRUB boot menu, the next time you reboot.</div>Lo0nahttps://www.funtoo.org/index.php?title=Funtoo_Linux_Kernels&diff=9385Funtoo Linux Kernels2015-03-24T05:14:55Z<p>Lo0na: linkfix</p>
<hr />
<div>This Section will give you an overview of kernels used in funtoo.<br />
Some points of interest:<br />
<br />
* Most Funtoo Linux kernels support the handy <code>[[#Binary USE|binary]]</code> USE flag, described below.<br />
* Funtoo Linux offers quality kernels from other Linux Distributions, like <code>debian-sources</code>.<br />
* A detailed [[#Kernel Features and Stability Overview|Kernel Features and Stability]] table can be found below.<br />
* Advanced users may want to take a look at [[Additional Kernel Resources]].<br />
* There is a quick'n dirty howto to compile your own [[kernel]] with initramfs the funtoo way.<br />
<br />
== Overview of Kernels ==<br />
<br />
=== {{Package|sys-kernel/vanilla-sources}} ===<br />
<br />
This will install the "vanilla" (unmodified) Linux kernel sources. Current recommended version is 3.x. Funtoo Linux fully supports Linux 3.x. The advantages of this kernel include recent improvements to [[Linux Containers]], a very modern networking stack with lots of bug fixes, and high reliability for desktops and servers. The downside is that this kernel must be manually configured by the user and does not have built-in ''<code>genkernel</code>'' support via the ''<code>binary</code>'' USE flag at this time.<br />
<br />
=== {{Package|sys-kernel/gentoo-sources}} ===<br />
<br />
This kernel tree is based on stable kernels from [https://www.kernel.org/ kernel.org] with genpatches applied [http://dev.gentoo.org/~mpagano/genpatches/about.htm genpatches].<br />
Gentoo patchset aims to support the entire range of Gentoo-supported architectures. List of available genpatched kernels: [http://dev.gentoo.org/~mpagano/genpatches/kernels.htm genpatches-kernels]<br />
<br />
=== {{Package|sys-kernel/openvz-rhel6-stable}} ===<br />
<br />
This is a RHEL6-based kernel with OpenVZ support. This kernel is now the preferred kernel for production OpenVZ deployments. It requires gcc-4.4.5 to build, which it will use automatically without the user needing to use ''<code>gcc-config</code>''. We use this version of gcc since this is the version of gcc used by Red Hat to build this kernel.<br />
<br />
=== {{Package|sys-kernel/debian-sources}} ===<br />
<br />
This is the Debian kernel. '''These ebuilds now support the ''<code>binary</code>'' USE flag.''' Daniel has added a special <tt>config-extract</tt> command which can be used to list all available official Debian kernel configurations, and generate them from the Debian files included with the kernel. This kernel has optional [[OpenVZ]] support, but it is much better to use <tt>openvz-rhel6-stable</tt> if you want a production-quality OpenVZ installation. For more information about how to use <tt>debian-sources</tt> and <tt>config-extract</tt>, see [[#Using Debian-Sources with Genkernel|Using debian-sources with Genkernel]] below.<br />
<br />
== Binary USE ==<br />
<br />
Many of the kernel ebuilds in Funtoo Linux support the very useful <code>binary</code> USE flag. By enabling this USE flag and emerging the kernel, the ebuild will automatically build a binary kernel image, initramfs and kernel modules and install them to <code>/boot</code>. The binary kernel image and initramfs can be used to boot your Funtoo Linux system without requiring any additional configuration. This is a great way to get a Funtoo Linux system up and running quickly. Here's how to do it:<br />
<br />
<console><br />
###i## echo "sys-kernel/openvz-rhel6-stable binary" >> /etc/portage/package.use<br />
###i## emerge openvz-rhel6-stable<br />
###i## nano -w /etc/boot.conf<br />
###i## boot-update<br />
</console><br />
<br />
More information can be found in the [[Funtoo Linux Installation]] Guide.<br />
<br />
== Funtoo Linux Genkernel ==<br />
<br />
Funtoo Linux contains a forked/enhanced version of genkernel with the following new capabilities:<br />
<br />
* genkernel can use a build directory that is separate from the kernel source directory. This is enabled using the new <tt>--build-dst</tt> option.<br />
* <code>--build-src</code> is a new option that is equivalent to the <tt>--kerneldir</tt> option.<br />
* <code>--fullname</code> can be used to specify the entire name of the kernel and initramfs images -- everything after <tt>kernel-</tt> and <tt>initramfs-</tt>.<br />
* <code>--firmware-src</code> - a new option that works identically to <tt>--firmware-dir</tt>.<br />
* <code>--firmware-dst</code> - a new capability - you can now define where genkernel installs firmware.<br />
* Genkernel uses Funtoo Linux <code>lvm2</code> rather than building its own.<br />
* Some compile fixes.<br />
<br />
== Kernel Features and Stability Overview ==<br />
<br />
{{Fancywarning|'''SPARC64''': All kernels beyond 3.9 series and before 3.14-rc8 are subject to a [http://www.spinics.net/lists/sparclinux/msg11805.html bug] that stalls the kernel on sun4v machines '''only'''. Those latter are machines provided with UltraSPARC T1 and later CPUs (e.g. SunFire T1000, SunFire T2000, SunFire T52x0/T54x0 series...), all sun4u machines (UltraSPARC IV and prior CPUs) are not subject to this problem and any kernel version is functional. }}<br />
<br />
{| {{table}} <br />
!Kernel Name<br />
!Version<br />
!USE flags<br />
!Stability<br />
!Extra Features<br />
!Req'd udev<br />
!Notes<br />
|-<br />
|<tt>{{Package|sys-kernel/vanilla-sources}}</tt><br />
|3.17.0<br />
|N/A<br />
|'''Excellent''' - recommended for desktops and servers.<br />
|N/A<br />
|Any<br />
|Recommended for modern networking stack, hardware and [[Linux Containers]] support. This kernel must be manually configured by the user. New Features: [http://kernelnewbies.org/Linux_3.12 kernelnewbies.org/linux_3.12] New Drivers: [http://kernelnewbies.org/Linux_3.12-DriversArch kernelnewbies/Linux_3.12-DriversArch]<br />
|-<br />
|<tt>{{Package|sys-kernel/gentoo-sources}}</tt><br />
|3.17.0<br />
|N/A<br />
|'''Excellent''' - recommended for desktops and workstations<br />
|N/A<br />
|Any<br />
|Recommended for modern networking stack, hardware and [[Linux Containers]] support. This kernel must be manually configured by the user. New Features: [http://kernelnewbies.org/Linux_3.12 kernelnewbies.org/linux_3.12] New Drivers: [http://kernelnewbies.org/Linux_3.12-DriversArch kernelnewbies/Linux_3.12-DriversArch]<br />
|-<br />
|<tt>{{Package|sys-kernel/openvz-rhel6-stable}}</tt><br />
|2.6.32.042.092.2<br />
|<tt>binary</tt><br />
|'''Excellent''' - recommended for production servers<br />
|N/A<br />
|Any<br />
|This kernel is built with gcc-4.4.5. <tt>emerge broadcom-netxtreme2</tt> for reliable BCM5709+ support (integrated NIC)<br />
<br />
|-<br />
|<tt>{{Package|sys-kernel/debian-sources}}</tt><br />
|3.16.2<br />
|<tt>openvz</tt><br />
|''Good'' - default kernel recommended by Funtoo<br />
|OpenVZ (optional)<br />
|Any<br />
|See [[#Using debian-sources with Genkernel]], below.<br />
|-<br />
|}<br />
<br />
== Using Debian-Sources with Genkernel ==<br />
<br />
{{fancyimportant|Debian-sources is now fully compatible with the ''binary'' USE flag and recommended for desktop users. The below example is valid for manual installation. At least 12G of ''/var/tmp'' required to build }}<br />
<br />
This section describes how to build a binary kernel with ''<code>debian-sources</code>'' and ''<code>genkernel</code>'', and it also explains how to use Funtoo Linux's ''<code>config-extract</code>'' tool to list and create official Debian kernel configurations.<br />
<br />
=== First step: emerging the required packages ===<br />
<br />
The first step is to emerge:<br />
<br />
# The Debian sources<br />
# Genkernel itself<br />
<br />
This is achieved by running the following:<br />
<br />
<console><br />
###i## emerge -av sys-kernel/debian-sources sys-kernel/genkernel<br />
</console><br />
<br />
Once the Debian kernel sources are deployed, you should find a directory named '''linux-debian-''version''''' (e.g. linux-debian-2.6.32.30) under '''<code>/usr/src</code>'''. Update your the '''<code>linux</code>''' symlink to point on this directory:<br />
<console><br />
###i## cd /usr/src<br />
###i## rm linux<br />
###i## ln -s linux-debian-2.6.32.30 linux<br />
</console><br />
<br />
Alternatively, emerge the debian-sources with the ''<code>symlink</code>'' USE flag.<br />
<br />
=== Second step: Grabbing a configuration file ===<br />
<br />
If is now time to download the kernel configuration file. For this tutorial we will use a configuration file for AMD64 (several others architectures like MIPS or SPARC64 are available.) To view a complete list of available kernel configurations, type <code>./config-extract -l</code> '''in the Debian kernel source directory''':<br />
<br />
<pre><br />
ninja1 linux-debian-2.6.32.30 # ./config-extract -l<br />
<br />
====== standard featureset ======<br />
<br />
alpha: alpha-generic, alpha-legacy, alpha-smp<br />
amd64<br />
armel: iop32x, ixp4xx, kirkwood, orion5x, versatile<br />
hppa: parisc, parisc-smp, parisc64, parisc64-smp<br />
i386: 486, 686, 686-bigmem, amd64<br />
ia64: itanium, mckinley<br />
m68k: amiga, atari, bvme6000, mac, mvme147, mvme16x<br />
mips: 4kc-malta, 5kc-malta, r4k-ip22, r5k-ip32, sb1-bcm91250a, sb1a-bcm91480b<br />
mipsel: 4kc-malta, 5kc-malta, r5k-cobalt, sb1-bcm91250a, sb1a-bcm91480b<br />
powerpc: powerpc, powerpc-smp, powerpc64<br />
s390: s390x, s390x-tape<br />
sh4: sh7751r, sh7785lcr<br />
sparc: sparc64, sparc64-smp<br />
sparc64: sparc64, sparc64-smp<br />
<br />
====== vserver featureset ======<br />
<br />
amd64<br />
i386: 686, 686-bigmem<br />
ia64: itanium, mckinley<br />
powerpc: powerpc, powerpc64<br />
s390<br />
sparc<br />
sparc64<br />
<br />
====== xen featureset ======<br />
<br />
amd64<br />
i386<br />
<br />
====== openvz featureset ======<br />
<br />
amd64<br />
i386<br />
</pre><br />
<br />
Type <tt>config-extract -h</tt> for extended usage information:<br />
<br />
<pre><br />
ninja1 linux-debian-2.6.32.30 # ./config-extract -h<br />
This work is free software.<br />
<br />
Copyright 2011 Funtoo Technologies. You can redistribute and/or modify it under<br />
the terms of the GNU General Public License version 3 as published by the Free<br />
Software Foundation. Alternatively you may (at your option) use any other<br />
license that has been publicly approved for use with this program by Funtoo<br />
Technologies (or its successors, if any.)<br />
<br />
usage: config-extract [options] arch [featureset] [subarch]<br />
<br />
-h --help print this usage and exit<br />
-l --list list all available kernel configurations<br />
-o --outfile specify kernel config outfile --<br />
defaults to .config in current directory<br />
[featureset] defaults to "none" if not specified<br />
[subarch] defaults to the only one available; otherwise required<br />
<br />
This program was written by Daniel Robbins for Funtoo Linux, for the purpose of<br />
easily and conveniently extracting Debian kernel configurations. To see a nice<br />
list of all available kernel configurations, use the --list option.<br />
<br />
Debian's kernel configs are specified internally in arch_featureset_flavor<br />
format, such as: "amd64_openvz_amd64". The featureset typically describes an<br />
optional kernel configuration such as "xen" or "openvz", while the flavor in<br />
Debian terminology typically refers to the sub-architecture of the CPU.<br />
<br />
When using this command, you must specify an arch. A featureset of "none" is<br />
assumed unless you specify one, and by default this program will pick the only<br />
available subarch if there is only one to choose from. If not, you will need to<br />
pick one (and the program will remind you to do this.)<br />
<br />
The kernel configuration will be written to ".config" in the current directory,<br />
or the location you specified using the -o/--outfile option.<br />
</pre><br />
<br />
Let's use <tt>config-extract</tt> to create a kernel configuration for an amd64 system:<br />
<br />
<console><br />
# ##i##cd linux<br />
# ##i##./config-extract amd64<br />
Wrote amd64_none_amd64 kernel configuration to /usr/src/linux-debian-2.6.32.30/.config.<br />
</console><br />
<br />
<tt>config-extract</tt> also allows you to extract special Debian featuresets, such as settings for Xen and [[OpenVZ]] kernels:<br />
<br />
<console><br />
# ##i##./config-extract amd64 openvz<br />
Wrote amd64_openvz_amd64 kernel configuration to /usr/src/linux-debian-2.6.32.30/.config.<br />
</console><br />
<br />
'''It is necessary to name the kernel configuration file something other than ".config" to avoid errors with genkernel.'''<br />
<br />
<br />
After using <tt>config-extract</tt>, run <tt>make oldconfig</tt> and accept all default options by hitting Enter at all prompts.<br />
<br />
<br />
{{fancynote|if you are using the XFS file system as your root partition: Run <tt>make menuconfig</tt> and ensure that "File Systems --> XFS filesystem support" and "Library Routines --> CRC32c (Castagnoli, et al) Cyclic Redundancy-Check" are both set to * (and not [m]).}}<br />
This is needed to ensure that your system can boot up correctly for kernel versions >= 3.10.11.<br />
<br />
=== Third step: Building and installing the kernel ===<br />
<br />
This is simply achieved by:<br />
<br />
<console><br />
# ##i##genkernel --kernel-config=config-2.6.32-5-amd64 all<br />
</console><br />
<br />
* --kernel-config: use the given configfile. If you only give a filename here, it is searched for in your current working dir. You can also use a relative or an absolute path leading to your configfile here (for example: "--kernel-config=/usr/src/linux/configfile").<br />
* all: rebuild the kernel image and the initramfs ramdisk image (aside of kernel modules, the ramdisk image contains tools such as BusyBox and some generic startup scripts, depending on options you use on the command line several additional tools like lvm or raid volume management can be incorporated as well).<br />
<br />
{{ fancyimportant|Unless explicitly stated via ''--no-clean'' or ''--no-mrproper'', Genkernel will do a '''make mrproper''' in the kernel source tree, thus cleaning a previous build '''and removing the previous kernel configuration file''' in it. <br />
}}<br />
<br />
If you use Genkernel to rebuild a Linux kernel on SPARC64, remember to either:<br />
* Set '''sparc64-unknown-linux-gnu-''' in ''General setup --> Cross-compiler tool prefix'' <br />
* Put '''--kernel-cross-compile=sparc64-unknown-linux-gnu-''' on the Genkernel command line<br />
<br />
Once the kernel has been compiled and the ram disk has been generated, the kernel image plus its companion files (initramfs image and System.map) are placed in the /boot directory. You can use your favourite tool to update your bootloader configuration files.<br />
<br />
[[Category:Internals]]<br />
[[Category:Funtoo features]]<br />
[[Category:Kernel]]<br />
[[Category:Official Documentation]]</div>Lo0nahttps://www.funtoo.org/index.php?title=User:Lo0na&diff=8782User:Lo0na2015-01-27T04:03:07Z<p>Lo0na: Added Jabber Info</p>
<hr />
<div>{{Person<br />
|Geoloc=48.1852, 11.38947<br />
|Blogs=<br />
}}<br />
XMPP/Jabber: loona@fu411.com</div>Lo0nahttps://www.funtoo.org/index.php?title=User:Lo0na&diff=8781User:Lo0na2015-01-27T04:00:17Z<p>Lo0na: Location and (GR)Avatar added</p>
<hr />
<div>{{Person<br />
|Geoloc=48.18519999999999, 11.38946999999996<br />
|Blogs=<br />
}}</div>Lo0nahttps://www.funtoo.org/index.php?title=User_talk:Drobbins&diff=1803User talk:Drobbins2012-01-09T18:56:05Z<p>Lo0na: /* Wiki broken :-( */ translations</p>
<hr />
<div>=== Wiki broken :-( ===<br />
Hello Daniel!<br />
<br />
I am sorry if this is not the correct way to contact you and to make you aware of this issue. Please don't be angry at me, if this should be the case.<br />
<br />
I want to make you aware that something with your MediaWiki installation is seriously wrong. I encountered this bug many times now. At first I thought that I had somehow made an user error, but now I am sure that the problem lies in the software.<br />
<br />
The problem is this:<br />
<br />
Sometimes when I make a small edit to a section of a page, the wiki software throws away everything else in that page, but the section I edited. Only the spam filter mechanism prevents the deletion of nearly all of the pages' contents.<br />
<br />
To illustrate this, I have made archives of the preview page of one of my edits and the answer of the wiki software to my trying to commit it, in MAFF format ( https addons.mozilla.org/en-US/firefox/addon/mozilla-archive-format/ ). As MediaWiki didn't let me upload these, you can get them at:<br />
<br />
http www.wonkology.org/download/Spamschutzfilter%20%E2%80%93%20Funtoo%20Linux.maff<br />
http www.wonkology.org/download/Bearbeiten%20von%20Installation%20%E2%80%93%20FuntooLinux.maff<br />
<br />
Apart from me not being able to edit certain parts of the wiki, this bug also poses a grave danger to all of the contents of the wiki.<br />
<br />
<br />
On a personal note, as a longtime Gentoo user, I was very sad to witness the bad blood and the splitup between you and "the Gentoo community" back then, and I am oh so happy to see that you didn't become so embittered about that, as to cease pursuing your goal of making the best GNU/Linux system for hackers ever. :) I only found out about Funtoo Linux a few weeks ago, and am very keen to start using it soon (installing it at the moment). Keep up the good spirits and the good work! :)<br />
<br />
<br />
Kind regards,<br />
--[[User:Lo0na|Lo0na]] ([[User talk:Lo0na|t]]) 15:56, 9 January 2012 (UTC)<br />
<br />
:I didn't do anything special to circumvent the SPAM filter. Wouldn't have dared. The strage thing is, though, that I didn't add or modify ''any'' links.<br />
:I see what you mean about the apparent strange "deletions" only occuring in the SPAM-protection view, but it's strange that the filter was triggered in the first place even though ''I'' didn't add or modify any links. Probably it checks ''all'' the links in the edited section, even those that I didn't add, and balks if it encounters any that ''I'' am not allowed to add, but that were added by someone else with higher privileges?<br />
:--[[User:Lo0na|Lo0na]] ([[User talk:Lo0na|t]]) 18:31, 9 January 2012 (UTC)<br />
<br />
::OK, now I understand what you mean. I think that I was able to make some changes, because the changes that I was allowed to make were when I edited sections that included no offending links. I usually don't edit the whole page, but just subsections.<br />
::--[[User:Lo0na|Lo0na]] ([[User talk:Lo0na|t]]) 18:34, 9 January 2012 (UTC)<br />
<br />
:::I will try switching to the English locale. I will also translate the SPAM-filter message into German, if you provide me with the English text. I can also translate it into Esperanto, if that is wanted.<br />
:::But now I have to join my family for supper, and then I will go to my local hackerspace, where I will have other duties to attend to. I will probably sleep through the whole of tomorrow, but after that I'd be happy to be of assistance. :-)<br />
:::--[[User:Lo0na|Lo0na]] ([[User talk:Lo0na|t]]) 18:56, 9 January 2012 (UTC)</div>Lo0na