Difference between pages "Install/Chroot" and "Package:Layman"

From Funtoo
< Install(Difference between pages)
Jump to navigation Jump to search
(Created page with "=== Chroot into Funtoo === Before chrooting into your new system, there's a few things that need to be done first. You will need to mount /proc and /dev inside your new system...")
 
m
 
Line 1: Line 1:
=== Chroot into Funtoo ===
{{Ebuild
Before chrooting into your new system, there's a few things that need to be done first. You will need to mount /proc and /dev inside your new system. Use the following commands:
|Summary=Tool to manage Gentoo overlays
<console>
|CatPkg=app-portage/layman
# ##i##cd /mnt/funtoo
|Homepage=http://layman.sourceforge.net/
# ##i##mount -t proc none proc
}}
# ##i##mount --rbind /sys sys
Layman is an "overlay" external repository management tool.
# ##i##mount --rbind /dev dev
</console>


<noinclude>
=== Installation ===
{{Note|This is a template that is used as part of the Installation instructions, to describe the process of chrooting into the stage3. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.}}
<console>###i## emerge layman</console>
</noinclude>
[[make.conf]] must source laymans overlays for emerge to pull in packages from external sources.  This line needs to be below everything else in make.conf.
<console>###i## echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf</console>


You'll also want to copy over <code>resolv.conf</code> in order to have proper DNS name resolution from inside the chroot:
=== Using Layman ===
<console>
Fetch, and display a list of overlays:
# ##i##cp /etc/resolv.conf etc
<console>###i## layman -L</console>
</console>


Now you can chroot into your new system. Use <code>env</code> before <code>chroot</code> to ensure that no environment variables from the installation media are used by your new system:
Add an overlay to your system:
<console>###i## layman -a <overlay name></console>


<console>
Delete an overlay from your system:
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l
<console>###i## layman -d <overlay name></console>
</console>


{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <code>uname -r</code> to check whether the system is 32 or 64-bit. You may want append linux32 to the chroot command as a workaround, but it's generally not needed.}}
==== Masking Overlay Packages ====
{{fancyimportant|If you receive the error "<code>chroot: failed to run command `/bin/bash': Exec format error</code>", it is probably because you are running a 32-bit kernel and trying to execute 64-bit code. SystemRescueCd boots with a 32-bit kernel by default.}}
Overlays have the power to override distro packages. To avoid conflicts, mask everything in the overlay, and unmask the packages that are necessary to your system.


It's also a good idea to change the default command prompt while inside the chroot. This will avoid confusion if you have to change terminals. Use this command:
{{file|name=/etc/portage/package.mask|lang=|desc=mask all packages in an overlay|body=
<console>
*/*::overlay-name
# ##i##export PS1="(chroot) $PS1"
}}
</console>


Congratulations! You are now chrooted inside a Funtoo Linux system. Now it's time to get Funtoo Linux properly configured so that Funtoo Linux will boot successfully when your system is restarted.
{{file|name=/etc/portage/package.unmask|lang=|desc=unmask packages to be used|body=
cat-egory/pack-age1
cat-egory/pack-age2
}}
 
==== Sync ====
 
Sync a specific overlays ebuilds:
<console>###i## layman -s <overlay name></console>
 
Sync all overlays:
<console>###i## layman -S</console>
 
Sync all overlays via eix:
<console>###i## eix-sync</console>
 
=== Troubleshooting ===
Problem:
Warning: an installed db file was not found at: ['/var/lib/layman/cache***.xml']
 
Solution:
<console>###i## layman -L</console>
 
{{EbuildFooter}}

Revision as of 12:00, February 3, 2015

Layman

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Layman is an "overlay" external repository management tool.

Installation

root # emerge layman

make.conf must source laymans overlays for emerge to pull in packages from external sources. This line needs to be below everything else in make.conf.

root # echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf

Using Layman

Fetch, and display a list of overlays:

root # layman -L

Add an overlay to your system:

root # layman -a <overlay name>

Delete an overlay from your system:

root # layman -d <overlay name>

Masking Overlay Packages

Overlays have the power to override distro packages. To avoid conflicts, mask everything in the overlay, and unmask the packages that are necessary to your system.

   /etc/portage/package.mask - mask all packages in an overlay
*/*::overlay-name
   /etc/portage/package.unmask - unmask packages to be used
cat-egory/pack-age1
cat-egory/pack-age2

Sync

Sync a specific overlays ebuilds:

root # layman -s <overlay name>

Sync all overlays:

root # layman -S

Sync all overlays via eix:

root # eix-sync

Troubleshooting

Problem: Warning: an installed db file was not found at: ['/var/lib/layman/cache***.xml']

Solution:

root # layman -L