Difference between revisions of "Convert a FreeBSD System to PC-BSD®/9.2"

From PC-BSD Wiki
Jump to: navigation, search
(Converting to PC-BSD)
 
(78 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{NavHome|custompagename=Turn FreeBSD into PC-BSD{{r}}|custompagecategory={{PAGENAME}}}}
+
<noinclude><translate>
  
== Introduction ==
+
<!--T:1-->
 +
{{UseTOC{{putVers}}|Nav|title=Convert a FreeBSD System to PC-BSD{{R}}}}</noinclude>
  
With the changeover to PKGNG as the backend in PC-BSD / TrueOS, it is now easier than ever to convert a FreeBSD system into a PC-BSD desktop or TrueOS server.  
+
<!--T:29-->
 +
PC-BSD® utilities dealing with software installation and upgrades use {{citelink|fbsdh|url=pkgng-intro.html|txt=pkgng}}, FreeBSD's Next Generation package management tool. Part of this change included the creation of a custom PC-BSD® package repository which contains all of the packages that can be built using pkgng. FreeBSD users who use pkgng are also welcome to use the PC-BSD® package repository.
  
Our PKGNG repos can also be used by FreeBSD users who just want access to a full package repo, with frequent updates.  
+
<!--T:30-->
 +
This package repository contains a custom package, called ''pcbsd-base'', which can be used to easily convert an existing FreeBSD installation into a PC-BSD® desktop. It also contains a custom package called ''trueos-base'' which can be used to convert an existing FreeBSD installation into a TrueOS® server. The converted desktop will contain all of the graphical utilities that come with PC-BSD® and the converted server will contain all of their command line equivalents.
  
 +
<!--T:31-->
 +
This section describes how to:
  
 +
<!--T:32-->
 +
* Configure a FreeBSD or PC-BSD® system to use the pkgng repository.
  
== Getting Started ==
+
<!--T:33-->
 +
* Convert a FreeBSD system to a PC-BSD® desktop.
  
On your FreeBSD system, you will first need to install the latest pkgng binaries, located in the ports tree under [[http://www.freshports.org/ports-mgmt/pkg/ ports-mgmt/pkg]]
+
<!--T:34-->
 +
* Convert a FreeBSD system to a TrueOS® server.
  
After installing PKGNG, you'll probably want to run the command "'''pkg2ng'''" to import your existing packages.
+
== Switching to the PC-BSD{{R}} pkgng Repository == <!--T:5-->
  
Next, you will need to setup access to the PC-BSD repository. Start by creating the file '''/usr/local/etc/pkg.conf''' to look like example below:
+
<!--T:6-->
 +
If you are running PC-BSD® 9.2-RELEASE or FreeBSD 9.2 or higher, type '''pkg''' in order to automatically install the software that is required. NOTE: PKGNG will need to be version 1.2.x or higher!
  
{{txtbox|box=packagesite: {{http}}mirrors.isc.org/pub/pcbsd/packages/9.1-RELEASE/amd64
+
<!--T:7-->
PUBKEY: /usr/local/etc/pkg-pubkey.cert
+
Then, run the command '''pkg2ng''' to import your existing package database from the old format to the new pkgng format.  
PKG_CACHEDIR: /usr/local/tmp}}
+
  
You will want to change the packagesite: variable to a particular [http://www.pcbsd.org/getmirrors.php?url=packages PC-BSD mirror] close to your location, and in addition change the 9.1-RELEASE / amd64 to the release / architecture you want to use. Click [http://www.pcbsd.org/getmirrors.php?url=packages here] to get a list of mirrors & package sets available.
+
<!--T:8-->
 +
Next, configure access to the PC-BSD® repository. Start by creating the file ''/usr/local/etc/pkg/repos/pcbsd.conf'' with the following contents:
  
Next you will need to download our repo's [http://trac.pcbsd.org/export/21629/pcbsd/current/src-sh/pc-extractoverlay/desktop-overlay/usr/local/etc/pkg-pubkey.cert public key], and copy it to '''/usr/local/etc/pkg-pubkey.cert'''.
+
<!--T:35-->
 +
{{txtbox|box=<nowiki>pcbsd: {
 +
        url: "http://pkg.cdn.pcbsd.org/9.2-RELEASE/amd64",
 +
        signature_type: "fingerprints",
 +
        fingerprints: "/usr/local/etc/pkg/fingerprints/pcbsd",
 +
        enabled: true
 +
      }</nowiki>}}
  
With this in place, you will probably want to start by updating your packages to the latest versions from the repo. You may do so by running the following command:
 
  
{{txtbox|box={{pound}} pkg upgrade -fy}}
+
<!--T:11-->
 +
Next, create the following directories:
 +
{{txtbox|box='''<nowiki>mkdir /usr/local/etc/pkg/fingerprints/pcbsd/revoked
 +
mkdir /usr/local/etc/pkg/fingerprints/pcbsd/trusted</nowiki>'''}}
  
When that command finishes, you should be good to go! You may now use the '''pkg''' command normally to install / remove / upgrade packages from our repo.  
+
<!--T:45-->
 +
Now download the repository's fingerprint file {{citelink|url=https://github.com/pcbsd/pcbsd/raw/master/src-sh/pc-extractoverlay/ports-overlay/usr/local/etc/pkg/fingerprints/pcbsd/trusted/pkg.cdn.pcbsd.org.20131209|txt=public fingerprint file}}, and copy it to ''/usr/local/etc/pkg/fingerprints/pcbsd/trusted/''.
  
 +
<!--T:12-->
 +
The system is now configured and you now update your packages to the latest versions from the pkgng repository using the following command:
  
=== Converting to PC-BSD ===
+
<!--T:13-->
 +
{{txtbox|box= '''pkg upgrade -fy'''{{nbsp|65}}}}
  
With your initial repo setup complete, it is now easy to convert your system into a PC-BSD desktop using the following commands:
+
<!--T:14-->
 +
Depending upon what is already installed, you may have to resolve some error messages in order to successfully upgrade all packages.
  
{{txtbox|box={{pound}} pkg install -yf pcbsd-base
+
<!--T:15-->
{{pound}} rehash
+
To install and delete packages, use the '''pkg''' command. This command differs in usage from the original package format version. You can learn more about how to use this command in {{citelink|fbsdh|url=pkgng-intro.html|txt=Section 5.5.3 of the FreeBSD Handbook}}.
{{pound}} pbreg set /PC-BSD/SysType PCBSD
+
{{pound}} pc-extractoverlay desktop
+
{{pound}} pc-extractoverlay ports}}
+
  
With these commands finished, you can now reboot and the GDM login manager will be started automatically bringing you to your desktop. If you want to run the PC-BSD display wizard / first boot wizards you can also trigger that before rebooting:
+
== Converting FreeBSD to a PC-BSD{{R}} Desktop == <!--T:16-->
  
{{txtbox|box={{pound}} touch /var/.runxsetup
+
<!--T:17-->
{{pound}} touch /var/.pcbsd-firstboot
+
Once the repository configuration is complete, it is now easy to convert a FreeBSD system into a PC-BSD® desktop using the following commands as the superuser:
{{pound}} touch /var/.pcbsd-firstgui}}
+
  
If you are trying to convert a pre-release FreeBSD, such as 10-CURRENT, you may need to specify the PBI version of what to pull from.
+
<!--T:36-->
 +
{{txtbox|box= '''pkg install -fy pcbsd-base'''{{nbsp|54}}
 +
'''rehash'''
 +
'''pbreg set /PC-BSD/SysType PCBSD'''
 +
'''pc-extractoverlay desktop'''
 +
'''pc-extractoverlay ports'''}}
  
To do so, edit '''/usr/local/etc/pbi.conf''' and add this line:
+
<!--T:37-->
+
Next, reboot the system and the PC-BSD® login manager will start, allowing you to login to the desktop. If you want the {{local|link=Post Installation Configuration and Installation Troubleshooting |PC-BSD® display wizard and first boot wizards}} to run first, run these commands before rebooting:
PBI_FBSDMAJOR: 9
+
  
TIP!
+
<!--T:38-->
 +
{{txtbox|box= '''touch /var/.runxsetup'''{{nbsp|59}}
 +
'''touch /var/.pcbsd-firstboot'''
 +
'''touch /var/.pcbsd-firstgui'''}}
 +
 
 +
<!--T:39-->
 +
If you are running FreeBSD 10-CURRENT, specify the PBI version to pull from.  To do so, edit ''/usr/local/etc/pbi.conf'' and add this line:
 +
 +
{{txtbox|box=PBI_FBSDMAJOR: 9{{nbsp|64}}}}
  
If you are using NVIDIA video hardware you may want to load their driver before rebooting into the display wizard:
+
<!--T:40-->
 +
{{note|icon64= If you are using NVIDIA video hardware, load the driver before rebooting into the display wizard by running the command '''pc-metapkgmanager add NVIDIA'''.}}
  
{{txtbox|box={{pound}} pc-metapkgmanager add NVIDIA}}
+
== Converting FreeBSD to a TrueOS{{R}} Server == <!--T:26-->
  
=== Converting to TrueOS ===
+
<!--T:27-->
 +
If you wish to convert a FreeBSD server to TrueOS®, use the following commands:
  
If you wish to convert your server into TrueOS you can quickly do so using the following commands:
+
<!--T:41-->
 +
{{txtbox|box= '''pkg install -fy trueos-base'''{{nbsp|53}}
 +
'''rehash'''
 +
'''pbreg set /PC-BSD/SysType TRUEOS'''
 +
'''pc-extractoverlay server'''
 +
'''pc-extractoverlay ports'''}}
  
{{txtbox|box={{pound}} pkg install -yf trueos-base
+
<!--T:42-->
{{pound}} rehash
+
The installation of the ''trueos-base'' package will install the following: {{local|link=PBI Manager}}, the command line version of '''{{local|link=Warden®|anchor=Using the Command Line Version of Warden® | warden}}''', and the command line versions of most of the {{local|link=Control Panel}} utilities. You will find those utilities in ''/usr/local/bin/pc-*''. It also installs  {{citelink|url=http://trac.pcbsd.org/browser/build-files/ports-overlay/misc/trueos-base/Makefile|txt=these additional shells and utilities}}.
{{pound}} pbreg set /PC-BSD/SysType TRUEOS
+
</translate>
{{pound}} pc-extractoverlay server
+
<noinclude>
{{pound}} pc-extractoverlay ports}}
+
{{refheading}}
 +
[[category:Convert a FreeBSD System to PC-BSD®]]
 +
[[category:Advanced Installation Topics]]
 +
[[category:handbook]]
 +
<languages/>
 +
</noinclude>

Latest revision as of 16:03, 26 December 2013


Contents


PC-BSD® utilities dealing with software installation and upgrades use pkgng[1], FreeBSD's Next Generation package management tool. Part of this change included the creation of a custom PC-BSD® package repository which contains all of the packages that can be built using pkgng. FreeBSD users who use pkgng are also welcome to use the PC-BSD® package repository.

This package repository contains a custom package, called pcbsd-base, which can be used to easily convert an existing FreeBSD installation into a PC-BSD® desktop. It also contains a custom package called trueos-base which can be used to convert an existing FreeBSD installation into a TrueOS® server. The converted desktop will contain all of the graphical utilities that come with PC-BSD® and the converted server will contain all of their command line equivalents.

This section describes how to:

  • Configure a FreeBSD or PC-BSD® system to use the pkgng repository.
  • Convert a FreeBSD system to a PC-BSD® desktop.
  • Convert a FreeBSD system to a TrueOS® server.

[edit] Switching to the PC-BSD® pkgng Repository

If you are running PC-BSD® 9.2-RELEASE or FreeBSD 9.2 or higher, type pkg in order to automatically install the software that is required. NOTE: PKGNG will need to be version 1.2.x or higher!

Then, run the command pkg2ng to import your existing package database from the old format to the new pkgng format.

Next, configure access to the PC-BSD® repository. Start by creating the file /usr/local/etc/pkg/repos/pcbsd.conf with the following contents:

pcbsd: { url: "http://pkg.cdn.pcbsd.org/9.2-RELEASE/amd64", signature_type: "fingerprints", fingerprints: "/usr/local/etc/pkg/fingerprints/pcbsd", enabled: true }


Next, create the following directories:

mkdir /usr/local/etc/pkg/fingerprints/pcbsd/revoked mkdir /usr/local/etc/pkg/fingerprints/pcbsd/trusted

Now download the repository's fingerprint file public fingerprint file[2], and copy it to /usr/local/etc/pkg/fingerprints/pcbsd/trusted/.

The system is now configured and you now update your packages to the latest versions from the pkgng repository using the following command:

pkg upgrade -fy                                                                 

Depending upon what is already installed, you may have to resolve some error messages in order to successfully upgrade all packages.

To install and delete packages, use the pkg command. This command differs in usage from the original package format version. You can learn more about how to use this command in Section 5.5.3 of the FreeBSD Handbook[1].

[edit] Converting FreeBSD to a PC-BSD® Desktop

Once the repository configuration is complete, it is now easy to convert a FreeBSD system into a PC-BSD® desktop using the following commands as the superuser:

pkg install -fy pcbsd-base                                                      

rehash pbreg set /PC-BSD/SysType PCBSD pc-extractoverlay desktop

pc-extractoverlay ports

Next, reboot the system and the PC-BSD® login manager will start, allowing you to login to the desktop. If you want the PC-BSD® display wizard and first boot wizards to run first, run these commands before rebooting:

touch /var/.runxsetup                                                           

touch /var/.pcbsd-firstboot

touch /var/.pcbsd-firstgui

If you are running FreeBSD 10-CURRENT, specify the PBI version to pull from. To do so, edit /usr/local/etc/pbi.conf and add this line:

PBI_FBSDMAJOR: 9                                                                
NOTE: If you are using NVIDIA video hardware, load the driver before rebooting into the display wizard by running the command pc-metapkgmanager add NVIDIA.

[edit] Converting FreeBSD to a TrueOS® Server

If you wish to convert a FreeBSD server to TrueOS®, use the following commands:

pkg install -fy trueos-base                                                     

rehash pbreg set /PC-BSD/SysType TRUEOS pc-extractoverlay server

pc-extractoverlay ports

The installation of the trueos-base package will install the following: PBI Manager, the command line version of warden, and the command line versions of most of the Control Panel utilities. You will find those utilities in /usr/local/bin/pc-*. It also installs these additional shells and utilities[3].

References


  1. 1.0 1.1 http://www.freebsd.org/doc/en/books/handbook/pkgng-intro.html
  2. https://github.com/pcbsd/pcbsd/raw/master/src-sh/pc-extractoverlay/ports-overlay/usr/local/etc/pkg/fingerprints/pcbsd/trusted/pkg.cdn.pcbsd.org.20131209
  3. http://trac.pcbsd.org/browser/build-files/ports-overlay/misc/trueos-base/Makefile
Other languages:German 20% • ‎English 100% • ‎French 7%
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox