Unoffical Guide To World Update

From Sabayon Wiki
Jump to: navigation, search

World Update and Understanding Configs

Portage (emerge) is not the primary package manager for Sabayon, this article is for advanced users only. In other words if this fails for you, its your fault. You have been warned.


First let me say that there is a several ways to doing things on SL. I am not saying that my way is the best way by any means. This is simply my way of how I do things with a fresh install to make a stable system. You should probably read the other articles below first to better understand things.

First thing - I alway buy my hardware that I know is linux supported and has good drivers. So get to know your hardware, I can't say that enough as it will save you a lot of headaches.

DO NOTE - I can not tell you what you can safely remove from your system as you need to know your hardware and what is safe to uninstall, remove from config files and remove from kernel. I am going to try and stay very basic here so you can get the idea.

Fresh install and everything is working great so now what?

Well I head to the /etc/make.conf file and edit that thing to my liking and double checking things over. I remove any unnecessary things. Remember to edit these files you must be root. If you like nano you can simple go into Konsole and punch in su than enter your password. You can edit the file by doing

nano -w /etc/make.conf

or if you simply must have a GUI you can go to konsole and enter

kdesu konqueror

and when the box pops up, enter your password, wait a bit and a new window will come up. In that window you are root to everything and can edit anything. Pretty simple so far right? If you need help figuring out what options are available in the make.conf then refer to the Gentoo Handbook and Wiki often.

Ok, so now that I got that set I like to head to the kernel and add to it and remove things I don't need by doing in konsole:

# zcat /proc/config.gz > /usr/src/config
# genkernel --kernel-config=/usr/src/config --menuconfig --bootloader=grub --gensplash=sabayon all

or if you use lvm do: - noted for waltercool

# genkernel --kernel-config=/usr/src/config --menuconfig --bootloader=grub --gensplash=sabayon --lvm2 all

note the # means you must be root, don't actually use the #

This step is not necessary if you don't care that your kernel is big. I always need to enable some sound stuff and you may need to enable drivers, again, this is where knowing where your hardware is very important. You remove the wrong thing and your puter will not boot. Skip this step if you have a funny look on your face at this time.

NOTE: Before doing the following 'emerge -e' commands, you may want to customize your CFLAGS in make.conf so that it is optimized for your CPU type. The following two commands take very a long time, so it's worth it to optimize while you are taking the time to do this. Please refer to Gentoo Safe CFLAGS Guide for the correct setting for your specific CPU. Do not change your CHOST as described in that guide, changing CHOST is dangerous and not recommended. See this HOWTO if you wish to risk changing your CHOST.

Now some of you may totally think I am crazy here but as far as software removal I do that later. Yes I know I can remove software at this time that I will never use and save time when I recompile the system, but this is my unofficial stable system and I know it will work cause I have done it several times. So with that being said I want to now recompile just the system. Now I prefer to do :

# emerge -e system || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done

Notice I have not done an emerge --sync yet and I don't want to do that yet, that will come later. So now several hours are going to go by. This a great thing to do when you are about to go to bed. After that is done, I like to do the world recompile:

# emerge -e world || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done

do note once again that I have not used emerge --sync yet and this is going to be another lengthy process. You may do both commands at once by simply doing:

# emerge -e system || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done && emerge -e world || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done

I just like to break it up.

So now I have finished recompiling everything and my processor is going Dude! Well now I punch in:

# emerge --sync && layman -S

to update my portage tree and overlays. First time syncs on SL are slow, I promise they will get faster after the first time. Once that is done I punch in:

# emerge -upDN world

this will pull up just under 400 packages, WOW!! Well lets get the show on the road.

# emerge -uN world

Now you look at that and go what happened to the D ?, again this is my guide and that will come later. Now you are probably sitting there thinking I thought SL doesn't recommend a world update. My feelings are this: no you don't need to, but SL 3.3 makes it a piece of cake to world update. Pre 3.3 I don't recommend, as you will be forever swamped with recompiling. Now with the world update you are going to run into bumps and this is where reading the ERROR MESSAGES is going to come to be Very Important. If you listen to what portage is telling you and use the Gentoo bugzilla and Gentoo forums for searching you can usually find the solution. Once a package fails I simply:

# emerge --resume --skipfirst

to continue on. I like to do this method to see what packages are failing. If you don't care:

# emerge -uN world || until emerge --resume --skipfirst; do emerge --resume --skipfirst; done

then it will auto skip and keep on going till finished. Now I don't try and fix any packages till it is completely done. Once it is done I look look at

#emerge -upN world

and go through each package and install it with the fix needed to get it to install. At this time I will simple remove any packages that have failed that I know I don't need. So now we are done and

# emerge -upN world

shows no packages left in it, time I fire up

# emerge -upDN world

YAY more packages to compile! The amount of packages won't be that much. So we wait for that to finish and I usually fix the errors as it goes along since it isn't very many packages. Now we have the entire system rebuilt, well almost. It's time to run:

# revdep-rebuild

and if that fails do:

# revdep-rebuild 

It will find more packages to recompile! Your processor is probably plotting some sort of revenge against you at this time. So now what? Well, you are gonna have some config files that are screaming for an update. Now I like to use:

# etc-update

There is several ways to update config files, this is my way of doing it. So I punch in etc-update and many will auto merge, which is great with me. I look over the remaining ones left and determine if they are safe or not to update. Off the top of my head I believe all changes in 3.3 are safe, but look and if you are unsure, don't do it. So we have recompiled everything after making changes to system, updated the config files. Are we done? Do we dare reboot? Let's live dangerously and reboot, I mean a reinstall is only 40 minutes to do anyway right?

So we rebooted, prayed and we made it back to our Desktop!! So now, I like all the multimedia features the web has to offer, so I want to experience it all, so I open up my konsole again and punch in:

USE="divx gmedia gtk nls quicktime realmedia wmp" emerge mplayerplug-in

Yes, I know you can add this to your package.use file, but this is my guide and you should add it to your /etc/portage/package.use file for future use. Now I can sit back and view all the goodness of web multimedia! I hate totem handling the web plugins cause it sucks at doing so. I don't uninstall totem I simply move all the totem plugins out of the plugins folder: /usr/lib/nsbrowser/plugins and put em in /usr/lib/nsbrowser Just in case I ever want to put them back.

Alrighty then, we are world updated now. You can continue to stay world update and SL updated with the overlay by:

# emerge --sync && layman -S && emerge -uDN world

A handy automated script for this can be found here: Update Script

Conclusion - my systems are rock solid no matter what I throw at them. It's a long process, but that's fine with me cause the results are worth it. Do keep in mind that it will take less time with the mini as there is less to deal with. It will require thinking and deciphering and good abilities of effective searching. No I can not help you world update your system as I have no idea what hardware you use or what you use your computer for. Is there a chance you may hose your system? Of course there is! It shouldn't happen if you pay attention. I can't stress enough to read the Gentoo Handbook, look at the Gentoo Wiki, look at the Gentoo Forum, look at the SL Wiki, look at the SL Forum and don't forget Google, bookmark them all!

That's it in a nutshell and I take NO and I mean NO Responsibilities for a hosed system. Your millage is going to vary of course depending on what hardware and software you use.

Input is welcome and I will answer questions if I know the answers.


Forum Discussion

Understanding make.conf - An Introduction

    # These settings were set by the catalyst build script that automatically built this stage
    # Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O3 -march=native -funroll-all-loops -m3dnow -msse3 -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -fomit-frame-pointer -pipe"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"
USE="win32codecs mp3 quicktime type1 divx4linux dvb dvd dvdread live mpeg nvidia jpeg truetype v4l v4l2 xv xvid multilib gnutls arts cups ppds foomatic-db alsa gimpprint freetype gnome X gtk gtk2 unicode moznocompose moznoirc moznomail kde qt samba xinerama xine theora kdeenablefinal wifi hal ieee1394 oggvorbis lm_sensors logitech-mouse zeroconf artswrappersuid nptl nptlonly rdesktop dvdr css gphoto2 openexr speex jpeg2k povray scanner musicbrainz accessibility audiofile exif xscreensaver ffmpeg vcd sndfile musepack asterisk mbrola pam_chroot pam_timestamp pwdb pda sms irda kig-scripting speedo browserplugin nsplugin ldap kerberos firefox dga aac dts xvmc dbus hal dvi on-the-fly-crypt dri xprint acpi ada ruby perforce cjk fat hfs jfs ntfs reiser4 xfs reiserfs skins cdda real shout stream a52 wxwindows vlm lirc libcaca remote stats lcd unichrome 7zip commercial mozsvg canvas xml2 glut java glitz svg avahi ogg vorbis aalib flac gdbm mikmod timidity kdgraphics dlloader exscalibar ipod visualization mono cdr nntp cairo djvu nautilus evo ole pdf xml ladspa soundtouch bzip2 udev mad fuse rtsp tiff kdehiddenvisibility dvi usb kipi aiglx musicbrainz pulseaudio dv lame mp3rtp udev cdr dvi djvu libnotify bzip2 aalib startup-notification nsplugin jingle gsm dbox2 opengl sdl png gif qt3 qt4 qt3support apache2 mysql php ssl xml berkdb innobd pcre"
MAKEOPTS="-s -j3"
CONFIG_PROTECT="/usr/kde/3.5/share/config/kdm/ /etc"
VIDEO_CARDS="vesa vga nvidia"
INPUT_DEVICES="evdev keyboard mouse"
LIRC_DEVICES="audio audio_alsa"
PORTAGE_ELOG_CLASSES="warn error log info"
    # FEATURES="buildpkg"
source /usr/portage/local/layman/make.conf
EMERGE_DEFAULT_OPTS="--with-bdeps y"

Above you will find a make.conf and is a vital component to your operating system. If you don't know this file you are defeating the purpose of this distro. One of the biggest things about gentoo based is being able to build the operating sytem to you. Using the default settings are going to work, but you are not taking full advantage of your potentials. You can ease our portage frustration also, like compiling issues.

Why do we need make.conf? Portage uses this file to know how to build your entire system. All the settings you put here, portage reads and builds to them.

CFLAGS CFLAGS are C compiler flags, usually GCC (GNU Compiler Collection) options. CFLAGS are commonly used to specify the architecture of your computer, as well as the CPU you are using and any other special options you would like to enable or disable. This information is important to GCC because it tells it exactly how to customize the assembly instructions it creates from the application's source code.

LDFLAGS Deals with your hash tables and compiler See for more information: Your not going to be touching these, so moving right along.

CHOST Variable declares the target build host for your system You don't want to change this value unless you know what you are doing. You simply can't change it to i686 and go about using your computer. There is situations that may cause you to have to change this. For instance, lets say you upgrade your cpu or need a certain package that won't work with your current architect. Gentoo has a guide for changing it. Follow it closely or you will have a hosed system.

CXXFLAGS CXXFLAGS is set to use all the options present in CFLAGS. This is what you'll want almost without fail. You shouldn't ever need to specify additional options in CXXFLAGS.

USE In Gentoo a USE flag is a representation of an option, a global setting for your final system. USE flags affect how many of the packages on your system will build. These depend on the software and your computer usage. It's important to know these and to thin the list down to your usage. You will see that I have a lot in mine, but that is because of testing I do for SL. All these USE settings are global, meaning they effect every package on your system. The more USE settings you have, the more conflicts you can encounter with portage when compiling software. There is a /etc/portage/package.use file that you can use to individually tell packages how you want them built.

ACCEPT_KEYWORDS="~x86" This is for setting which branch of portage you want to use. Stable vs. Unstable "bleeding edge". You can see by the ~ we are not using the stable branch so we are bleeding edge.

LINGUAS I hope this is self explanatory, but if not - your language

MAKEOPTS You define how many parallel compilations should occur when you install a package. A good choice is the number of CPUs in your system plus one, but this guideline isn't always perfect.

PORTAGE_NICENESS If you keep using your computer while compiling packages you will notice that your box is less responsive than usual. This is caused by having two "groups" of processes with the same nice priority: your usual running processes, and emerge (and its child processes). Now, if you could renice emerge and its children to a higher nice value (i.e. lower priority), compiling would take somewhat longer, but your workstation will be as responsive as before.

FEATURES Portage has several additional features that makes your Gentoo experience even better. Many of these features rely on certain software tools that improve performance, reliability, security, ... Parallel fetch: When you are emerging a series of packages, Portage can fetch the source files for the next package in the list even while it is compiling another package, thus shortening compile times..

CONFIG_PROTECT This variable contains a space-delimited list of directories which should be protected by Portage during updates.

VIDEO_CARDS I see people's make.conf often and in the default make.conf there is like 20 video cards listed. Why compile more than you have too? Get rid of all the cards not in your computer.

INPUT_DEVICES The same goes here, get rid of any equipment you don't have. My desktop doesn't have touchpad - why compile it?

LIRC_DEVICES Linux Infrared Remote Control - this is where you are going to set your devices

source /usr/portage/local/layman/make.conf -- location for your layman, for managing your overlays such as sabayon, xeffects, etc....

Extras that I have added, just for my own use. You will not see these in a default make.conf

PORTAGE_ELOG_CLASSES Ebuild Logging - Portage can create per-ebuild logfiles, but only when the PORT_LOGDIR variable is set to a location that is writable by Portage (the portage user). By default this variable is unset. If you don't set PORT_LOGDIR, then you won't receive any build logs with the current logging system, though you may receive some logs from the new elog. If you do have PORT_LOGDIR defined and you use elog, you will receive build logs and any logs saved by elog, as explained below.

Portage offers fine-grained control over logging through the use of elog:

  • PORTAGE_ELOG_CLASSES: This is where you set what kinds of messages to be logged. You can use any space-separated combination of info, warn, error, log, and qa.

o info: Logs "einfo" messages printed by an ebuild o warn: Logs "ewarn" messages printed by an ebuild o error: Logs "eerror" messages printed by an ebuild o log: Logs the "elog" messages found in some ebuilds o qa: Logs the "QA Notice" messages printed by an ebuild PORTAGE_ELOG_SYSTEM: This selects the module(s) to process the log messages. If left empty, logging is disabled. You can use any space-separated combination of save, custom, syslog, mail, save_summary, and mail_summary. You must select at least one module in order to use elog.

  • save: This saves one log per package in $PORT_LOGDIR/elog, or /var/log/portage/elog if $PORT_LOGDIR is not defined.
  • custom: Passes all messages to a user-defined command in $PORTAGE_ELOG_COMMAND; this will be discussed later.
  • syslog: Sends all messages to the installed system logger.
  • mail: Passes all messages to a user-defined mailserver in $PORTAGE_ELOG_MAILURI; this will be discussed later. The mail features of elog require >=portage-2.1.1.
  • save_summary: Similar to save, but it merges all messages in $PORT_LOGDIR/elog/summary.log, or /var/log/portage/elog/summary.log if $PORT_LOGDIR is not defined.
  • mail_summary: Similar to mail, but it sends all messages in a single mail when emerge exits. ... t=3&chap=1

    • portage-2.1.3: "echo" - this prints all logged messages again at the end of the emerge

FEATURES="buildpkg" for building your own binary packages and saving them ... OST_server

source /usr/portage/local/layman/make.conf -- location for your layman, for managing your overlays such as sabayon, xeffects, etc....

EMERGE_DEFAULT_OPTS="--with-bdeps y" # considers also build-time deps at dependency calculations

Man Make.conf

Do you see now why it is important to know this file? This file can make your gentoo based distro a much better experience. The gentoo handbook can help you set it up properly. Remember to take full advantage of changes, you need to be using certain flags like emerge --newuse foo. Recompiling your entire sytem and world is what you need to do to take advantage of your changes. Like for me I simple run emerge -uDN --world - that will update and make sure all packages are following my settings. If I changed a USE flag it will rebuild the packages effected and update packages to latest in portage.

Recompiling your system is not going to be easy if you are new to all of this. I recommend getting to know portage and how to work with portage before attempting it. It's something you just don't jump into. Your going to run into all sorts of issues and gonna have to search and find your answers. As of 3.4 you are gonna run into a python update, which requires taking care of first as things will break and need to get updated to the new python. Pending on your system - it can take several days to complete the process. Learn your world file and cleaning it out before starting, this will save many hours of recompiling packages you don't need. The world file is a record of packages which have been specifically installed by the user. More specifically it's a list of packages which the user wants to keep installed and updated on their system. It will not record the dependencies of those packages, but instead uses the dependencies of the currently installed packages to keep track of this information.

You will also want to get yourself familiar with the files in your /etc/portage/ you will need to use them to mask and unmask needed packages. Also use em for telling how certain packages should be built.

Read thru the unofficial guide for a world update viewtopic.php?f=54&t=5531

Best advice - Use the operating system till you know it, than start diving into the depths of the internal stuff. I know it is frustrating for people that are new, but if you give it time and stick with it, it will all come together. If all this information totally terrifies you, than stick with the default settings. Use the information for you knowledge. Topic is open for discussion.

Forum Discussion

Config Files - An Introduction

Without config files the operating sytem would be blah. Are you finding yourself confused with all the messages of portage telling you:

    IMPORTANT: 124 config files in '/usr/share/X11/xkb' need updating

Well unfortunately with the amount of config files on your computer it is impossible to go over them all. I'm going to try and hit on the more important ones that are used more frequently.

Do you have to update your config files? The answer will be yes. Why? Cause things change over time.

How do I update my config files, portage keeps telling me I have config files to update? Well there is several ways to do this, you will need to run one of the following more popular methods.:


Do not and I repeat, do not blindly auto merge config file updates. You can hose your system to the point it won't boot back up. Well there is so many, how do I know if it is safe to or not? Good question and the rule of thumb is - if you have not edited a config file than generally your are safe, but this isn't a sure fire way. Using dispatch-conf will keep a back up copy of you old config files in case you need to restore them. Get to know your config files so you can be aware of certain files.

Remember to edit the config files you need to be root, so you will want to open konsole, type su, enter password and than nano or vi the file. You can do this via GUI too, just open konsole and run kdesu konqueror and when the box comes up, enter you root password and than you will have a root file manager window, gnome users will use gksu nautilus.

/etc/rc.conf - for general, system-wide configuration. Read the comments in the file, it's pretty well explained. If your window manager suddenly changes upon boot, this is one of the first files to check.

/etc/conf.d/xdm - Is what controls your GUI login and window Manager. So if you GUI or login is messed up, be sure to check it out. It's self explanatory.

/etc/hosts - helps in resolving host names to IP addresses for hosts that aren't resolved by your nameserver.

/etc/make.conf - This file contains various variables that are used by Portage. Portage will check the currently-defined environment variables first for any settings.

/boot/grub/grub.conf - Your boot manager so you can boot 1 or more operating systems. This is one of the first screens you will see and is asking for you to choose what operating system to boot.

/etx/X11/xorg.conf - Xorg is the X Window server which allows users to have a graphical environment. Got resolution problems? This file is for you.

/etc/conf.d/net - your network configuration, see /etc/conf.d/net.example for a very well documented example – dhcp, static, wireless, wired networking settings

/etc/resolv.conf - your DNS file, nothing to complicated, but if you can access your router but can't get web pages to load - check this file for DNS settings

/etc/fstab - This file contains the mount points of your partitions. Need to mount a hard drive? Add it here so it is available on every boot up.

/etc/modules.autoload.d/kernel-2.6 - You may have decided to compile some kernel components as modules (as opposed to compiled directly into the kernel) and would like to have them autoloaded on bootup like you did with 2.4. Also, if you installed any external modules from the portage tree you will probably want to autoload them too.

/etc/exports This is great for doing shares on the network using NFS This also works great of sharing portage across multiple computers. You only need to sync one main computer than share your portage so the other computers will connect to your main computer for emerges

This hardly puts a dent in the amount of config files, but those are the ones I run across the most, plus trying to keep it friendly for people new to config files. I could of mentioned like local.start, but that is for experienced people. Gentoo wiki has a small list of config files too:

Generally you can google and find some thing about the config file. Enter into google "gentoo xorg.conf" and you will find your answer. Feel free to add more that I may have missed here.

Forum Discussion


Script to Help Update