** If you haven't, this article will still serve you well, but please have either the official funtoo, or gentoo install guides open. We move through non-machine-specific bits with little elaboration.

+

−

* Have a T420 or similar machine.

+

−

Even if you do not have a T420, you may find this guide useful for:

+

== Add a New Organization ==

−

* Nvidia Optimus Cards.

+

−

* Power management.

+

−

* General setup.

+

−

This installation assumes (For now) that the install is starting from an MS-Windows installation. If you are not on Windows, please add your favourite choice of steps, keep the emphasis on ease of understanding.

<tr><th class="active">Services</th><td> {{{field|Services|property=Services|input type=textarea|placeholder=What is a general summary of your full service offerings?}}} </td></tr>

+

{{TableEnd}}

−

== Getting Started ==

+

== Location ==

−

You'll want to get yourself running off a LiveCD or LiveUSB to start. This guide will assume liveUSB, since some users find them more difficult to prepare, this is usually due to boot flag issues.

+

−

(Note: ''Live USB restore drives are nice to have in general! The author keeps one in his college binder.'')

+

−

==== Windows ====

+

{{TableStart}}

−

We can use LiLi for this, it provides a nice, simple interface and is fairly reliable: [http://www.linuxliveusb.com/en/download LiLi Download]

+

<tr><th class="active">Geographic Coordinates</th><td>

+

This section can be used to identify your geographic location. Enter the name of the location (either as an address or in City, State format) into the ''second field'', and click '''Look up Coordinates'''. Geographic Coordinates will then be automatically be placed in the first field.

Since the T series are all 64-bit laptops, make sure to boot the 64-bit kernel, as the default is 32-bit.

+

{{{end template}}}

−

''But Why?: If we pick 32-bit, later on we won't be able to chroot into our Funtoo's 64-bit stage 3.''

+

== Documentation ==

−

You should see a fairly verbose boot as sysrescueCD scans for modules it requires and starts up. It is safe to simply accept prompt defaults here, unless they are errors.

+

Enter documentation or extended information for the organization below. If you need to add more complex wikitext, use the "Edit" button after saving this page, and enter your wiki text at the bottom. This allows you to provide rich documentation content for the repository.

−

When you are greeted by the interactive command prompt, enter 'wizard' as prompted, and accept the default entry in the dialogue. This will give us a functioning XFCE desktop environment.

+

{{{standard input|free text|rows=30}}}

−

== Partitioning ==

+

{{{for template|OrganizationFooter}}}

−

Partitioning is the only step of this install which provides real risk to data on other operating systems. Be extremely careful if there is something you do not wish to loose. These steps are not foolproof and may result in lost data.

+

{{{end template}}}

−

Please be aware that MBR disks only support '''4''' primary partitions. You can solve this by creating an 'extended' partition and adding logical partitions to it. If you are feeling particularly brave try GPT on your disk.

+

{{{standard input|summary}}}

−

So lets start:

+

{{{standard input|minor edit}}} {{{standard input|watch}}}

−

First open up gparted. You should see it on the taskbar if you're using systemrescueCD. It will scan available drives and show you the partition table. Most users will likely find one of the following to their liking:

# INPUT_DEVICES :: A list of input devices you'll be wanting. This is needed for xorg and not much else.

+

−

INPUT_DEVICES="evdev synaptics"

+

−

# VIDEO CARDS :: A list of video cards. Optimus users beware here.

+

−

VIDEO_CARDS="intel i915 i965 nvidia"

+

−

+

−

# Use flags.

+

−

# Application specific flags should be migrated to /etc/portage/package.use (which can be a folder with multiple files!)

+

−

# To look at the user flags for an application use "equery uses FOOPKG"

+

−

USE="

+

−

acpi alsa /

+

−

bash-completition /

+

−

curl /

+

−

dvdr /

+

−

ithreads /

+

−

ncurses networkmanager/

+

−

policykit /

+

−

ssl sse sse2 sse3 sse4 /

+

−

threads /

+

−

udev /

+

−

vim-syntax /

+

−

zsh-completion /

+

−

"

+

−

</pre>}}

+

−

+

−

=== Installing an Editor ===

+

−

Well, first things first lets get ourselves an editor. The author prefers vim, but you may like emacs or something else... Feel free to disregard this and explore! If you plan to have multiple users however, this will often be expected by experienced linux users.

+

−

+

−

<console>

+

−

###i## emerge vim

+

−

</console>

+

−

Check that your USE flags look reasonable (see above) and feel free to do any fine tweaking in /etc/portage/package.use.

+

−

Consult your output after merge! You may want to follow some of it's advice.

+

−

+

−

You can find multiple good guides on google for vim configurations and setups.

+

−

Funtoo also provides a very nice base configuration in /etc/vim/vimrc.

+

−

+

−

==== Boot Parameters ====

+

−

The T420 has a number of boot parameters that can be set to conserve power. On a laptop these options are generally reasonable:

+

−

{{File

+

−

|/etc/boot.conf|<pre>

+

−

boot {

+

−

generate grub

+

−

default "Funtoo Linux"

+

−

timeout 15

+

−

}

+

−

+

−

"Funtoo Linux" {

+

−

kernel bzImage[-v]

+

−

# Force PCIE Active State Power Management on.

+

−

params += pcie_aspm=force

+

−

# TODO (Range 1..15)

+

−

params += epb=7

+

−

# TODO

+

−

params += hpet=force

+

−

# i915 Enable rc6 sleep state (?)

+

−

params += i915.i915_enable_rc6=1

+

−

# TODO (Framebuffer?)

+

−

params += i915.i915_enable_fbc=1

+

−

# Downclock the lvds screen (60hz -> 50hz)

+

−

params += i915.lvds_downclock=1

+

−

# Quiet some of the excessively verbose kernel boot

+

−

params += quiet

+

−

}

+

−

+

−

"Windows 7" {

+

−

type win7

+

−

params root=/dev/sda1

+

−

}

+

−

+

−

#"Funtoo Linux genkernel" {

+

−

# kernel kernel[-v]

+

−

# initrd initramfs[-v]

+

−

# params += real_root=auto

+

−

#}

+

−

</pre>}}

+

−

+

−

When you're done, update grub with:

+

−

<console>

+

−

###i## boot-update

+

−

</console>

+

−

+

−

==== Power Saving Local Scripts ====

+

−

Next we're going to set up a script that runs at default runlevel for the machine. This will echo several options to various dev files. Most distros would do this via /etc/rc.local or something of the like.

+

−

+

−

With Funtoo (and Gentoo) this is accomplished via:

+

−

<console>

+

−

/etc/local.d

+

−

</console>

+

−

Consult the README (in directory) for more information.

+

−

{{File

+

−

|/etc/local.d/power-savings.start|<pre>

+

−

$ cat /etc/local.d/power-saving.start

+

−

# /bin/bash

+

−

#

+

−

echo 1 > /sys/modules/snd_hda_intel/parameters/power_save

+

−

for i in /sys/bus/usb/devices/*/power/autosuspend; do

+

−

echo 1 > $i

+

−

done

+

−

for i in /sys/class/scsi_host/host*/link_power_management_policy; do

+

−

echo min_power > $i

+

−

done

+

−

</pre>}}

+

−

If you copy this wholesale remember to <code>chmod -x</code> the file!

+

−

+

−

==== rc.conf ====

+

−

<code>rc.conf</code> lets us change some options to do with open RC.

+

−

+

−

First, lets set <code>rc_sys</code> to it's default, this will suppress a warning message at boot.

+

−

{{File

+

−

|/etc/rc.conf|<pre>

+

−

rc_sys=""

+

−

</pre>}}

+

−

+

−

Next, we can turn on <tt>rc_parallel</tt> to speed boot up.

+

−

{{File

+

−

|/etc/rc.conf|<pre>

+

−

rc_parallel="YES"

+

−

</pre>}}

+

−

If you get errors or problems with services on boot, try turning this off.

+

−

+

−

== Making it Usable ==

+

−

Next we'll be setting up a normal user and installing the venerable Xorg.

+

−

+

−

=== Mouse in framebuffer ===

+

−

Right now we should be looking at a framebuffer'd console.

+

−

<console>

+

−

###i## /etc/init.d/gpm start

+

−

</console>

+

−

gpm is a daemon that allows us to use our mouse (trackpad/trackpoint) on console. Give it a try! If you want to keep it on across boots, add it to your init.

+

−

<console>

+

−

###i## rc-update add gpm default

+

−

</console>

+

−

+

−

=== Making a New User ===

+

−

Lets use superadduser to make the task ever so much easier (Though, it is already easy)

+

−

<console>

+

−

###i## emerge superadduser

+

−

###i## superadduser

+

−

</console>

+

−

Walk through the prompts and set up your user how you choose.

+

−

+

−

=== Sudo Make Me a Sandwich ===

+

−

Next lets merge in sudo, and set up our new user to be able to use sudo.

+

−

<console>

+

−

###i## emerge sudo

+

−

</console>

+

−

Now edit the config with:

+

−

<console>

+

−

###i## visudo

+

−

</console>

+

−

You'll probably want to uncomment out one of the two options:

+

−

<console>

+

−

## Uncomment to allow members of group wheel to execute any command

+

−

# %wheel ALL=(ALL) ALL

+

−

</console>

+

−

<console>

+

−

## Same thing without a password:

+

−

# %wheel ALL=(ALL) NOPASSWD: ALL

+

−

</console>

+

−

+

−

Now just add your user to the 'wheel' group.

+

−

<console>

+

−

###i## gpasswd -a foouser wheel

+

−

###i## exit

+

−

</console>

+

−

Now re-login as your user, and you should be good to go!

+

−

+

−

=== Tmux ===

+

−

Before we emerge xorg, lets get tmux working so we can easily scroll through output and look at USE flags etc.

+

−

<console>

+

−

###i## emerge tmux

+

−

</console>

+

−

The default config will suffice for now. You may find it beneficial to learn to use tmux ''properly'' sometime, but for now we'll hold hands.

+

−

+

−

<console>

+

−

###i## tmux

+

−

</console>

+

−

Now we can scroll through output with CTRL+B [ and the up and down arrows.

+

−

+

−

== Xorg ==

+

−

Xorg is a large topic in and on itself. We'll focus on getting a working xorg and a simple window manager.

+

−

+

−

<console>

+

−

# (in tmux)

+

−

$##bl## sudo emerge xorg-server

+

−

</console>

+

−

Once again use CTRL+B [ to start scrolling (escape to exit) and look through your use flags, adding anything you might want.