Intro to Gen Too

download Intro to Gen Too

of 23

Transcript of Intro to Gen Too

  • 8/3/2019 Intro to Gen Too

    1/23

    Introduction to

    Gentoo Linux

    Rajiv Aaron Manglani

    Gentoo Linux Developer

    January 17, 2006

    [email protected] [email protected]

  • 8/3/2019 Intro to Gen Too

    2/23

    Gentoo Linux

    Started in 1999 by Daniel Robbins.

    Source-based meta distribution.

    x86, AMD64, PowerPC, 32-bit and 64-bit Sparc,Alpha, IA64, S/390, HPPA, ARM, and MIPS.

    Active all-volunteer developer community.

    Social contract GPL-2, LGPL, or other OSI-approved license.

    Will never depend on non-free software. Will remain freely available.

    Submit bugs and patches upstream.

    Open development and bug process.

    Gentoo council, arch teams, herds.

  • 8/3/2019 Intro to Gen Too

    3/23

    Philosophy

    Most distributions have tools that manage theentire system. Do you work their way, or do theywork for you?

    Design tools and systems that allow a user to do

    their work efciently as possible, as they see fit.

    Appreciate the richness and flexibility of theLinux and Free Software community.

    Only possible when the tool is designed to

    reflect and transmit the will of the user.

    If the tool forces the user to do things aparticular way, then the tool is working against,rather than for, the user.

  • 8/3/2019 Intro to Gen Too

    4/23

    How I came to Gentoo

    UNIX user since 1991. FreeBSD, Ultrix, A/UX, Solaris, AIX.

    RedHat Linux 6.1 in 1999 for ipchains, mail.

    Switched to Gentoo in the fall of 2002.

    Desktop is a PowerMac G4 dual 533,1gb RAM, 160gb disk, Mac OS X 10.4.

    Main Gentoo machine is an Athlon XP 2500+,1gb RAM, 2x 120gb disks.

    Running Gentoo at work on multiple machines:66mhz 486, dual Pentium III, Athlon-FX,dual dual-core Opteron servers.

  • 8/3/2019 Intro to Gen Too

    5/23

    Binary distros

    Old versions of software, fixes back-ported.

    My choice of MTA: qmail.

    No package management for non-RPM files.

    No package management for programsinstalled from source.

    How do you install Ubuntu on a 486 PC104?

    Why install security updates for packages

    you have never even heard of? Do you reinstall each time a new version

    of Fedora or SuSE comes out?

  • 8/3/2019 Intro to Gen Too

    6/23

    Gentoo features

    glibc 2.3, gcc 3.4, ext3, ReiserFS, XFS, JFS, AFS,ALSA, pcmcia-cs, USB.

    Hardened: SELinux, PaX/Grsecurity.

    XOrg 6.8 and 7.0, OpenGL, nVidia, ATI, KDE 3.4,Gnome 2.12, MySQL 5, PHP 5, Apache 2.0.

    qmail (with mysql and LDAP), postfix, exim.

    udev, GRUB, lilo, milo, silo, yaboot.

    Multiple kernel possibilities Vanilla 2.4.32, 2.6.14, ck-, gentoo-, git-, mm-,

    openmosix-, rsbac-, suspend2-, uclinux-,xbox-, xen- sources.

    Gentoo kernels with preempt, low latency, EVMS.

    Prelinking, ccache, distcc.

  • 8/3/2019 Intro to Gen Too

    7/23

    Portage features

    We provide scripts which download, patch,compile, and install packages.

    Modeled on the ports-based BSD distributions.

    Dependency checking, extreme customization.

    Original source tarballs are downloaded. No need to wait for someone to make a binary package

    for your distribution.

    The user specifies what they want, and the

    system is built to their specifications. Compiles are optimized for your specific hardware.

    E.g. Altivec on PPC chips, Pentium versus Athlon.

    Specify settings once, and all packages are built tothose options.

  • 8/3/2019 Intro to Gen Too

    8/23

    USE flags

    Globally defined list of features. Configure yours in /etc/make.conf.

    USE="-gnome kde qt arts -nls python perloggvorbis opengl sdl -postgres jpeg png

    truetype dvd avi aalib mpeg encode fbcon mmx"

    Each one defines specific functionality for eachpackage to support.

    USE flags generally map onto --configure

    options.

    Install only what you want. No need to trim downa default installation.

    Opt-in versus opt-out.

  • 8/3/2019 Intro to Gen Too

    9/23

    Ebuild scripts

    Easy to read format, clear separation of phases.

    KEYWORDS, DEPEND, PDEPEND, RDEPEND.

    LICENSE, HOMEPAGE.

    Stable versus testing. CPAN/Portage integration.

    Install and manage modules via Portage.

    Package management for perl modules(including uninstall).

    Ebuilds are automatically created for CPAN packages.

  • 8/3/2019 Intro to Gen Too

    10/23

    Installation

    Doesnt it take a long time to install packages? Designed for modern hardware.

    Will run on a Pentium or PPC G3 with 64mb RAM.

    Built-in ccache, distcc support.

    Net connection recommended.

    Secure by default. Because nothing is installed by default.

    Packages are installed into a staging directory,

    then merged.

    Virtual packages.

  • 8/3/2019 Intro to Gen Too

    11/23

    Portage demo

    rsync Local Portage mirror, local repositories.

    Package searching.

    Installation, cleaning, removal.

    Ebuild command for developers.

    etc-update CONFIG_PROTECT

    /var/db/pkg/

  • 8/3/2019 Intro to Gen Too

    12/23

    Installation process

    Currently no graphical installer.

    Just follow the detailed install documents. Boot from CD, setup networking, partition.

    Unpack stage tarball.

    Chroot, configure profile, USE.

    Compile kernel, syslogger.

    Setup fstab, bootloader.

    Unmount, reboot.

  • 8/3/2019 Intro to Gen Too

    13/23

    Stage tarballs

    For specific customization requirements,no longer recommended.

    Stage 1 install Bare-bones. Need to bootstrap, compile gcc, glibc,

    system (make, perl, etc.), kernel, and user environment.

    Stage 2 install Already bootstrapped. Compile system, kernel,

    and user environment. Stage 3 install

    Base system included. Compile kernel and bootmanager.

  • 8/3/2019 Intro to Gen Too

    14/23

    Init scripts

    Named (not numbered) run levels.

    Smart dependencies. Scripts can use or need others.

    Scripts can start before or after others.

    Start / Stop / Pause.

    /etc/runlevels/default/

  • 8/3/2019 Intro to Gen Too

    15/23

    Binary packages

    Build your own, distribute packages to yourmachines. emerge --buildpkg

    FEATURES="buildpkg

    BINHOST Binary packages are portable between systems

    with the same CHOST, CFLAGS, and USE.

    Or use Gentoo Catalyst.

  • 8/3/2019 Intro to Gen Too

    16/23

    Coming soon

    Direct GLSA/Portage integration.

    Mandatory GPG signing of ebuild manifests.

    Portage-ng, Portage 2.1.

    Modular X. x86 arch team.

    Gentoo/FreeBSD, Gentoo/OS X

    Other Gentoo Linux Enhancement Proposals

    (GLEP).

  • 8/3/2019 Intro to Gen Too

    17/23

    Try out Gentoo Linux

    Download from www.gentoo.org. 50-600mb iso images, plus 10-85mb stage files.

    Install CD does not touch your hard drive.

    Unsupported live CDs for x86, PPC, PPC64,

    Alpha, AMD64, HPPA, Sparc. All install CDs are also rescue CDs.

  • 8/3/2019 Intro to Gen Too

    18/23

    Documentation

    Gentoo Handbook. Rated second favorite by LinuxJournal November 2005.

    Installation, FAQs.

    Portage user manual.

    USE flags, ENV.D, Security guide.

    Desktop configuration guide, Gnome, KDE,rc-scripts, ALSA, DRI, power management, Java.

    AFS, OpenMosix, Diskless/LTSP, Printing, IPv6,Virtual Mailhost, mutt, udev, SHOUTCast.

    Developer documentation Ebuild creation, eclass.

    Documentation guide (XML syntax).

  • 8/3/2019 Intro to Gen Too

    19/23

    Gentoo Community

    Close contact with end users.

    Most ebuild scripts are submitted by users.

    IRC channels (on irc.freenode.net). #gentoo isthe largest on the network with 900+ users.

    Web-based forums (on forums.gentoo.org),1000+ posts per day, 100,000+ topics.

    Fully-public bug tracking (bugs.gentoo.org),20,000+ hits per day.

    Gentoo Bug Day.

    Developers attend Linux conventionsaround the world.

  • 8/3/2019 Intro to Gen Too

    20/23

    Staying informed

    News on www.gentoo.org.

    Gentoo Linux Security Announcements (GLSA).

    RDF feeds of news, GLSA, package updates.

    Multiple mailing lists (each architecture,documentation, security).

    Gentoo Weekly News (GWN).

  • 8/3/2019 Intro to Gen Too

    21/23

    Advanced topics

    Gentoo Catalyst.

    equery, genlop, esearch.

    eselect, module-rebuild.

    webapp-config. /etc/portage/

    Embedded systems using uclibc.

    Keychain.

    Bash completion.

    This room, Thursday, January 19, 8 PM.

  • 8/3/2019 Intro to Gen Too

    22/23

    Introduction to

    Gentoo Linux

    Rajiv Aaron Manglani

    Available for consulting andpart- or full-time contracts.

    [email protected] [email protected]

  • 8/3/2019 Intro to Gen Too

    23/23

    Copyright 2006 Rajiv Aaron Manglani. Some rights reserved.

    The Gentoo Linux logo is Copyright 2002 Gentoo Technologies,Inc., used with permission.

    This work is licensed under the Creative Commons Attribution-

    NonCommercial-ShareAlike License. To view a copy of this license,visit or send a letter to Creative Commons, 559 Nathan Abbott Way,Stanford, California 94305, USA.

    Please contact Rajiv Manglani

    for commercial uses of this work.