Difference between pages "System resurrection" and "Spamtest"

From Funtoo
(Difference between pages)
Jump to: navigation, search
(Building binary packages)
 
 
Line 1: Line 1:
Although it is always possible to resurrect a machine back to life by reinstalling it, it is not always suitable to reinstall from scratch. Sometimes the best approach is to try to repair, or "resurrect," a broken system so that is it fully functional again. This document will show you how to resurrect a broken Funtoo system without reinstalling everything from scratch. 
+
{{#ask:
+
[[Syndicate::Larrythecow.org Planet]]| limit=999
== Building binary packages ==
+
}}
  
The best approach for critical system repair is to boot on a SystemRescueCD or other similar LiveCD, and use this as working platform to resurrect your system.
 
  
For creating binary packages, you can use any of the following for a ''source environment'':
+
{{#ask:
 +
[[Category:People]] [[Geoloc::+]] | limit=999 | format=json
 +
}}
  
* Use the most recent Funtoo stage3 for your architecture
+
{{#ask:
* If available, use a recent system backup (tar or cpio archive) or snapshot
+
[[Category:People]] [[Role type::+]] | limit=99999 | format=json
 +
}}
  
On a working Linux system, which can be either your broken system booted with a LiveCD, or any type of Linux system on your network with similar processor, you will want to build a chroot environment using the "source environment" you selected above, and use this as a platform for building binary packages to restore your system. Once these packages are created, they can be copied to your broken system and installed using the steps later in this document.
 
  
The binary package creation environment would typically be set up as follows:
+
{{#ask:
 +
[[Category:People]] [[Geoloc::+]] | limit=999 | format=category
 +
}}
  
<console>
 
# ##i##install -d /mnt/rescue
 
# ##i##tar xpvf backup.tar.bz2 -C /mnt/rescue
 
# ##i##cp /etc/resolv.conf /mnt/rescue/etc
 
# ##i##mount --bind /proc /mnt/rescue/proc
 
# ##i##mount --bind /sys /mnt/rescue/sys
 
# ##i##mount --bind /dev /mnt/rescue/dev
 
# ##i##mount --bind /dev/pts /mnt/rescue/dev/pts
 
# ##i##chroot /mnt/rescue
 
# ##i##source /etc/profile
 
# ##i##env-update
 
</console>
 
  
No matter of the way you jump in a functional Funtoo/Gentoo environment, the magic command to create a binary package archive once inside is to use the <tt>quickpkg</tt> command. <tt>quickpkg</tt> will capture the package in the exact form it is actually deployed on the environment and create an archive of it placed in <tt>/usr/portage/packages/<package-category>/<package-name>-<package-version>.tbz2</tt>.
+
{{#get_web_data:url=http://ports.funtoo.org/my.json|format=json|data=fcx8664=fcx8664}}
 +
== Funtoo / Gentoo Comparison (funtoo-current, x86-64bit) ==
 +
 +
{{#arraymaptemplate:{{#external_value:fcx8664}}|PkgCompareDisplay|,||}}
  
In the following example capture everything installed within the "source environment" that is related {{Package|sys-devel/gcc}} (4.8.1-r3 is present on the system) is captured in a single archive named <tt>gcc-4.8.1-r3.tbz2</tt> located in <tt>/usr/portage/packages/sys-devel</tt>:
+
== Widgets ==
 +
{{#widget:MonthlyDonate}}
 +
{{#widget:Donate|blurb=Your support helps Funtoo grow! Donate via PayPal Today.}}
 +
{{#widget:DonateBitcoin|blurb=Use Bitcoin to support Funtoo.}}
 +
{{Litecoin|blurb=Check it out: Mine litecoins for Funtoo!}}{{#widget:DonateBitcoin|blurb=Your support helps Funtoo grow! Donate Today.}}
  
<console>
+
{{
# ##i##quickpkg sys-devel/gcc
+
#ask:
</console>
+
[[Category:People]]
 +
| ?geoloc
 +
| limit=99999
 +
}}
  
If you need to recompile a package instead of archiving an already deployed version (and of course without installing it on your "source environment"), just do:
+
{{#ask: [[Overlay::funtoo-overlay]]
 +
| ? Ebuild
 +
| ? Maintained by
 +
| ? Overlay
 +
}}
 +
 +
{{#ask: [[Ebuild::+]]
 +
| ? Ebuild
 +
| ? Maintained by
 +
| ? Overlay
 +
}}
  
<console>
+
{{#show:User:Drobbins|?Email|link=none}}
# ##i##emerge --buildpkgonly sys-devel/gcc
+
{{#ask: [[Category:People]]
</console>
+
| ? Full name
 +
| ? Nick
 +
| ? Role desc
 +
| ? Start date
 +
| ? Geoloc
 +
| format=template
 +
| template=TeamList
 +
| link=none
 +
}}
 +
{{#gravatar_img:drobbins@funtoo.org}}
 +
[[Special:MyPage]]
  
== Restoring the binary packages on the broken system ==
+
{{Litecoin|blurb=Check it out: Mine litecoins for Funtoo!}}
  
There are a couple of methods that can be used to restore binary packages to a broken system.
+
blarg foo bar
 
+
   
=== Chroot/Emerge Method ===
+
{{#ask: [[Category:People]]
 
+
| ? Full name
This first approach can be used for lightly damaged systems that still have a functional Portage and to which you can still <tt>chroot</tt> and perform all basic Linux commands. To use this method, you would mount your broken system to <tt>/mnt/broken</tt> using steps similar to the way we set up <tt>/mnt/rescue</tt>, above.
+
| ? Geoloc
 
+
}}
Before or after chrooting, copy the binary packages created in the step above in the exact same location on your broken system (e.g. in <tt>/usr/portage/packages/'''sys-devel'''</tt> in the case of <tt>'''sys-devel'''/gcc</tt>).
+
 
+
Once chrooted inside your system, you will be able to merge your packages using <tt>emerge</tt> as follows:
+
 
+
<console>
+
# ##i##emerge -k sys-devel/gcc
+
</console>
+
 
+
=== Tbz2 Extract Method ===
+
 
+
This alternate method for installing binary packages is simpler and does not require the use of the <tt>chroot</tt> command. To prepare for using this approach, you just need to mount all key filesystems to <tt>/mnt/broken</tt> as follows -- and bind mounts are not necessary:
+
 
+
<console>
+
# ##i##install -d /mnt/broken
+
# ##i##mount /dev/sdaX /mnt/broken
+
# ##i##mount /dev/sdaY /mnt/broken/usr
+
</console>
+
 
+
Then, use the following commands to extract the .tbz2 archive to your broken filesystem that you mounted at <tt>/mnt/broken</tt>:
+
 
+
<console>
+
# ##i##tar xjpvf gcc-4.4.5.tbz2 -C /mnt/broken
+
</console>
+
 
+
You will see a note about the trailing garbage at the end of the file being ignored. This is normal -- tar is ignoring the Portage .tbz2 metadata that is tacked on to the end of the file.
+
 
+
At this point, you can set up bind mounts (see <tt>/mnt/rescue</tt> example earlier in this document for those steps), <tt>chroot</tt> inside <tt>/mnt/broken</tt>, and perform a few tests to determine if your issue has been resolved.
+
 
+
== Fixing broken portage ==
+
Sometimes {{Package|sys-apps/portage}} may fail and the above <tt>binpkg</tt> mentioned way to ressurect system will not work because of portage being broken itself. To fix portage manually the following steps required:
+
<console>
+
# ##i##cd /tmp
+
# ##i##wget https://www.github.com/funtoo/portage-funtoo/tarball/funtoo-2.3.3-r4
+
# ##i##tar xf funtoo-2.3.3-r4
+
# ##i##cd funtoo-portage-funtoo-84fe4a7
+
# ##i##rm -rf /usr/lib/portage/*
+
# ##i##cp -a bin pym /usr/lib/portage/
+
# ##i##ln -s /usr/lib/portage/bin/emerge /usr/bin/emerge
+
</console>
+
This will back a working portage again. To ensure everything is consistent re-emerge portage itself immediately.
+
<console>
+
# ##i##emerge portage </console>
+
File collision warning, if any, can be skipped at this point.
+
 
+
= Critical System Packages =
+
 
+
 
+
Several packages at the heart of your Funtoo system, these mainly are:
+
 
+
{| {{Table}}
+
|-
+
!Component
+
!Package
+
!Functional role
+
|-
+
|GNU Binutils
+
|{{Package|sys-devel/binutils}}
+
|Binutils are a set a tools (linker, assembler...) used behind the scene by the GNU Compiler Collection to produce executable files.
+
|-
+
|GNU Compiler collection (GCC)
+
|{{Package|sys-devel/gcc}}
+
|GCC is a collection of compilers for several languages (FORTRAN, Java, C and C++, plus some libraries like the Standard Template Library or ''STL''). A wide spectrum of software in a Funtoo system is written in C/C++.
+
|-
+
|C Library
+
|{{Package|sys-libs/glibc}}
+
|The C library contains an implementation of a wide range of commonly needed functionalities like memory allocation, strings manipulation, I/O operations and so on. It is maybe one of the most critical system components as nearly everything on a Funtoo system depends on this component (including the Python interpreter which executes the vairous Python scripts at the heart of the Funtoo core utilities and package management system).
+
|-
+
|Z library
+
|{{Package|sys-libs/zlib}}
+
|This library contain several lossless compression/decompression routines.It is used by many other components on a Funtoo system like the bzip2/bunzip2 commands (app-arch/bzip2) for example (xz archive utilities depends on another standalone set of libraries).
+
|-
+
|Python
+
|{{Package|dev-lang/python}}
+
|The Python interpreter is the heart of Portage as is written in Python (the same is also true for various second line utilities).
+
|}
+
 
+
= Various weird issues =
+
 
+
'''P1:''' I have a local distfiles mirror and wget complains about not being able to resolve 'localhost'. <br>
+
'''S1:''' libnss (which handles name resolution) is probably damaged or suffers of inconsistencies, in your /etc/make.conf, change 'localhost' in GENTOO_MIRRORS for 127.0.0.1 (IPv4) or ::1 (IPv6)<br>
+
  
'''P2:''' Same problem as described in P1 but I use another machine on my network or a public mirror on the Internet  <br>
+
{{#ask: [[Category:People]] [[Role type:Developer]]
'''S2:''' See the solution given in S1 but with providing the IP of the machine you are downloading for.
+
  |? Full name
 +
}}
  
[[Category:Internals]]
+
#ask:
[[Category:Portage]]
+
[[-Role type::Developer]]
[[Category:HOWTO]]
+
| ?Geoloc
 +
| ?Full Name
 +
| format=map
 +
| width=1000
 +
| height=400
 +
}}

Revision as of 21:49, 18 February 2014


JSON

JSON


0

4

6

A

B

C

D

E

F

G

G cont.

H

I

J

K

L

M

N

N cont.

O

P

R

S

T

V

W

X

Y

Z



Funtoo / Gentoo Comparison (funtoo-current, x86-64bit)

  • x11-drivers/ati-drivers 14.6_beta1 > 14.4
  • app-admin/eselect 1.4.2 > 1.3.8
  • app-admin/salt 2014.1.7 > 2014.1.1
  • media-gfx/blender 2.71 > 2.70-r2
  • sys-kernel/linux-headers 3.15 > 3.13
  • sys-kernel/genkernel 9999-r1 > 3.4.40.7-r2
  • sys-cluster/ploop 1.11 > 1.10
  • sys-cluster/vzctl 4.7.2 > 4.6.1
  • sys-firmware/ipxe 1.0.0_p20130925 > 1.0.0_p20130624-r1
  • dev-util/valgrind 3.9.0 > 3.8.1-r2
  • mail-mta/postfix 2.12_pre20140703 > 2.10.2
  • app-vim/gentoo-syntax 20130619 > 20120916
  • sys-boot/grub 9999-r1 > 2.00-r7
  • net-libs/libnm-qt 0.9.8.2-r1 > 0.9.8.0
  • sys-libs/timezone-data 2014e > 2013g
  • sys-libs/glibc 2.19-r1 > 2.18-r1
  • sys-fs/lvm2 2.02.106 > 2.02.103
  • sys-fs/udev 215 > 171-r10
  • sys-fs/eudev 1.9 > 1.5.3-r2
  • dev-java/oracle-jre-bin 1.8.0.5 > 1.7.0.60
  • dev-java/jython 2.7_beta2 > 2.7_beta1-r1
  • dev-java/oracle-jdk-bin 1.8.0.5 > 1.7.0.60
  • dev-libs/libgpg-error 1.13 > 1.12-r2
  • sys-apps/man-db 2.6.7.1 > 2.6.5
  • sys-apps/iproute2 3.15.0 > 3.11.0
  • sys-apps/coreutils 8.22-r1 > 8.21
  • sys-apps/busybox 1.22.1 > 1.21.1
  • sys-apps/hwids 99999999 > 20140602
  • sys-apps/pciutils 3.2.1 > 3.2.0
  • sys-apps/openrc 0.12.4 > 0.12.3-r3
  • sys-apps/kmod 18-r1 > 15-r1
  • sys-apps/gawk 4.1.1-r1 > 4.1.0
  • virtual/jdk 1.8.0 > 1.7.0
  • virtual/jre 1.8.0 > 1.7.0
  • sys-devel/binutils 2.24-r3 > 2.23.2
  • sys-devel/gcc 4.8.3 > 4.8.2-r2
  • net-wireless/hostapd 2.2 > 2.0
  • net-misc/networkmanager 0.9.8.10-r1 > 0.9.8.2-r2
  • net-misc/dhcpcd 6.4.0 > 6.3.2
  • www-servers/thin 1.6.2 > 1.5.1
  • x11-wm/icewm 1.3.8 > 1.3.7-r2
  • app-shells/bash 4.2_p47 > 4.2_p45-r1
  • app-portage/portage-utils 0.53 > 0.21-r1
  • app-portage/eix 0.30.2 > 0.29.6
  • app-misc/ca-certificates 20140223.3.16-r1 > 20140223.3.15.5
  • app-misc/screenfetch 3.2.2 > 3.0.5

Widgets

Loading map...



drobbins@funtoo.org

Special:MyPage

blarg foo bar

 Full nameGeoloc
0n0w1c35° 39' 10.1963", -97° 28' 41.1434"
404 Error46° 47' 15.7805", -71° 16' 44.8021"
666threesixes66642° 40' 48", -85° 24' 36"
Aaddame52° 2' 10.2588", 5° 9' 25.8588"
AbsmithAdam Smith38° 51' 56.9988", -76° 37' 13.0008"
Admirer48° 20' 15.8068", 15° 24' 12.3422"
AenesidemusOlexandr Burlaka50° 25' 18.5709", 30° 27' 55.5524"
Akai mirror55° 45' 4.4708", 37° 37' 6.3181"
Akiress30° 18' 21.1", -90° 58' 20.4899"
AlfredChenAlfred Chen23° 7' 44.9868", 113° 15' 51.966"
Aliceinwire35° 41' 22.155", 139° 41' 30.143"
AlinAlin Dobre51° 30' 40.37", -0° 7' 11.3678"
Amirouche43° 17' 47.3352", 5° 22' 11.208"
Anak1nanak1n c38° 18' 16.9999", -122° 17' 56"
Angelsystech-19° 55' 8.6437", -43° 56' 18.8689"
Aramis qc47° 2' 39.3806", -70° 57' 14.9069"
ArianaAriana Strangelove40° 3' 45.72", -105° 16' 57.72"
Arkhan-0° 11' 3.2988", -78° 27' 51.6797"
Armanx14° 36' 33.8052", 121° 3' 18.4715"
Asqard49° 37' 2.8326", 20° 42' 55.1974"
Axel55° 45' 0", 37° 37' 12"
AzerthothJames Cook61° 20' 43.4882", -149° 33' 20.5564"
Balticer54° 9' 15.7045", 12° 3' 54.24"
Barnes22° 23' 47.1408", 114° 6' 34.1892"
Bazzle55° 57' 11.7072", -3° 11' 17.7612"
BhundvenBryan Hundven47° 36' 22.3542", -122° 19' 55.4549"
BiberaoMarco Dominguez41° 32' 43.615", -8° 25' 35.4252"
Bladewing49° 46' 46.452", 9° 57' 57.492"
BrantgurgaBrant Gurganus40° 0' 0.6502", -86° 9' 44.8585"
Budong-24° 57' 19.6211", -53° 27' 18.85"
BunykTaras Bunyk49° 50' 22.8588", 24° 1' 46.9812"
Calicojck44° 59' 0.0024", -93° 16' 0.012"
Camtt-35° 0' 17.136", 138° 41' 7.2168"
Carl.su25° 2' 16.836", 121° 33' 54.324"
Carlos-22° 0' 17.5366", -47° 53' 55.6899"
Ccooper34° 3' 12.186", -84° 36' 11.3072"
Changa49° 46' 38.8831", 18° 14' 7.3446"
Ciges42° 12' 49.1494", -8° 44' 28.7956"
CoffnixRaphael Bastos-19° 55' 50.9952", -43° 57' 9.0072"
CorlCor Legemaat-25° 48' 18", 28° 44' 47.0004"
Crater215049° 50' 7.0838", 9° 51' 44.3771"
CroutchFredrik Hede57° 42' 31.932", 11° 58' 28.416"
Cyball51° 27' 52.2324", 7° 54' 48.618"
Cyberian33° 11' 32.5062", 73° 6' 10.8984"
D2 racing46° 47' 5.1036", -71° 21' 18.0151"
D3zd3z32° 55' 17.63", -117° 8' 0.2688"
Da9h0st48° 53' 4.1874", 8° 19' 30.8111"
Daemonalec44° 58' 6.771", -93° 18' 28.9472"
Dagelf-33° 55' 52.5958", 18° 52' 0.8245"
Dakk40° 7' 15.1507", 9° 0' 46.4134"
… further results


  1. ask:

DeveloperValues cannot be assigned to inverse properties. | ?Geoloc | ?Full Name | format=map | width=1000 | height=400 }}