Solaris 10/11 Prefix Install

From Gentoo Linux Wiki

Jump to: navigation, search

Under Development

This page is currently under development by: Tomasz Pawelczak

It aims to provide you with: Gentoo Prefix Stage3 installation on Solaris 10/11

Concerns or Compliments? Please use the discussion page.

Gentoo.png
Gentoo has an official article on:
Gentoo.png
Gentoo has an official article on:


Contents

[edit] Gentoo Prefix Stage3 installation on Solaris 10/11

This article describes how to quick install Gentoo Prefix from binary (stage3) packages on Solaris 10/11 systems. There are two ways to install Gentoo Prefix, as root in /opt/gentoo (using Solaris package manager) or as any user on any location. First is quicker, but second you can customize freely.

[edit] Installing as root user in /opt/gentoo

[edit] Limitations

  • Root access to Solaris system is required,
  • At least ~500MB free space at /opt,
  • Gentoo Prefix will be installed in /opt/gentoo directory.

[edit] Prerequisite knowledge

This guide assumes that you know how to:

  • check version of Solaris (10 or 11)
  • check arch (x86 or sparc)

[edit] Installing

Note: Currently there is no package for Solaris 11 sparc.
Note: All command below require bash shell.

Packages are available to download from http://mirror.szafa.eu.org/gentoo-prefix-solaris/. First, you have to choose correct arch and system version, then download package.

For x86 run:

wget mirror.szafa.eu.org/gentoo-prefix-solaris/`uname -r`/x86/GPXStage3-Solaris-`uname -r`-i386-x86-latest-v0.2.pkg.bz2

For sparc run:

wget mirror.szafa.eu.org/gentoo-prefix-solaris/`uname -r`/sparc/GPXStage3-Solaris-`uname -r`-sun4u-sparc-latest-v0.2.pkg.bz2

Unpack:

bzip2 -d GPXStage3-Solaris-*latest-v0.2.pkg.bz2

And install:

Note: Answer YES to all questions.
pkgadd -d GPXStage3-Solaris-*latest-v0.2.pkg

After installing execute:

/opt/gentoo/startprefix

and

emerge --sync

to sync Portage tree.

[edit] Uninstalling

To uninstall Gentoo Prefix run:

pkgrm GPXStage3 && rm -rf /opt/gentoo

[edit] Installing as not root user

[edit] Limitations

  • At least ~500MB free space
  • Some time to rebuild system

[edit] Prerequisite knowledge

This guide assumes that you know how to:

  • check version of Solaris (10 or 11)
  • check arch (x86 or sparc)

[edit] Installing

Note: You need to have valid group name from /etc/group.
Note: Currently there is only tarball for Solaris 10 x86.

Packages are available to download from http://mirror.szafa.eu.org/gentoo-prefix-solaris/. First, you have to choose correct arch and system version, then download package.

For x86 run:

wget mirror.szafa.eu.org/gentoo-prefix-solaris/`uname -r`/x86/GPXStage3-Solaris-`uname -r`-i386-latest.tar.bz2

Export $EPREFIX and create directory for Gentoo Prefix:

export EPREFIX="$HOME/gentoo"
mkdir $EPREFIX && cd $EPREFIX

Unpack downloaded tarball:

Note: If you don't have gtar, use bzip2 -d <file_name>.tar.bz2 and then tar xvf <file_name>.tar
gtar -jxvf ../GPXStage3-Solaris-5.10-i386-latest.tar.bz2

Create symbolic link to original build directory:

ln -s $EPREFIX /var/tmp/gentoo

Start Gentoo Prefix:

./startprefix

Once again export $EPREFIX:

export EPREFIX="$HOME/gentoo"

Replace hardcoded path "/var/tmp/gentoo" in all text files:

Note: Ignore errors "No such file or directory"
grep -wlIR "/var/tmp/gentoo" $EPREFIX/  | xargs -n 1 sed -i  -e 's!/var/tmp/gentoo!'${EPREFIX}/'!g'

Remove broken links from etc/make.globals, etc/make.profile and etc/make.globals

unlink etc/profile && unlink etc/make.profile && unlink etc/make.globals

Download original bootstrap script and make him executable:

wget http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/scripts/bootstrap-prefix.sh?format=txt -O ./bootstrap-prefix.sh
chmod 755 bootstrap-prefix.sh

Bootstrap portage:

./bootstrap-prefix.sh $EPREFIX portage

Sync portage:

emerge --sync

Now is good time to setup your make.conf, after that rebuild entire system:

Note: You must rebuild all packages to resolve linking problems
emerge -e system

After rebuilding system it is safe to remove /var/tmp/gentoo link

unlink /var/tmp/gentoo

Now you can use your custom installed Gentoo Prefix :)

[edit] Uninstalling

Simply remove your Gentoo Prefix directory.

Personal tools