打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
基于Gentoo的发行版Sabayon linux安装指南
userphoto

2011.07.16

关注

官网wiki链接http://wiki.sabayon.org/index.php?title=En:Entropy#Fresh_Install_-_What_to_do.3F

Fresh Install - What to do?

So you just installed a fresh copy of Sabayon Linux and are wondering what to do next.

The first thing to do is of course learn how to use the Entropypackage manager. It is vital to know your package manager. So readfirst, then do.

Using Entropy to upgrade all installed packages

Now that you have learned about the Entropy package manager, let'sget our package list for the package manager current. You will have tobe root to use the commands, so open a terminal and enter su withthe root password and, if you did it correctly, your prompt will changeto a hash symbol (#) to show you are now logged in as the root user. DO NOT use sudo.

# equo update

If you run into problems with that then try:

# equo update --force

Once you have that completed it is vital to get Entropy upgraded tothe latest version before doing a full system upgrade. Upgrade willbring your system to current development.

# equo install entropy sulfur equo  --relaxed# equo conf update

Once the Entropy code is upgraded to the latest version, fully upgrade the rest of your system with these two commands:

# equo update# equo upgrade --ask

Follow what is happening on the screen, as Entropy will show you whatit is going to do and ask for confirmations. The 'equo update' commandwill update the database on your PC with the latest information onpackages available in the Entropy repositories; the 'equo upgrade'command will download from the repositories the binary files for newversions of packages installed on your PC and then install the newversions of those packages. Time of process depends on how manypackages, bandwidth and hardware. After it is done, make sure to:

# equo conf update

You will want to make your selection but you really should get toknow your config files as they will change your system. More than likelymost will select -5. I always look over the config files as I don'twant some of my configs getting overwritten.

Theequo upgrade command does not upgrade the kernel if a new versionhappens to be available in the Entropy repository. If you want toinstall a newer version of the kernel then you must: a) install thenewer kernel manually using equo; b) ensure that the symbolic link tothe kernel sources is pointing to the correct version of the kernelsources (by using the 'eselect kernel' command); c) install thecorresponding kernel modules manually using equo; d) ensure that thecorrect OpenGL implementation for your video driver is selected (byusing the 'eselect opengl' command); e) ensure the new kernel isincluded in the menu in grub.conf (SL 5.1-r1 and earlier) or grub.cfg(SL 5.2 and onwards).

What about using Sulfur?I do not recommend using Sulfur for the initial upgrade. Equo is100x's more reliable and you won't end up with the issues that Sulfurcan cause. So do your initial installation with Equo then look at usingSulfur after that.

Upgrading the Linux kernel

For detailed instructions on updating the kernel using Entropy use the following link:

The kernel image is not upgraded automatically; you have to upgradeit manually. You install a new version of the kernel image as you wouldany other package, i.e. using either the equo command or Sulfur. Forexample, if you currently have the 2.6.35 kernel image installed on yourPC and version 2.6.36 is available in the Entropy repositories then youcan install the new version by entering the command:

# equo install sys-kernel/linux-sabayon-2.6.36

Once you have installed a new version of the kernel image you mustinstall the relevant modules your PC requires, which have been compiledspecifically for that version of the kernel image. When you do this, youmust specify the full package name, including the kernel version, ofthe modules.

For example, if you had just installed the 2.6.36 kernel image(the Entropy package sys-kernel/linux-sabayon-2.6.36) then you wouldhave to install the relevant modules for it like so:

# equo install x11-drivers/ati-drivers-10.10#2.6.36-sabayon

If you do not include the "#2.6.36-sabayon" in the package name then,if the ati-drivers-10.10 package for an earlier version of the kernelhappens to be in the repositories, it would be installed/re-installedinstead of the module you need.

The above example assumes you are using the closed-source FGLRXdriver for an AMD GPU, but the same principle applies if you are usingan NVIDIA closed-source driver with an NVIDIA GPU, or if you are usingany other software that is a kernel module (VirtualBox modules areanother example).

You must also use the 'eselect kernel' command to make thesymbolic link to the kernel sources point to the new version of thekernel sources, and you must use the 'eselect opengl' command to selectthe correct OpenGL implementation for your video driver. The Entropykernel image package will take care of upgrading the Grub2 grub.cfg fileto include the new kernel image in the Grub menu.

The instructions above assume you are upgrading to a laterversion of the kernel, but are equally applicable if you are downgradingto an earlier version of the kernel.

Using Kernel Switcher

kernel-switcher is an easy-to-use tool to simplify upgradingthe kernel in Sabayon Linux. Remember, doing regular upgrades will notupgrade the kernel: you need to invoke a kernel change. This is done toprevent users from breaking their system and then screaming in theforums or in irc.

# kernel-switcher --help>> kernel-switcher - Sabayon Linux Kernel Switcher BETA>>   switch kernel:     kernel-switcher switch <kernel package>>>   list kernels:      kernel-switcher list>>   this help:         kernel-switcher help

The kernel-switcher list command is a nice feature, but can beoverwhelming as it lists all kernels currently available in therepository. You may prefer to use equo search linux-sabayon as linux-sabayon is the Sabayon kernel package. With equo search linux-sabayonyou can see if any newer kernels exist. For example, if you find thatlinux-sabayon-2.6.38 is available as an upgrade, you would upgrade to itas follows:

# kernel-switcher switch linux-sabayon-2.6.38>>  @@ Calculating dependencies …>>  ## [U] [sabayonlinux.org] sys-kernel/linux-firmwares-2.6.38|0   [2.6.37|0]>>  ## [N] [sabayonlinux.org] sys-kernel/linux-sabayon-2.6.38|0>>  ## [N] [sabayonlinux.org] net-wireless/broadcom-sta-5.100.82.38-r1#2.6.38-sabayon|0>>  ## [N] [sabayonlinux.org] x11-drivers/nvidia-drivers-260.19.29#2.6.38-sabayon|0

Notice it pulls the new kernel plus new versions of kernelmodules/drivers that are currently installed. Let it download andinstall everything needed for the new kernel. Once this is done, GRUB 2will reflect the change so that, when you reboot, the new kernel isavailable to select. A few other things need to be done before youreboot: Sometimes the OpenGL libraries get reset and the user findsvideo is not working properly, so you need to check and set them back:

# eselect opengl listAvailable OpenGL implementations:[1]   nvidia *[2]   xorg-x11

In the above example the asterisk indicates that the nvidia OpenGLlibraries are selected, which I do need. If it was set to xorg-x11, Iwould use the following command to select the closed-source OpenGLlibraries:

# eselect opengl set 1

Another thing to check is the symlink to the kernel:

# eselect kernel listAvailable kernel symlink targets:[1]   linux-2.6.37-sabayon[2]   linux-2.6.38-sabayon *

Great, it's set to the new kernel. It is also worth running:

# equo deptest

followed by:

# equo libtest

This will make sure things are proper. Once that is complete, reboot to your new kernel.

Using Portage to upgrade the Entropy code

emergeand layman are Portage commands, Portage is not our package manager butis available to advanced users. Any steps using these commands can besafely ignored.

We changed the overlay to git now, so for <4.1 version you need to do the following:(N.B. This step is optional but recommended.)

# layman -d sabayon# layman -L# layman -a sabayon

If it complains about not having git installed, then do:

# equo install dev-vcs/git

You should also update the Portage package list in case you need touse Portage to install the latest version of Entropy if you run intotrouble upgrading Entropy using the Entropy commands listed earlier.This step is optional but, if you have problems getting Entropy working,you will need to perform this step to get the latest version of Entropyfrom the Sabayon Portage overlay.

# emerge --sync && layman --sync sabayon

If you get an error message that the Sabayon overlay does not exist then you need to add it:

# layman --add sabayon

Note: the first emerge --sync is a little time consuming, but it's a one-time deal.

Now, if you have problems getting the equo update to function orproblems getting latest Entropy installed, you can use emerge to get thelatest version instead. Follow below for how to install Entropy viaPortage:

# emerge entropy equo sulfur

Hopefully now you are ready to start the upgrading process:

# equo upgrade --ask

Before you reboot you should check some things first: Please look at this thread to see what I mean.There can be critical things to take care of first before you cansafely reboot. Generally it's not a big issue, but a kernel change doesrequire some additional work. You will need to reinstall yourdrivers/modules to match the kernel.

Make sure you also grab the kernel sources:

# equo install sabayon-sources

You should also keep your Portage ebuild list updated from time totime, just to be safe. You don't have to do it daily, but maybe once aweek.

  • Note: you do not have to do this step at all, until or unless you run into problems. The following step only speeds up the process later by wasting the time doing it now:
# emerge --sync && layman --sync sabayon

If you get an error message that the Sabayon overlay does not exist then you need to add it:

# layman --add sabayon

Hopping Branches

Switching branches is as easy as typing equo hop [branch], replacethe [branch] with the one you want to hop to. So let's say we are usingSabayon Linux 4.2 and want to jump to branch 5, all we have to do is:

# equo hop 5

Now we need to update our package list with new branch:

# equo update

Always get the latest package manager first:

# equo install entropy equo sulfur --relaxed

Now you are ready to start your upgrade:

# equo upgrade

There could be many packages involved with this and can be timeconsuming so plan a head for this before doing it. Also see thread http://forum.sabayonlinux.org/viewtopic.php?f=54&t=16399 for some good learning on things you will need to check.

Update your config files when done with upgrade:

# equo conf update

Before rebooting:

 -- check your kernel with eselect kernel list and make sure it is correct latest kernel selected, it will have the * next to it.-- check gcc version gcc-config -l and make sure it is on latest one-- check binutils-config -l and make sure it's set-- check eselect opengl list for right driver-- check /boot/grub/grub.conf to make sure it updated properly-- check eselect python list and make sure it's set to the latest one

Do not ever go backwards with your branches, meaning, don't go from Branch 5 back to Branch 4.

Testing Branch / Rolling Releases

Warning - Read first

This branch of Entropy is dangerous. Read this section from beginning to end before doing anything with it.

Let us quickly go through the most common factors that make running the testing branch impractical:

  • A good amount of experience with Portage and related tools is crucial to fix problems that are likely to arise when using the testing branch. Reporting problems encountered on this branch is good and helps with the Sabayon development process, but it is not a way for you to get a fix quickly. Only Portage is likely to do that for you.
  • Solid understanding of Linux (OS including programs) is highly important, too. You can expect to be confronted with new configuration options and non-trivial problems. You will need pretty extensive knowledge to either diagnose and solve, or work around these problems, at a point in time when they have little to no distribution-specific documentation yet - sometimes not even any good documentation at all.
  • High maintenance - just to explicitly state the other consequence of the two points directly above.
  • High bandwidth consumption - there are some package upgrades almost every day, and the amount of upgrades can easily hit a few hundred MB every week.


If you have any doubt about meeting one or more of the criteria outlinedbefore, but need or want to use the testing branch / rolling releasesanyway, it is strongly recommended that you make use of somevirtualization software (and its snapshotting features), rather thandeploying the testing branch in your main installation. That way, ifsome operation goes wrong, you typically won't need to resolve anyissues, but can just revert to the last working snapshot - which will inturn allow you to try a more selective operation, or simply defer theoperation until later. Modern virtualization software can interactfairly nicely with the host, like displaying windows as if they werepart of the host, or share files between host and guest, so this shouldbe the way to go even if you need the most recent version of someprogram in day-to-day use.

Basically use it on your own risk, don't blame us if anythingbreaks and your system doesn't work since its unsupported at this stage.We did tell you about the risks and what is good to think over beforeadding the limbo repo.

Setting it up

You can add this to /etc/entropy/repositories.conf:

    repository|sabayon-limbo|Sabayon Linux Limbo Repository|http://pkg.sabayon.org|http://pkg.sabayon.org#bz2

Our next release is from packages that are put into the LimboRepository. This will keep you rolling consistently all the time. Thisprevents the large amount of packages that hops cause. You will runinto bugs/issues at times, but they are usually sorted pretty quickly.

So after adding that line you can then simply do:

# equo update
# equo upgrade

How often you do it is up to you. Once a day or once a week, whatever works for you.

Adding Entropy Mirror

The file to edit: /etc/entropy/repositories.conf

You may notice a big slowdown with Entropy and the Limbo Repo, so please add this mirror under your existing Limbo line:

File: /etc/entropy/repositories.conf
repository|sabayon-limbo|Sabayon Linux Limbo Repository|http://pkg.sabayonlinux.org/entropy|http://pkg.sabayonlinux.org

so it should look like:

File: /etc/entropy/repositories.conf
repository|sabayon-limbo|Sabayon Linux Limbo Repository|http://pkg.sabayonlinux.org/entropy|http://pkg.sabayonlinux.orgrepository|sabayon-limbo|Sabayon Linux Limbo Repository|http://na.mirror.garr.it/mirrors/sabayonlinux/entropy/|http://na.mirror.garr.it/mirrors/sabayonlinux/entropy#bz2

Now you should have good speeds again. You may have to put a # in front of the top one to force equo to use garr only. For example:

File: /etc/entropy/repositories.conf
# repository|sabayon-limbo|Sabayon Linux Limbo Repository|http://pkg.sabayonlinux.org/entropy|http://pkg.sabayonlinux.orgrepository|sabayon-limbo|Sabayon Linux Limbo Repository|http://na.mirror.garr.it/mirrors/sabayonlinux/entropy/|http://na.mirror.garr.it/mirrors/sabayonlinux/entropy#bz2

Another thing you can do is make it look like:

File: /etc/entropy/repositories.conf
repository|sabayon-limbo|Sabayon Linux Limbo Repository|http://pkg.sabayonlinux.org/entropy|http://pkg.sabayonlinux.orgrepository|sabayon-limbo||http://na.mirror.garr.it/mirrors/sabayonlinux/entropy|

You will still get the update db from pkg site, but it should download the packages from garr. I leave the choice up to you.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Linux kernel编译生成的版本多一个加号“+”
Fedora/Redhat 在线安装更新软件包,yum 篇 ── 给新手指南(转) - 技术文档 - 安装启动 Linux时代 - 开源、自由、共享 - 中国最大的Linux技术社区
SDB:Ndiswrapper
使用git下载linux的kernel源代码
Linux Kernel 3.0新特性概览
Interactive map of Linux kernel
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服