0% found this document useful (0 votes)
486 views16 pages

Funtoo Linux Installation - Funtoo Linux

This document provides instructions for installing Funtoo Linux. It recommends using GPT partitioning with gdisk to create partitions including a 100MB /boot partition, 32MB GRUB boot loader partition, 4GB swap partition, and the rest of the disk as the root partition. Key steps include booting a LiveCD, partitioning, creating filesystems, installing Funtoo, configuring the system, installing a kernel and bootloader, and rebooting.

Uploaded by

drhollywood2001
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
486 views16 pages

Funtoo Linux Installation - Funtoo Linux

This document provides instructions for installing Funtoo Linux. It recommends using GPT partitioning with gdisk to create partitions including a 100MB /boot partition, 32MB GRUB boot loader partition, 4GB swap partition, and the rest of the disk as the root partition. Key steps include booting a LiveCD, partitioning, creating filesystems, installing Funtoo, configuring the system, installing a kernel and bootloader, and rebooting.

Uploaded by

drhollywood2001
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 16

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Funtoo Linux Installation


From Funtoo Linux

Contents
1 Introduction 1.1 Additional Resources 2 Installation Overview 2.1 LiveCD 2.2 Prepare Hard Disk 2.2.1 Partitions 2.2.1.1 GPT Partitions 2.2.1.2 MBR Partitions 2.2.2 Partitioning Using gdisk 2.2.2.1 Notes Before We Begin 2.2.2.2 Using gdisk 2.2.2.3 For new gdisk users 2.2.2.4 For Previous fdisk users 2.2.2.5 Partitioning Recommendations 2.2.3 Creating filesystems 2.2.4 Mounting filesystems 2.3 Installing the Stage 3 tarball 2.3.1 Stage 3 tarball 2.4 Chroot into Funtoo 2.5 Downloading the Portage tree 2.6 Configuring your system 2.6.1 /etc/fstab 2.6.2 /etc/localtime 2.6.3 /etc/make.conf 2.6.4 /etc/rc.conf 2.6.5 /etc/conf.d/hwclock 2.6.6 /etc/env.d/99editor 2.6.7 Localization 2.7 Configuring your network 2.8 Configuring and installing the Linux kernel 2.9 Installing GRUB 2.9.1 Running grub-install and boot-update 2.10 Finishing Steps 2.10.1 Set your root password 2.10.2 Create a user account 2.10.3 Verify boot time services 2.11 Restart your System 2.11.1 Troubleshooting a failed install 2.11.1.1 boot failure 2.11.1.2 Graphics Corruption at Boot

Introduction

1 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

This document will explain all required installation steps and efficiently guide you through a typical Funtoo Linux installation on a PC-compatible computer systems. If you've had previous experience installing Gentoo Linux then a lot of steps will be familiar but you should still read through as there are a couple of differences.

Additional Resources
This document is written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta Installation Tutorial instead. It explores more installation possibilities and options, such as encrypted filesystems, and includes screenshots. An experimental Funtoo Linux exists for SPARC platforms. See Funtoo Linux Installation on SPARC for notable differences regarding SPARC support.

Installation Overview
Here is a basic overview of the Funtoo installation process: 1. Download and boot the LiveCD of your choice. 2. Prepare your disk. (Funtoo Linux supports GPT/GUID partitions, recommended for Funtoo Linux installs) 3. Create and mount filesystems. 4. Install the Funtoo stage tarball of your choice. 5. Chroot into your new system. 6. Download the Portage tree. 7. Configure your system and network. 8. Install a kernel. 9. Install a bootloader. 10. Complete final steps. 11. Reboot and enjoy.

LiveCD
Funtoo doesn't provide an "official" Funtoo LiveCD, but there are plenty of good ones out there to choose from. A great choice is the Gentoo-based SystemRescueCD (http://www.sysresccd.org /Main_Page) as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems. Please note that the Gentoo LiveCD lacks gdisk, and is no longer supported. To begin Funtoo Linux installation, download and burn SystemRescueCD (http://www.sysresccd.org /Main_Page) . Insert it into your CD drive, and boot from it. At the boot menu, be sure to boot the rescue64 kernel if you are installing a 64-bit system. By default, SystemRescueCD boots in 32-bit mode.

Prepare Hard Disk


Partitions Funtoo Linux fully supports traditional MBR partitions, as well as newer GPT/GUID partition formats. Funtoo Linux recommends the use of the GPT partitioning scheme, since it is newer and more flexible. Here are the various trade-offs between each partitioning scheme:
GPT Partitions

2 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Newer, preferred format for Linux systems Supports 2TB+ hard drives for booting Supports hundreds of partitions per disk of any size Requires extra GRUB boot loader partition to be created (~32MB) GRUB 1.9x required to boot if system disk
MBR Partitions

Legacy, DOS and Windows XP-compatible partition scheme Only 4 primary partitions per disk; after that, you must use "logical" partitions Does not support 2TB+ disks for booting More compatible with certain problem systems (such as HP ProBook 4520) Multiple boot loader options: GRUB 1.9x, grub-legacy, lilo, etc.

If you plan to use partitions of 2TB or greater, you must partition using the GPT/GUID format.

Partitioning Using gdisk


Notes Before We Begin

These install instructions assume you are installing Funtoo Linux to an empty hard disk using GUID partition tables (GPT). If you are installing Funtoo Linux on a machine where another OS is installed, or there is an existing Linux distribution on your system that you want to keep, then you will need to adapt these instructions to suit your needs. If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the fdisk command instead of gdisk, and you will not need to create the GRUB boot loader partition. See the table under Partitioning Recommendations, in particular the MBR Block Device (fdisk) and MBR Code columns. fdisk works just like gdisk, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables. Advanced users may be interested in the following topics: GUID Booting Guide Rootfs over encrypted lvm Rootfs over encrypted lvm over raid-1 on GPT
Using gdisk

OK, the first step after booting SystemRescueCD is to use gdisk to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically /dev/sda, the first disk in the system:
# gdisk /dev/sda

You should find gdisk very familiar to fdisk. Here is the partition table we want to end up with:
Command (? for help): p

3 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Disk /dev/sda: 234441648 sectors, 111.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 234441614 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number 1 2 3 4 Start (sector) 2048 206848 272384 8660992 End (sector) 206847 272383 8660991 234441614 Size 100.0 MiB 32.0 MiB 4.0 GiB 107.7 GiB Code 8300 EF02 8200 8300 Name Linux filesystem BIOS boot partition Linux swap Linux filesystem

Command (? for help):

Above, you'll see that we have a 100 MiB boot partition, a 32 MiB "BIOS boot partition" (also known as the GRUB boot loader partition,) 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.
For new gdisk users

These partitions were created using "n" command from within gdisk. The gdisk commands to create the partition table above are as follows. Adapt sizes as necessary, although these defaults will work for most users. The partition codes entered below can be found in the Partitioning Recommendations table below, in the GPT Code column. Within gdisk, follow these steps: Create Partition 1 (boot): Command: n Partition Number: 1 First sector: Last sector: +100M Hex Code: Create Partition 2 (GRUB): Command: n Partition Number: 2 First sector: Last sector: +32M Hex Code: EF02 Create Partition 3 (swap): Command: n Partition Number: 3 First sector: Last sector: +4G Type: 8200 Create Partition 4 (root): Command: n Partition Number: 4 First sector: Last sector: (for rest of disk) Hex Code:

4 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Along the way, you can type "p" and hit Enter to view your current partition table. If you make a mistake, you can type "d" to delete an existing partition that you created. When you are satisfied with your partition setup, type "w" to write your configuration to disk: Write Partition Table To Disk: Command: w Do you want to proceed? (Y/N): Y The partition table will now be written to disk and gdisk will exit. Now, your GPT/GUID partitions have been created, and will show up as the following block devices under Linux: /dev/sda1, /dev/sda2, /dev/sda3, /dev/sda4, which which which which will will will will will be used to hold the /boot filesystem, be used by the new GRUB directly, be used for swap, and hold our root filesystem.

For Previous fdisk users

If you have installed Gentoo Linux before, the one thing that is likely new to you here is the GRUB boot loader partition, which is listed as "BIOS boot partition." within gdisk. This partition is required for GRUB-1.9x to boot GPT/GUID boot disks. What is it? In GRUB-speak, this partition is essentially the location of the meat of GRUB's boot loading code. If you've used GRUB-0.9x in the past, this partition is where the new GRUB stores the equivalent of the stage1_5 and stage2 files in legacy GRUB. Since GPT-based partition tables have less dead space at the beginning of the disk than their MBR equivalents, and explicit partition of code EF02 is required to hold the guts of the boot loader. In all other respects, the partition table is similar to that you might create for an MBR-based disk during a Gentoo Linux installation. We have a boot and root partition with code 0700, and a Linux swap partition with code 8200.
Partitioning Recommendations

Here are our partitioning recommendations in table form, below. For GPT-based partitions, use the GPT Block Device and GPT Code columns with gdisk. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with fdisk:

Partition /boot GRUB boot loader partition 100 MB

Size

MBR Block Device (fdisk) /dev/sda1

GPT Block Device (gdisk) /dev/sda1

Filesystem ext2 For GPT/GUID only, skip for MBR - no filesystem

MBR GPT Code Code 83 8300

32MB

not required for MBR

/dev/sda2

N/A

EF02

swap

2x RAM for low-memory systems and production servers; otherwise 2GB

/dev/sda2

/dev/sda3

swap (default)

82

8200

5 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

/ (root) /home (optional) LVM (optional)

rest of disk, minimum of 10GB User storage and media. Typically most of the disk. If you want to create an LVM volume.

/dev/sda3 /dev/sda4 (if created) /dev/sda4 (PV, if created)

/dev/sda4 /dev/sda5 (if created) /dev/sda5 (PV, if created)

ext4

83

8300

ext4

83

8300

LVM PV

8E

8E00

For binary kernels more space in /boot partition required to store initramfs and system.map, recommended size is 150-200Mb.

Creating filesystems Before we can use the partitions we just created, the block devices need to be initialized with filesystem metadata. This process is known as creating a filesystem on the block devices. After we create filesystems on the block devices, they can be mounted and used to store files. For our swap partition, we will not create a filesystem on it, but we will initialize the partition using the mkswap command so that it can be used as disk-based virtual memory. Then we'll run the swapon command to make our newly-initialized swap active within the LiveCD environment, in case it is needed during the rest of the install process. Also that we do not create a filesystem on the GRUB boot loader partition - GRUB writes binary data to that partition directly when we install the boot loader, which we'll do later. You can see the commands you will need to type below. Like the rest of this documentation, it assumes you are using a GPT partitioning scheme. If you are using MBR, your root filesystem will likely be created on /dev/sda3 instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:
# # # # mke2fs mke2fs mkswap swapon -t ext2 /dev/sda1 -t ext4 /dev/sda4 /dev/sda3 /dev/sda3

Mounting filesystems Mount the newly-created filesystems as follows, creating /mnt/funtoo as the installation mount point:
# # # # mkdir mount mkdir mount /mnt/funtoo /dev/sda4 /mnt/funtoo /mnt/funtoo/boot /dev/sda1 /mnt/funtoo/boot

And optionally, if you have a separate filesystem for /home or anything else:

6 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

# mkdir /mnt/funtoo/home # mount /dev/sda5 /mnt/funtoo/home

If you have /tmp or /var/tmp on a separate filesystem, be sure to change the permissions of the mount-point to be globally-writeable after mounting, as follows:
# chmod 1777 /mnt/funtoo/tmp

Installing the Stage 3 tarball


Stage 3 tarball After creating filesystems, the next step is downloading the initial Stage3 tarball. Stage3 is a pre-compiled system used as a starting point to install Funtoo Linux. Please note that stage3 is a recommended tarball for Funtoo Linux installation. Stage1 tarballs are provided by mirrors for use with Metro automated builds, but are not recommended for installs. Now is a good time to verify the date and time are correctly set to UTC. Use the date command to verify the date and time:
# date Fri Jul 15 19:47:18 UTC 2011

If the date and/or time need to be corrected, do so using date MMDDhhmmYYYY, keeping in mind hhmm are in 24 hr format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:
# date 071620002011 Fri Jul 16 20:00:00 UTC 2011

Once you are in your Funtoo Linux root filesystem, download the appropriate tarball for your system to the /mnt/funtoo directory, using the link from the Download page. One popular way to do this is to use the wget command:
# cd /mnt/funtoo # wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-current.tar.xz

Note that 64-bit systems can run 32-bit or 64-bit stages, but 32-bit systems can only run 32-bit stages. Also make sure that you pick a stage3 build that is appropriate for your CPU. If you are not sure, it is a safe bet to choose the generic_64 or generic_32 stage. Consult the Download page for more information. Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:
# tar xpf <name_of_stage_3>.tar.xz

7 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

It is very important to use tar's "p" option when extracting the stage3 tarball - it tells tar to preserve any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will not be correct.

Chroot into Funtoo


Before chrooting into your new system, there's a couple of things that need done first. You will need to mount /proc and /dev inside your new system. Use the following commands:
# cd /mnt/funtoo # mount --bind /proc ./proc # mount --bind /dev ./dev

You'll also want to copy over resolv.conf in order to have proper DNS name resolution from inside the chroot:
# cp /etc/resolv.conf ./etc

Now you can chroot into your new system. Use env before chroot to ensure that no environment variables from the installation media are used by your new system:
# env -i HOME=/root TERM=$TERM /bin/bash # exec chroot /mnt/funtoo /bin/bash

If you receive the error "chroot: failed to run command `/bin/bash': Exec format error", ensure that you are using a liveCD that is the same architecture as the system you are trying to build. eg; You need to be running a 64-bit liveCD to build a 64-bit system. SystemRescueCD allows you to choose to boot into a 32-bit system or 64-bit system via its boot menu.

Now that your inside you new system, you'll need to update your environment. Use the following commands:
# env-update # source /etc/profile

It's also a good idea to change the default command prompt while inside the chroot. This will avoid confusion if you have to change terminals. Use this command:
# export PS1="(chroot) $PS1"

Congratulations! You are now chrooted inside a Funtoo Linux system. Now it's time to get Funtoo Linux

8 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

properly configured so that Funtoo Linux will boot successfully when your system is restarted.

Downloading the Portage tree


Now, it is time install a Portage repository, which contains package scripts (ebuilds) that tell portage how to build and install thousands of different software packages. To create the Portage repository, simply run emerge --sync from within the chroot. This will automatically clone the portage tree from GitHub (http://github.com) :
(chroot) # emerge --sync

For an alternative way to do this, see Installing Portage From Snapshot.

Funtoo currently supports a modified version of the 2008.0 profile only. Running eselect profile list will show all available profiles.
# eselect profile list Available profile symlink targets: [1] default/linux/amd64/2008.0 * [2] default/linux/amd64/2008.0/desktop [3] default/linux/amd64/2008.0/developer [4] default/linux/amd64/2008.0/server

Choose a profile and set, using, for example the desktop profile

# eselect profile set 2

Configuring your system


Like any other Linux distribution, Funtoo Linux has its share of configuration files. The one file you are required to edit in order to ensure that Funtoo Linux boots successfully is /etc/fstab. The others are optional. Here are a list of files that you should consider editing:

File

Do I Need to Change It? YES - required

Description Mount points for all filesystems to be used at boot time. This file must reflect your disk partition setup. We'll guide you through modifying this file below. Your timezone, which will default to UTC if not set. This should be a symbolic link to something located under /usr/share/zoneinfo (e.g. /usr/share/zoneinfo/America /Montreal) Parameters used by gcc (compiler), portage, make. It's a good idea to set MAKEOPTS. This is covered later in this document.

/etc/fstab

/etc/localtime

Maybe -recommended Maybe recommended

/etc/make.conf

9 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

/etc/rc.conf /etc/conf.d /keymaps

optional optional

OpenRC configuration file. Keyboard mapping configuration file (for console pseudoterminals). Set if you have a non-US keyboard. See Funtoo Linux Localization. How the time of the battery-backed hardware clock of the system is interpreted (UTC or local time). Linux uses the battery-backed hardware clock to initialize the system clock when the system is booted. Default system editor to use - will default to nano if unset. Kernel modules to load automatically at system startup. Typically not required. See Additional Kernel Resources for more info.

/etc/conf.d /hwclock /etc/env.d /99editor /etc/conf.d /modules

optional

optional

optional

If you're installing an English version of Funtoo Linux, you're in luck as most of the configuration files can be used as-is. If your installing for another locale, don't worry, we will walk you through the necessary configuration steps on the Funtoo Linux Localization page, and if needed, there's always plenty of friendly, helpful support. (See Community) Let us go ahead and see what we have to do. Use nano -w <name_of_file> to edit files -- the "-w" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.

It's important to edit your /etc/fstab file before you reboot! You will need to modify both the "fs" and "type" columns to match the settings for your partitions and filesystems that you created with gdisk or fdisk. Skipping this step may prevent Funtoo Linux from booting successfully.

/etc/fstab /etc/fstab is used by the mount command which is run when your system boots. Statements of this file inform mount about partitions to be mounted and how they are mounted. Here is an example of /etc/fstab. In order for the system to boot properly, you must edit /etc/fstab and ensure that it reflects the partition configuration you used earlier:
(chroot) # nano -w /etc/fstab

You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type "Y" when asked if you want to save the modified buffer. Otherwise your changes will be discarded.
# The root filesystem should have a pass number of either 0 or 1. # All other filesystems should have a pass number of 0 or greater than 1. #

10 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. # # See the manpage fstab(5) for more information. # # <fs> <mountpoint> <type> <opts> /dev/sda1 /dev/sda3 /dev/sda4 #/dev/cdrom none /boot none / /mnt/cdrom /dev/shm ext2 swap ext4 auto tmpfs noauto,noatime sw noatime noauto,ro nodev,nosuid,noexec

<dump/pass> 1 0 0 0 0 2 0 1 0 0

/etc/localtime /etc/localtime is used to specify the timezone that your machine is in, and defaults to UTC. If you would like your Funtoo Linux system to use local time, then you should replace /etc/localtime with a symbolic link to the timezone that you wish to use.
(chroot) # rm /etc/localtime (chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime

The above sets timezone to Eastern Time Canada. Go to /usr/share/zoneinfo to see which values to use. /etc/make.conf This file contains something similar to the following. You may or may not have a CFLAGS variable set already depending on what stage 3 tarball you used.:
ACCEPT_KEYWORDS="~amd64" CHOST="x86_64-pc-linux-gnu"

ACCEPT_KEYWORDS defines what branch of the package tree to be used. If you are using funtoocurrent, it will be prefixed with a tilde ('~'). This will make more recent ebuilds visible to Portage. You should typically not change this value, and you should also not change CHOST. MAKEOPTS can be used to define how many parallel compilations should occur when you compile a package, which can speed up compilation significantly. A rule of thumb is the number of CPUs (or CPU threads) in your system plus one. If for example you have a dual core processor without hyperthreading, then you would set MAKEOPTS to 3:
MAKEOPTS="-j3"

If your unsure of how many processors/threads you have then use /proc/cpuinfo to help you.
(chroot) # cat /proc/cpuinfo 16 | grep "processor" | wc -l

Set MAKEOPTS to this number plus one:


MAKEOPTS="-j17"

USE flags define what functionality is enabled when ebuilds are built. It is not recommended to add a lot of them during installation. You should wait until you have a working, bootable system to do so. A USE flag prefixed with a minus ("-") sign tells Portage not to use the flag when compiling. A Funtoo guide to USE flags will be available in the future. For now, you can find out more information about

11 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

USE flags in the Gentoo Handbook (http://www.gentoo.org/doc/en/handbook/handbookamd64.xml?part=2&chap=2) . LINGUAS tells Portage which local language to compile the system and applications in (those who use LINGUAS variable like OpenOffice). It is not usually necessary to set this if you use English. If you want another language such as French (fr) or German (de), set LINGUAS appropriately:
LINGUAS="fr"

/etc/rc.conf You may use this file as-is. However, it is a good idea to set rc_logger to yes. That will create a log file which is handy when problems are encountered with OpenRC scripts. To edit:
(chroot) # nano -w /etc/rc.conf

/etc/conf.d/hwclock If you dual-boot with Windows, you'll need to edit this file and change clock to local, because Windows will set your hardware clock to local time every time you boot Windows. Otherwise you should not normally need to edit this file.
# nano -w /etc/conf.d/hwclock

/etc/env.d/99editor Create and edit that file to instruct system about default editor to use.
(chroot) # nano -w /etc/env.d/99editor

Type in :
EDITOR="/bin/nano"

Localization By default, Funtoo Linux is configured with Unicode (UTF-8) enabled, and for the US English locale, and for a US keyboard. If you would like to configure your system to use a non-English locale or keyboard, see Funtoo Linux Localization.

Configuring your network


If you plan to use DHCP for network configuration, it is not necessary to emerge a DHCP client, and it's not even necessary to perform any manual network configuration at all. Simply add dhcpcd to the default runlevel, and your network will be configured automatically at boot:
(chroot) # rc-update add dhcpcd default

That's it! If you require more advanced configuration, see Funtoo Linux Networking for information on how to use Funtoo Linux's template-based network configuration system.

12 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Configuring and installing the Linux kernel


Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems. If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge sysrescue-std-sources with the binary USE flag set, which will automatically build the System Rescue CD kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a recent Fedora Core kernel and is an easy way to get your system up and running relatively quickly:
(chroot) # echo "sys-kernel/sysrescue-std-sources binary" >> /etc/portage/package.use (chroot) # emerge sysrescue-std-sources

All done! [Note: Nvidia card users: binary use flag installs nouveau drivers. Not compatible with nvidia-drivers.] For an overview of other kernel options for Funtoo Linux, see Funtoo Linux Kernels. Also be sure to see hardware compatibility information. We have compiled a very good reference for Dell PowerEdge 11G Servers that includes kernel compatibility information as well. The next step is to configure your boot loader to so that your new kernel loads when the system boots.

Installing GRUB
The boot-loader is responsible for loading the kernel from disk when your computer boots. For new installations, GRUB2 and Funtoo's boot-update tool should be used as a boot-loader. GRUB2 supports both GPT/GUID and legacy MBR partitioning schemes. To use this recommended boot method, first emerge boot-update. This will also cause grub-2 to be merged, since it is a dependency of boot-update:
(chroot) # emerge boot-update

Then, edit /etc/boot.conf and specify "Funtoo Linux genkernel" as the default setting at the top of the file, replacing "Funtoo Linux". /etc/boot.conf should now look like this:
boot { generate grub default "Funtoo Linux genkernel" timeout 3 } "Funtoo Linux" { kernel bzImage[-v] # params += nomodeset } "Funtoo Linux genkernel" { kernel kernel[-v] initrd initramfs[-v] params += real_root=auto # params += nomodeset }

13 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Running grub-install and boot-update Finally, we will need to actually install the GRUB boot-loader to your disk, and also run boot-update which will generate your boot-loader configuration file:
(chroot) # grub-install --no-floppy /dev/sda (chroot) # boot-update

You only need to run grub-install when you first install Funtoo Linux, but you should re-run boot-update every time you modify your /etc/boot.conf file, so your changes are applied on next boot. OK - your system should be ready to boot! Well, there are a few more loose ends...

Finishing Steps
A couple of things need done before rebooting: Set your root password It's imperative that you set your root password before rebooting so that you can log in:
(chroot) # passwd

Create a user account It's a good idea to create a normal user account that you can use for general Linux tasks. Before rebooting, create a user account for everyday use. Adjust the groups in the example below to match your needs. Some of them may not exist yet on your system. Replace "<user_name>" with the name your going to use for your everyday user. The "-m" option instructs useradd to create a home directory for your user. See the useradd manpage for more info.
(chroot) # useradd -m -G audio,cdrom,cdrw,floppy,usb,users,video,wheel -s /bin/bash <user_name>

Don't forget to set a password for your new user:


(chroot) # passwd <user_name>

Verify boot time services This is also a good time to emerge and enable any daemons you might want or need to have started at boot. It's generally a good idea to have a logger and enable it to start at boot:
(chroot) # emerge metalog (chroot) # rc-update add metalog default

It's not necessary to do too much here, since you can continue to configure your Funtoo Linux system after it boots on its own.

Restart your System

14 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Now is the time to leave chroot, to unmount Funtoo Linux partitions and files and to restart your computer. When you restart, the GRUB boot loader will start, load the Linux kernel and initramfs, and your system will begin booting. Leave the chroot, change directory to /, and unmount your funtoo partitions:
(chroot) # exit # cd / # umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo

Restart:
# reboot

You should now see your system reboot, the GRUB boot-loader appear for a few seconds, and then see the Linux kernel and initramfs loading. After this, you should see Funtoo Linux itself start to boot, and you should be greeted with a login: prompt. Funtoo Linux is now successfully installed! Troubleshooting a failed install
boot failure

If you did not get a login: prompt, it's possible that your install was not successful. You can reboot from the LiveCD and bind-mount your existing installation without repartitioning or recreating filesystems, chroot inside, and then check your system to ensure everything is configured properly:
# # # # # # # # # install -d /mnt/funtoo mount /dev/sda4 /mnt/funtoo mount /dev/sda1 /mnt/funtoo/boot cd /mnt/funtoo mount --bind /proc ./proc mount --bind /dev ./dev cp /etc/resolv.conf ./etc env -i HOME=/root TERM=$TERM /bin/bash chroot /mnt/funtoo /bin/bash

Once you are done making changes, leave the chroot, unmount mounted filesystems, and reboot:
(chroot) # exit # umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo # reboot

If you continue to experience difficulties getting Funtoo Linux to boot properly, please ask for help in the forums (http://forums.funtoo.org) .
Graphics Corruption at Boot

If you experience graphics corruption issues at boot time, you may be experiencing an issue with the Kernel Mode Setting subsystem (http://fedoraproject.org/wiki/Features/KernelModesetting) , known as KMS. To resolve this problem, boot from the LiveCD again following the steps in boot failure, above. Then, from within the chroot, edit /etc/boot.conf and add the line "params += nomodeset" to the "Funtoo Linux genkernel" section. It should now look like this:
"Funtoo Linux genkernel" { kernel kernel[-v] initrd initramfs[-v] params += real_root=auto params += nomodeset

15 sur 16

09/11/2011 11:56

Funtoo Linux Installation - Funtoo Linux

http://www.funtoo.org/index.php?title=Funtoo_Linux_Installat...

Now, save your changes and run boot-update:


(chroot) # boot-update

Now, exit from the chroot, unmount filesystems and reboot following the boot failure instructions. Retrieved from "http://www.funtoo.org/wiki/Funtoo_Linux_Installation" Category: HOWTO This page was last modified on 26 October 2011, at 19:11. This page has been accessed 48,353 times. Privacy policy About Funtoo Linux Disclaimers

16 sur 16

09/11/2011 11:56

You might also like