Difference between pages "Lenovo Thinkpad T420" and "FLOP:Release Engineering"

From Funtoo
(Difference between pages)
Jump to: navigation, search
(Fetch a Stage 3)
 
 
Line 1: Line 1:
+
{{FLOP
== Introduction ==
+
|Summary=This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is _only_ a rolling-release distro and does not have the _option_ to also be non-rolling. In order to create a more stable Funtoo system, this proposal will be offering a few things that we can do to make that happen.
Throughout, this article will assume the following:
+
|Author=Fearedbliss
* You have installed Gentoo or Funtoo in the past.
+
|Maintainer=Fearedbliss
** 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.
+
'''Jonathan Vasquez (fearedbliss)'''
  
Even if you do not have a T420, you may find this guide useful for:
+
'''Version 0.2'''
* 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.
+
== Introduction ==
  
== Getting Started ==
+
This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is _only_ a rolling-release distro and does not have the _option_ to also be non-rolling. In order to create a more stable Funtoo system, this proposal will be offering a few things that we can do to make that happen.
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 ====
+
The below proposals will not change Funtoo from a rolling-release system to a non-rolling release system. It will simply add the option to be non-rolling. Funtoo will also not be a binary distro. It will still be a source based distro but it will also have the ability to use binaries for a few select packages (Basically the Gentoo Reference Platform will be restarted and improved).
We can use LiLi for this, it provides a nice, simple interface and is fairly reliable: [http://www.linuxliveusb.com/en/download LiLi Download]
+
  
=== SysrescueCD ===
+
I believe that this will also make running Funtoo for users that want further stability and/or users that are running Funtoo as a server in an enterprise environment/or otherwise, more feasible.
Grab the version that Suites your needs here: [http://www.sysresccd.org/Download Sysrescue Download]
+
Next use LiLi (Or whatever you happen to be using) to flash the image or burn your CD. Reboot, change your boot device, and you'll find yourself at a grub menu.
+
  
Since the T series are all 64-bit laptops, make sure to boot the 64-bit kernel, as the default is 32-bit.
+
The following things are proposed:
  
''But Why?: If we pick 32-bit, later on we won't be able to chroot into our Funtoo's 64-bit stage 3.''
+
* Semi-rolling release model for Funtoo-'''RELEASE''' and Funtoo-'''STABLE''' (Funtoo-'''CURRENT''' will stay rolling release)'''
 +
* A Complete Core OS'''
 +
* A set of monitored applications that will be checked for stability and consistency'''
  
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.
+
== Semi-rolling Time Based Releases ==
  
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.
+
The semi-rolling release model is a hybrid between a rolling release and just a regular release. This means that instead of bring new packages in all the time (rolling release), and instead of just completely freezing everything and bringing new packages/features every X months, we can have a middle ground where we can branch the Funtoo-'''CURRENT''' git branch and then focus on stabilizing that tree. Once we stabilize it, people can use it without having to worry about major version upgrades. The user can then use this branch until another branch later in the future is created. The user can then easily upgrade to the new branch by switching their SYNC variable.  
  
== Partitioning ==
+
So essentially it is a slow rolling-release (or semi-rolling or rolling-release with speed bumps).
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.
+
  
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.
+
Names for Funtoo's 3 git branches:
 +
* Funtoo-'''CURRENT''' (Latest Developments - HEAD. This is the normal funtoo-current tree.)
  
So lets start:
+
* Funtoo-'''RELEASE''' (Just a release in a specific point in time - a branch of Funtoo-'''CURRENT''' is created, frozen, and stabilize.)
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:
+
  
==== Pure Funtoo ====
+
* Funtoo-'''STABLE''' (This is the same as a '''RELEASE''' but it is supported for a longer period of time).
You'll likely want:
+
<pre>
+
/boot      :: EXT2      :: 100mb-500mb
+
    ''Note: We choose EXT2 because there is really no good use for a journalled boot partition, but feel free to use EXT4 instead!''
+
/          :: EXT4      :: 60gb (suggested floor value) - 500+
+
swap        :: linux-swap :: Your RAM Value (Optional, allows for hibernation)
+
</pre>
+
You may wish for a separate /home, which is perfectly legitimate, or any number of other partitions.  
+
  
==== Dual Boot with Windows ====
+
=== Which branch is for what person? ===
If dual booting with Windows, it is advisable to have Windows installed '''first''' since it will muck with the MBR and possibly want to create it's own boot partition.
+
The Funtoo-'''CURRENT''' branch is for people who want to be on the bleeding edge all the time. You will get the latest updates, and here is where all the development happens. Your system might not be fully stable all the time, and things might fail to compile. This is literally the traditional Gentoo rolling-release model. If you are used to using Gentoo/Funtoo, and want to continue using your system the way it has always been, this is the branch for you.
You'll likely want:
+
<pre>
+
System Reserved    :: NTFS      :: Whatever windows chooses.
+
Windows            :: NTFS      :: >100gb (If you plan on doing any serious work on windows)
+
/boot              :: EXT2      :: 100mb-500mb
+
Extended Partition -
+
  /                :: EXT4      :: Whatever is left.
+
  swap            :: linux-swap:: Your RAM value. (Optional, allows for hibernation)
+
</pre>
+
You may also want a separate /home, etc. These will fit into your extended partition without contributing to MBR's 4 partition limit.
+
  
== Starting the  (actual) Install ==
+
The Funtoo-'''RELEASE''' branch is for people who want to be rolling and receive new features but be more stable than Funtoo-'''CURRENT''' by using a frozen portage tree at a specific point in time that is audited for stability.
Up until now everything we've done has just been foreplay. Finally we can mount our partitions and get started on the installation!
+
  
==== Mounting ====
+
The Funtoo-'''STABLE''' branch is for people who prefer stability and don't need the latest features that are in the '''RELEASE''' branches. This branch is frozen for a longer period of time.
First, lets mount all of our partitions.
+
* Make a directory for root. Lets assume '''/mnt/funtoo'''
+
<console>
+
###i## mkdir /mnt/funtoo
+
</console>
+
* Mount your '/' partition to /mnt/funtoo
+
<console>
+
###i## mount /dev/sd## /mnt/funtoo
+
</console>
+
* Make a directory for your boot partition.
+
<console>
+
###i## mkdir /mnt/funtoo/boot
+
</console>
+
* Mount your boot partition.
+
<console>
+
###i## mount /dev/sd## /mnt/funtoo/boot
+
</console>
+
* Mount anything else you may have made and need. (Not swap)
+
  
==== Checking the Date ====
+
=== Example of 4 month RELEASE cycle, and a 2 year STABLE cycle ===
Although this may seem super un-important, if you want to avoid lots of spammy warning messages later, checking your date is beneficial.
+
For the branch developments: Let's picture a 4 month RELEASE cycle (semi-rolling), and a 2 years STABLE cycle. If we expand this starting from January 2013, we would get the following releases over two years:
<console>
+
###i## date
+
</console>
+
If it needs to be set, you'll want something like:
+
<console>
+
###i## date 071620002011
+
#Fri Jul 16 20:00:00 UTC 2011
+
</console>
+
  
==== Fetch a Stage 3 ====
 
Next we need to fetch a tarball containing a barebones stage. We will download the core-i7 architecture version, if you have a core i5 or i3, don't worry, it's all the same.
 
<console>
 
###i## cd /mnt/funtoo
 
###i## wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/corei7/stage3-current.tar.xz
 
</console>
 
 
Next let's unpack with:
 
<console>
 
###i## tar xJpf stage3-current.tar.xz
 
</console>
 
{{Note}} ''Seriously, don't forget the 'p' option.''
 
 
If you run 'ls' now, you should see the <code>/mnt/funtoo</code> is fully populated with folders such as lib, home, and proc.
 
 
==== Chroot'ing ====
 
Now we need to change the ''apparent root'' of our system to our fledgling Funtoo system.
 
 
<pre>
 
<pre>
cd /mnt/funtoo
+
Funtoo-13.1-STABLE  (January 2013)
mount --bind /proc ./proc
+
Funtoo-13.2-RELEASE (May 2013)
mount --bind /dev ./dev
+
Funtoo-13.3-RELEASE (September 2013)
cp /etc/resolv.conf ./etc
+
Funtoo-14.1-RELEASE (January 2014)
env -i HOME=/root TERM=$TERM chroot /mnt/funtoo /bin/bash --login
+
Funtoo-14.2-RELEASE (May 2014)
 +
Funtoo-14.3-RELEASE (September 2014)
 +
Funtoo-15.1-STABLE  (January 2015)
 
</pre>
 
</pre>
  
==== Getting the Portage Tree ====
+
This gives you 2 STABLE releases in two years and 5 RELEASEs in between. That's a total of 7 releases. STABLE releases only get bugfixes and security updates. RELEASE are for people that want to get the latest bleeding edge stuff, but still want to be stable within RELEASEs.
Funtoo (Unlike Gentoo) uses a git based portage tree, however if you're coming from Gentoo, you'll be glad to know we sync with the Gentoo tree once every 12 hours.
+
<pre>
+
emerge --sync
+
</pre>
+
''You can ignore most of the errors that might be spat out at this stage, however if they do not disappear on subsequent merges, talk to us in #funtoo.''
+
Your first sync will take significantly longer then subsequent syncs, as the whole tree must be synced.
+
  
==== A Configuration Celebration ====
+
For people that are used to the normal Gentoo/Funtoo stuff, you could just stay on the Funtoo-CURRENT branch.
Now that we have our portage tree cloned, we need to do some initial setup on some files before doing anything else with portage.
+
 
+
'''Fstab'''
+
  
 +
=== Example of 3 month RELEASE cycle, and a 2 year STABLE cycle ===
 
<pre>
 
<pre>
nano /etc/fstab
+
Funtoo-13.1-STABLE  (January 2013)
 +
Funtoo-13.2-RELEASE (April 2013)
 +
Funtoo-13.3-RELEASE (July 2013)
 +
Funtoo-13.4-RELEASE (October 2013)
 +
Funtoo-14.1-RELEASE (January 2014)
 +
Funtoo-14.2-RELEASE (April 2014)
 +
Funtoo-14.3-RELEASE (July 2014)
 +
Funtoo-14.4-RELEASE (October 2014)
 +
Funtoo-15.1-STABLE  (January 2015)
 
</pre>
 
</pre>
  
You'll want something like this: (Replace the dev values with what you are using)
+
If we have have a 3 month (semi-rolling) cycle, we would end up with 2 STABLE releases and 7 RELEASEs within two years. This is a total of 9 releases.
<pre>
+
# <fs> <mountpoint> <type> <opts>         <dump/pass>
+
  
/dev/sda1 /boot ext2 noauto,noatime  1 2
+
=== What will these branches contain? What will they focus on? ===
/dev/sda3 none swap sw         0 0
+
Funtoo-'''RELEASE''' and Funtoo-'''STABLE''' branches will only focus on the stability of specific packages that we are deciding to maintain at a specific point in time. All outside packages can be installed and maintained by outside package mantainers.
/dev/sda4 / ext4 noatime         0 1
+
/dev/cdrom /mnt/cdrom auto noauto,ro         0 0
+
</pre>
+
  
'''Localtime'''
+
== A Complete Core OS ==
 +
An operating system is not just a stage3 tarball. The stage3 will not boot by itself, but rather needs the user to compile a kernel and install a bootloader. We should have a well tested default kernel that is tested for stability. This will speed up deployments and will provide predictability for kernel modules, and other applications that rely on a kernel. We will also need to provide a way for the system to boot this kernel. Thus a default bootloader should be provided.
  
Lets remove the default localtime, and create a symbolic link to the proper time zone. (You probably will want something other then Vancouver)
+
'''Core OS:'''
<pre>
+
* stage3 (Minimal @system applications needed for a functional Funtoo base system)
rm /etc/localtime
+
* kernel (bliss-kernel can become the base of funtoo-kernel - or another kernel you think is good)
ln -s /usr/share/zoneinfo/America/Vancouver /etc/localtime
+
* bootloader (a default bootloader to provide a seamless, fast, and easy deployment experience)
</pre>
+
  
''' Hostname '''
+
== Monitored Set of Applications ==
Set your host name:
+
In order for us to make a release stable, we will need to monitor a set of applications that we believe are essential for people that want to install servers and desktops. All of the monitored applications should work fine, they should be able to compile with no bugs (If the user is compiling), and they will also have binaries available. (The binaries will be compiled with the default and recommended USE flags that Funtoo developers believe give a functional binary).  
<pre>
+
nano /etc/conf.d/hostname
+
</pre>
+
  
'''hwclock'''
+
Proposed set of packages:
  
If you're using a dual boot system, you'll want to change this. Otherwise it's entirely optional.
+
'''Core Applications:'''
<pre>
+
* Critical packages of stage3 that provide the Funtoo base system.
nano /etc/conf.d/hwclock
+
</pre>
+
  
If you're on windows you'll want:
+
'''Server Applications:'''
<pre>
+
{| class="wikitable"
clock="local"
+
|-
</pre>
+
! Name !! Port
 +
|-
 +
| Apache || www-servers/apache
 +
|-
 +
| Nginx || www-servers/nginx
 +
|-
 +
| MariaDB || dev-db/mariadb
 +
|-
 +
| MySQL || dev-db/mysql
 +
|-
 +
| PostgreSQL || dev-db/postgre-server
 +
|-
 +
| SQLite || dev-db/sqlite
 +
|-
 +
| PHP || dev-lang/php
 +
|-
 +
| Python || dev-lang/python
 +
|-
 +
| Ruby || dev-lang/ruby
 +
|-
 +
| Perl || dev-lang/perl
 +
|-
 +
| DRBD || sys-cluster/drbd
 +
|-
 +
| Puppet || app-admin/puppet
 +
|-
 +
| Heartbeat || sys-cluster/heartbeat
 +
|-
 +
| Pacemaker || sys-cluster/pacemaker
 +
|-
 +
| Corosync || sys-cluster/corosync
 +
|-
 +
| phpmyadmin || dev-db/phpmyadmin
 +
|-
 +
| Fail2Ban || net-analyzer/fail2ban
 +
|-
 +
| nmap || net-analyzer/nmap
 +
|-
 +
| traceroute || net-analyzer/traceroute
 +
|-
 +
| Samba || net-fs/samba
 +
|-
 +
| NTP || net-misc/ntp
 +
|-
 +
| Dovecot || net-mail/dovecot
 +
|}
  
'''Make.conf'''
 
Important enough that it deserves it's own article. A template make.conf for the T420 will be forthcoming.
 
  
For now:
+
'''Desktop Applications:'''
If you have an i5 or i3 you will want
+
{| class="wikitable"
<pre>
+
|-
MAKEOPTS="-j3"
+
! Name !! Port
</pre>
+
|-
If you have an i7 you'll probably want
+
| GNOME || gnome-base/gnome
<pre>
+
|-
MAKEOPTS="-j5"
+
| KDE || kde-base/kde-meta
</pre>
+
|-
 +
| XFCE || xfce-base/xfce4-meta
 +
|-
 +
| Awesome || x11-wm/awesome
 +
|-
 +
| Ratpoison || x11-wm/ratpoison
 +
|-
 +
| Xmonad || x11-wm/xmonad
 +
|-
 +
| Openbox || x11-wm/openbox
 +
|-
 +
| Fluxbox || x11-wm/fluxbox
 +
|-
 +
| Firefox || www-client/firefox
 +
|-
 +
| Google Chrome || www-client/google-chrome
 +
|-
 +
| Chromium || www-client/chromium
 +
|-
 +
| Chrome Plugins for Chromium || www-plugins/chrome-binary-plugins
 +
|-
 +
| Google Talk Plugin || www-plugins/google-talkplugin
 +
|-
 +
| Adobe Flash Player || www-plugins/adobe-flash
 +
|-
 +
| OpenJDK || dev-java/icedtea
 +
|-
 +
| ISO Master || app-cdr/isomaster
 +
|-
 +
| LibreOffice || app-office/libreoffice
 +
|-
 +
| GIMP || media-gfx/gimp
 +
|-
 +
| VLC || media-video/vlc
 +
|-
 +
| Filezilla || net-ftp/filezilla
 +
|-
 +
| Pidgin || net-im/pidgin
 +
|-
 +
| Hexchat || net-irc/hexchat
 +
|}
  
''But I have Hyperthreading! Why only -j3?''
+
'''Command Line & Tools Applications:'''
Hyperthreading and compiling don't play well together. You'll have the same (or better) performance with -j3 as -j5 with a dual core hyper threaded processor.
+
{| class="wikitable"
 +
|-
 +
! Name !! Port
 +
|-
 +
| genlop || app-portage/genlop
 +
|-
 +
| gentoolkit || app-portage/gentoolkit
 +
|-
 +
| Dash || app-shells/dash
 +
|-
 +
| GNU Screen || app-misc/screen
 +
|-
 +
| hddtemp || app-admin/hddtemp
 +
|-
 +
| logrotate || app-admin/logrotate
 +
|-
 +
| pwgen || app-admin/pwgen
 +
|-
 +
| syslog-ng || app-admin/syslog-ng
 +
|-
 +
| sysstat || app-admin/sysstat
 +
|-
 +
| Parallel Bzip2 || app-arch/pbzip2
 +
|-
 +
| Parallel GZ || app-arch/pigz
 +
|-
 +
| Parallel XZ || app-arch/pxz
 +
|-
 +
| vim || app-editors/vim
 +
|-
 +
| nano || app-editors/nano
 +
|-
 +
| Telnet || net-misc/telnet-bsd
 +
|-
 +
| Ethtool || sys-apps/ethtool
 +
|-
 +
| GPT fdisk || sys-apps/gptfdisk
 +
|-
 +
| smartmon || sys-apps/smartmontools
 +
|-
 +
| ccache || dev-util/ccache
 +
|-
 +
| Mutt || mail-client/mutt
 +
|-
 +
| htop || sys-process/htop
 +
|-
 +
| lsof || sys-process/lsof
 +
|-
 +
| vixie-cron || sys-process/vixie-cron
 +
|}
  
== Stop, Kernel time! ==
+
Of course this is just a list of applications that I've deemed important for server and desktop users. More applications should be added so that we can filter mostly used and important applications, from other more fringe applications.
''For this guide we'll be using some pre-found config options that I will be adding later.''
+
  
* Networking:
+
== Other ==
** iwlwifi and auxilary
+
** Unknown intel ethernet adapter. Selected several.
+
* GPU
+
** Intel available default.
+
** nvidia will be dealt with later
+
  
Install:
+
/etc/gentoo-release -> /etc/funtoo-release  (rename this file)
* wpa_supplicant
+
* iwl6000-ucode
+
* wireless-tools
+
  
 +
should contain information for the currently installed release:
  
== Bootloader Setup ==
+
Example:
In funtoo the setup of grub is extremely simplified.
+
 
<pre>
 
<pre>
emerge -vqat boot-update
+
Funtoo-13.1-STABLE  (January 2013)
 +
Funtoo-13.2-RELEASE (May 2013)
 +
Funtoo-13.3-RELEASE (September 2013)
 +
Funtoo-14.1-RELEASE (January 2014)
 +
Funtoo-14.2-RELEASE (May 2014)
 +
Funtoo-14.3-RELEASE (September 2014)
 +
Funtoo-15.1-STABLE  (January 2015)
 
</pre>
 
</pre>
''Q: What are those options? A: We'll get to them later, lets get the system booted first, okay? ''
 
Boot-update is a tool that will allow for very simple configuration of grub similar to older versions (But nicer still).
 
 
You will now find a file:
 
<pre>
 
$ cat /etc/boot.conf
 
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
 
}
 
This can be configured (We'll touch on this later. We need to make sure the kernel is booting and working before we start tweaking) with options for the kernel.
 
 
==== Dual-Booters Only ====
 
If you want to dual boot with windows you'll need to add an entry here:
 
<pre>
 
"Windows 7" {
 
    type win7
 
    params root=/dev/sda1
 
}
 
</pre>
 
==== Installing Grub onto the Drive(Everyone) ====
 
Next we can install grub onto the drive.
 
<pre>
 
grub-install --no-floppy /dev/sda
 
boot-update
 
</pre>
 
No errors means we should be good to go!
 
 
== Tidy up and go. ==
 
Just a few more things!
 
 
Lets set a root password.
 
<pre>
 
passwd
 
</pre>
 
 
It is advisable to exit the chroot and umount all the relevant install drives. Or at least just exit the chroot, but you can just simply reboot from here.
 
<pre>
 
exit
 
cd /
 
umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo
 
reboot
 
</pre>
 
 
== Configuring the New System ==
 
Welcome to funtoo! You should be greeted by a bunch of spammy text that scrolls by reasonably fast and then a couple penguins and openrc. Login to your root user and lets start playing.
 
 
A note, this part of the guide is meant to be much more of a dialogue between us.
 
 
==== Getting up the (wired) network ====
 
If you're gifted with a wired network connect, use it! The initial setup is much more convenient and quick.
 
 
Quickly set up the network with
 
<pre>
 
/etc/init.d/dhcpcd start
 
</pre>
 
Now check to see if our wired adapter is listed with ifconfig.
 
<pre>
 
ifconfig
 
#  (or)
 
ping google.com
 
</pre>
 
If you see it listed with a description, we're good to go!
 
 
==== Making the make.conf ====
 
Before we start merging into our tree everything under the sun, lets do some system planning.
 
 
You can use this as a starting point:
 
<pre>
 
# These settings were set by the metro build script that automatically built this stage.
 
# Please consult /etc/make.conf.example for a more detailed example.
 
 
ACCEPT_KEYWORDS="~amd64"
 
CHOST="x86_64-pc-linux-gnu"
 
CFLAGS="-march=corei7 -O2 -pipe"
 
CXXFLAGS="-march=corei7 -O2 -pipe"
 
SYNC="git://github.com/funtoo/ports-2012.git"
 
 
# -j3 :: Have make use 3 threads by default.
 
MAKEOPTS="-j3"
 
#  Setup emerge's default options:
 
#    --ask    :: Double check before merging.
 
#    --verbose :: Show use flags etc.
 
#    --quiet  :: Don't show me make spam.
 
#    --tree    :: Use nice dependancy graphs.
 
EMERGE_DEFAULT_OPTS="--ask --verbose --quiet --tree"
 
 
# Portage Features
 
#    TODO: Descriptions
 
FEATURES="mini-manifest parallel-fetch userfetch parallel-install sandbox fixpackages collision-protect"
 
 
#  We might use binary packages later. Lets set that up just in case.
 
PORTAGE_BINHOST=/usr/portage/packages
 
 
 
# CCache
 
#  This is not going to be done by default.
 
#  Why? It's only wortwhile if you plan on compiling packages multiple
 
#  times per version, which the average user will not.
 
#CCACHE_SIZE="5G"
 
#CCACHE_DIR="/var/cache/ccache"
 
 
# Licenses
 
#  By default we're just going to accept everything.
 
ACCEPT_LICENSE="*"
 
 
 
# Device Specific Settings
 
#    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>
 
 
==== Getting 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.
 
 
<pre>
 
emerge vim
 
</pre>
 
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:
 
<pre>
 
$ cat /etc/boot.conf
 
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
 
<pre>
 
boot-update
 
</pre>
 
 
==== 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
 
<pre>
 
/etc/local.d
 
</pre>
 
Consult the README (in directory) for more information.
 
 
<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 chmod -x the file!
 
 
==== rc.conf ====
 
rc.conf lets us change some options to do with open RC.
 
 
First, lets set rc_sys to it's default, this will suppress a warning message at boot.
 
<pre>
 
rc_sys=""
 
</pre>
 
 
Next, we can turn on rc_parallel to get a bit of speedup on boot.
 
<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.
 
<pre>
 
/etc/init.d/gpm start
 
</pre>
 
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.
 
<pre>
 
rc-update add gpm default
 
</pre>
 
 
==== Making a New User =====
 
Lets use superadduser to make the task ever so much easier (Though, it is already easy)
 
<pre>
 
emerge superadduser
 
superadduser
 
</pre>
 
 
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.
 
<pre>
 
emerge sudo
 
</pre>
 
Now edit the config with
 
<pre>
 
visudo
 
</pre>
 
You'll probably want to uncomment out one of the two options:
 
<pre>
 
## Uncomment to allow members of group wheel to execute any command
 
# %wheel ALL=(ALL) ALL
 
 
## Same thing without a password
 
# %wheel ALL=(ALL) NOPASSWD: ALL
 
</pre>
 
 
Now just add your user to the 'wheel' group.
 
<pre>
 
gpasswd -a foouser wheel
 
exit
 
</pre>
 
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.
 
<pre>
 
emerge tmux
 
</pre>
 
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.
 
 
<pre>
 
tmux
 
</pre>
 
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.
 
 
<pre>
 
# (in tmux)
 
sudo emerge xorg-server
 
</pre>
 
Once again use CTRL+B [ to start scrolling (escape to exit) and look through your use flags, adding anything you might want.
 
 
== A note on Gnome ==
 
Want to get rid of that awful lock screen on wake from suspend?
 
<pre>gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'</pre>
 
  
[[Category:HOWTO]]
+
[[Category:Internals]]
[[Category:HWLaptop]]
+
[[Category:FLOP]]
[[Category:Hardware Compatibility]]
+
{{FLOPFooter}}

Revision as of 21:24, 23 February 2014

Original Author(s)
Fearedbliss
Current Maintainer(s)
Fearedbliss

Funtoo Linux Optimization Proposal: Release Engineering

This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is _only_ a rolling-release distro and does not have the _option_ to also be non-rolling. In order to create a more stable Funtoo system, this proposal will be offering a few things that we can do to make that happen.

Jonathan Vasquez (fearedbliss)

Version 0.2

Introduction

This is a proposal to implement a strong release engineering infrastructure for Funtoo Linux. Funtoo currently is _only_ a rolling-release distro and does not have the _option_ to also be non-rolling. In order to create a more stable Funtoo system, this proposal will be offering a few things that we can do to make that happen.

The below proposals will not change Funtoo from a rolling-release system to a non-rolling release system. It will simply add the option to be non-rolling. Funtoo will also not be a binary distro. It will still be a source based distro but it will also have the ability to use binaries for a few select packages (Basically the Gentoo Reference Platform will be restarted and improved).

I believe that this will also make running Funtoo for users that want further stability and/or users that are running Funtoo as a server in an enterprise environment/or otherwise, more feasible.

The following things are proposed:

  • Semi-rolling release model for Funtoo-RELEASE and Funtoo-STABLE (Funtoo-CURRENT will stay rolling release)
  • A Complete Core OS
  • A set of monitored applications that will be checked for stability and consistency

Semi-rolling Time Based Releases

The semi-rolling release model is a hybrid between a rolling release and just a regular release. This means that instead of bring new packages in all the time (rolling release), and instead of just completely freezing everything and bringing new packages/features every X months, we can have a middle ground where we can branch the Funtoo-CURRENT git branch and then focus on stabilizing that tree. Once we stabilize it, people can use it without having to worry about major version upgrades. The user can then use this branch until another branch later in the future is created. The user can then easily upgrade to the new branch by switching their SYNC variable.

So essentially it is a slow rolling-release (or semi-rolling or rolling-release with speed bumps).

Names for Funtoo's 3 git branches:

  • Funtoo-CURRENT (Latest Developments - HEAD. This is the normal funtoo-current tree.)
  • Funtoo-RELEASE (Just a release in a specific point in time - a branch of Funtoo-CURRENT is created, frozen, and stabilize.)
  • Funtoo-STABLE (This is the same as a RELEASE but it is supported for a longer period of time).

Which branch is for what person?

The Funtoo-CURRENT branch is for people who want to be on the bleeding edge all the time. You will get the latest updates, and here is where all the development happens. Your system might not be fully stable all the time, and things might fail to compile. This is literally the traditional Gentoo rolling-release model. If you are used to using Gentoo/Funtoo, and want to continue using your system the way it has always been, this is the branch for you.

The Funtoo-RELEASE branch is for people who want to be rolling and receive new features but be more stable than Funtoo-CURRENT by using a frozen portage tree at a specific point in time that is audited for stability.

The Funtoo-STABLE branch is for people who prefer stability and don't need the latest features that are in the RELEASE branches. This branch is frozen for a longer period of time.

Example of 4 month RELEASE cycle, and a 2 year STABLE cycle

For the branch developments: Let's picture a 4 month RELEASE cycle (semi-rolling), and a 2 years STABLE cycle. If we expand this starting from January 2013, we would get the following releases over two years:

Funtoo-13.1-STABLE  (January 2013)
Funtoo-13.2-RELEASE (May 2013)
Funtoo-13.3-RELEASE (September 2013)
Funtoo-14.1-RELEASE (January 2014)
Funtoo-14.2-RELEASE (May 2014)
Funtoo-14.3-RELEASE (September 2014)
Funtoo-15.1-STABLE  (January 2015)

This gives you 2 STABLE releases in two years and 5 RELEASEs in between. That's a total of 7 releases. STABLE releases only get bugfixes and security updates. RELEASE are for people that want to get the latest bleeding edge stuff, but still want to be stable within RELEASEs.

For people that are used to the normal Gentoo/Funtoo stuff, you could just stay on the Funtoo-CURRENT branch.

Example of 3 month RELEASE cycle, and a 2 year STABLE cycle

Funtoo-13.1-STABLE  (January 2013)
Funtoo-13.2-RELEASE (April 2013)
Funtoo-13.3-RELEASE (July 2013)
Funtoo-13.4-RELEASE (October 2013)
Funtoo-14.1-RELEASE (January 2014)
Funtoo-14.2-RELEASE (April 2014)
Funtoo-14.3-RELEASE (July 2014)
Funtoo-14.4-RELEASE (October 2014)
Funtoo-15.1-STABLE  (January 2015)

If we have have a 3 month (semi-rolling) cycle, we would end up with 2 STABLE releases and 7 RELEASEs within two years. This is a total of 9 releases.

What will these branches contain? What will they focus on?

Funtoo-RELEASE and Funtoo-STABLE branches will only focus on the stability of specific packages that we are deciding to maintain at a specific point in time. All outside packages can be installed and maintained by outside package mantainers.

A Complete Core OS

An operating system is not just a stage3 tarball. The stage3 will not boot by itself, but rather needs the user to compile a kernel and install a bootloader. We should have a well tested default kernel that is tested for stability. This will speed up deployments and will provide predictability for kernel modules, and other applications that rely on a kernel. We will also need to provide a way for the system to boot this kernel. Thus a default bootloader should be provided.

Core OS:

  • stage3 (Minimal @system applications needed for a functional Funtoo base system)
  • kernel (bliss-kernel can become the base of funtoo-kernel - or another kernel you think is good)
  • bootloader (a default bootloader to provide a seamless, fast, and easy deployment experience)

Monitored Set of Applications

In order for us to make a release stable, we will need to monitor a set of applications that we believe are essential for people that want to install servers and desktops. All of the monitored applications should work fine, they should be able to compile with no bugs (If the user is compiling), and they will also have binaries available. (The binaries will be compiled with the default and recommended USE flags that Funtoo developers believe give a functional binary).

Proposed set of packages:

Core Applications:

  • Critical packages of stage3 that provide the Funtoo base system.

Server Applications:

Name Port
Apache www-servers/apache
Nginx www-servers/nginx
MariaDB dev-db/mariadb
MySQL dev-db/mysql
PostgreSQL dev-db/postgre-server
SQLite dev-db/sqlite
PHP dev-lang/php
Python dev-lang/python
Ruby dev-lang/ruby
Perl dev-lang/perl
DRBD sys-cluster/drbd
Puppet app-admin/puppet
Heartbeat sys-cluster/heartbeat
Pacemaker sys-cluster/pacemaker
Corosync sys-cluster/corosync
phpmyadmin dev-db/phpmyadmin
Fail2Ban net-analyzer/fail2ban
nmap net-analyzer/nmap
traceroute net-analyzer/traceroute
Samba net-fs/samba
NTP net-misc/ntp
Dovecot net-mail/dovecot


Desktop Applications:

Name Port
GNOME gnome-base/gnome
KDE kde-base/kde-meta
XFCE xfce-base/xfce4-meta
Awesome x11-wm/awesome
Ratpoison x11-wm/ratpoison
Xmonad x11-wm/xmonad
Openbox x11-wm/openbox
Fluxbox x11-wm/fluxbox
Firefox www-client/firefox
Google Chrome www-client/google-chrome
Chromium www-client/chromium
Chrome Plugins for Chromium www-plugins/chrome-binary-plugins
Google Talk Plugin www-plugins/google-talkplugin
Adobe Flash Player www-plugins/adobe-flash
OpenJDK dev-java/icedtea
ISO Master app-cdr/isomaster
LibreOffice app-office/libreoffice
GIMP media-gfx/gimp
VLC media-video/vlc
Filezilla net-ftp/filezilla
Pidgin net-im/pidgin
Hexchat net-irc/hexchat

Command Line & Tools Applications:

Name Port
genlop app-portage/genlop
gentoolkit app-portage/gentoolkit
Dash app-shells/dash
GNU Screen app-misc/screen
hddtemp app-admin/hddtemp
logrotate app-admin/logrotate
pwgen app-admin/pwgen
syslog-ng app-admin/syslog-ng
sysstat app-admin/sysstat
Parallel Bzip2 app-arch/pbzip2
Parallel GZ app-arch/pigz
Parallel XZ app-arch/pxz
vim app-editors/vim
nano app-editors/nano
Telnet net-misc/telnet-bsd
Ethtool sys-apps/ethtool
GPT fdisk sys-apps/gptfdisk
smartmon sys-apps/smartmontools
ccache dev-util/ccache
Mutt mail-client/mutt
htop sys-process/htop
lsof sys-process/lsof
vixie-cron sys-process/vixie-cron

Of course this is just a list of applications that I've deemed important for server and desktop users. More applications should be added so that we can filter mostly used and important applications, from other more fringe applications.

Other

/etc/gentoo-release -> /etc/funtoo-release (rename this file)

should contain information for the currently installed release:

Example:

Funtoo-13.1-STABLE  (January 2013)
Funtoo-13.2-RELEASE (May 2013)
Funtoo-13.3-RELEASE (September 2013)
Funtoo-14.1-RELEASE (January 2014)
Funtoo-14.2-RELEASE (May 2014)
Funtoo-14.3-RELEASE (September 2014)
Funtoo-15.1-STABLE  (January 2015)