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

From PC-BSD Wiki
Jump to: navigation, search
(Created page with "<noinclude><translate> <!--T:1--> {{UseTOC{{putVers}}|Nav|title=Convert a FreeBSD System to PC-BSD{{R}}}}</noinclude> <!--T:43--> An existing FreeBSD 10.0 installation can b...")
 
 
(16 intermediate revisions by 4 users not shown)
Line 2: Line 2:
  
 
<!--T:1-->
 
<!--T:1-->
{{UseTOC{{putVers}}|Nav|title=Convert a FreeBSD System to PC-BSD{{R}}}}</noinclude>
+
{{UseTOC{{putVers}}|Nav|title=Convert a FreeBSD System to {{pcbsd}}}}</noinclude>
  
 
<!--T:43-->
 
<!--T:43-->
An existing FreeBSD 10.0 installation can be easily converted to either a PC-BSD® desktop or server. This can happen through the installation of a package which is available from the PC-BSD{{R}} package repository. The converted desktop will contain all of the graphical utilities that come with PC-BSD®. The converted server will contain all of their command line equivalents.
+
An existing FreeBSD 10.x installation can be easily converted to either a PC-BSD® desktop or server. This can happen through the installation of a package which is available from the PC-BSD{{R}} package repository. The converted desktop will contain all of the graphical utilities that come with PC-BSD®. The converted server will contain all of their command line equivalents.
 +
 
 +
<!--T:58-->
 +
{{note|icon64=While not required, ZFS is recommended as most of the PC-BSD{{R}} utilities rely on ZFS. Beginning with 10.1, the FreeBSD installer provides an option to create a ZFS pool during installation.}}
  
 
== Switching to the PC-BSD{{R}} pkgng Repository == <!--T:44-->  
 
== Switching to the PC-BSD{{R}} pkgng Repository == <!--T:44-->  
  
 
<!--T:45-->
 
<!--T:45-->
This section demonstrates how to configure a FreeBSD 10.0 system to use the PC-BSD{{R}} pkgng repository. Once this configuration is complete, you can then convert that FreeBSD system to either a PC-BSD{{R}} desktop or a TrueOS® server as described in the next two sections.
+
This section demonstrates how to configure a FreeBSD 10.x system to use the PC-BSD{{R}} pkgng repository. Once this configuration is complete, you can then convert that FreeBSD system to either a PC-BSD{{R}} desktop or a TrueOS® server as described in the next two sections.
 +
 
 +
<!--T:59-->
 +
''' ''Before switching to the PC-BSD{{R}} repository, make sure that pkg is installed on the FreeBSD system!'' ''' If it is not yet installed, you will see the following when you type '''pkg'''. Type in '''y''' to install it.
 +
 
 +
<!--T:60-->
 +
{{txtbox|box='''pkg'''
 +
The package management tool is not yet installed on your system.
 +
Do you want to fetch and install it now? [y/N]: '''y'''}}
 +
 
 +
<!--T:61-->
 +
If '''pkg''' is already installed, you will instead get the error message "not enough arguments" if you just type '''pkg'''.
  
 
<!--T:46-->
 
<!--T:46-->
Start by creating this directory:
+
Next, make sure that pkgng is bootstrapped:
 +
 
 +
<!--T:62-->
 +
{{txtbox|box='''pkg upgrade'''}}
 +
 
 +
<!--T:63-->
 +
Then, disable the FreeBSD package repository:
 +
 
 +
<!--T:64-->
 +
{{txtbox|box='''mv /etc/pkg/FreeBSD.conf /root/FreeBSD.conf-old'''}}
 +
 
 +
<!--T:65-->
 +
Now create this directory:
  
<!--T:47-->
+
<!--T:47-->
'''mkdir -p /usr/local/etc/pkg/repos'''
+
{{txtbox|box='''mkdir -p /usr/local/etc/pkg/repos'''}}
  
 
<!--T:48-->
 
<!--T:48-->
Then, create the file ''/usr/local/etc/pkg/repos/pcbsd.conf'' with the following contents:
+
Then, create the file ''/usr/local/etc/pkg/repos/pcbsd.conf'' with the following contents. When the repository is used, it will automatically grab the correct package set to match the operating system version.
  
 
<!--T:49-->
 
<!--T:49-->
{{txtbox|box=<nowiki>pcbsd: {
+
{{txtbox|box={{B|<nowiki>pcbsd: {
 
         url: "http://pkg.cdn.pcbsd.org/10.0-RELEASE/amd64",
 
         url: "http://pkg.cdn.pcbsd.org/10.0-RELEASE/amd64",
 
         signature_type: "fingerprints",
 
         signature_type: "fingerprints",
 
         fingerprints: "/usr/local/etc/pkg/fingerprints/pcbsd",
 
         fingerprints: "/usr/local/etc/pkg/fingerprints/pcbsd",
 
         enabled: true
 
         enabled: true
       }</nowiki>}}
+
       }</nowiki>}}}}
  
 
<!--T:50-->
 
<!--T:50-->
Line 33: Line 59:
  
 
  <!--T:51-->
 
  <!--T:51-->
 +
{{txtbox|box=
 
'''mkdir -p /usr/local/etc/pkg/fingerprints/pcbsd/revoked'''
 
'''mkdir -p /usr/local/etc/pkg/fingerprints/pcbsd/revoked'''
'''mkdir -p /usr/local/etc/pkg/fingerprints/pcbsd/trusted'''
+
'''mkdir -p /usr/local/etc/pkg/fingerprints/pcbsd/trusted'''}}
  
 
<!--T:52-->
 
<!--T:52-->
 
Then, download the repository's fingerprint file:
 
Then, download the repository's fingerprint file:
  
<!--T:53-->
+
<!--T:53-->
'''fetch --no-verify-peer <nowiki>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=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</nowiki>'''
+
{{txtbox|box=
'''mv pkg.cdn.pcbsd.org.20131209 /usr/local/etc/pkg/fingerprints/pcbsd/trusted/'''
+
'''fetch --no-verify-peer {{https}}raw.githubusercontent.com/pcbsd/pcbsd/ea12c5c833ffa75573fe0f8aec58e7a3fc0ac3f5/src-sh/pcbsd-utils/pc-extractoverlay/ports-overlay/usr/local/etc/pkg/fingerprints/pcbsd/trusted/pkg.cdn.pcbsd.org.20131209'''
 +
'''mv pkg.cdn.pcbsd.org.20131209 /usr/local/etc/pkg/fingerprints/pcbsd/trusted/'''}}
  
 
<!--T:54-->
 
<!--T:54-->
Line 47: Line 75:
  
 
<!--T:55-->
 
<!--T:55-->
{{txtbox|box= '''pkg upgrade -fy'''{{nbsp|65}}}}
+
{{txtbox|box='''pkg upgrade -fy'''}}
  
 
<!--T:56-->
 
<!--T:56-->
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 as described in {{citelink|fbsdh|url=pkgng-intro.html|txt=Section 5.5.3 of the FreeBSD Handbook}}.
+
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 as described in {{citelink|fbsdh|url=pkgng-intro.html|txt=Section 5.4.3 of the FreeBSD Handbook}}.
  
 
== Converting FreeBSD to a PC-BSD{{R}} Desktop == <!--T:16-->
 
== Converting FreeBSD to a PC-BSD{{R}} Desktop == <!--T:16-->
Line 58: Line 86:
  
 
<!--T:57-->
 
<!--T:57-->
{{txtbox|box='''fetch --no-verify-peer -o /etc/freebsd-update.conf '<nowiki>https://github.com/pcbsd/freebsd/raw/master/etc/freebsd-update.conf'</nowiki>'''
+
{{txtbox|box='''fetch --no-verify-peer -o /etc/freebsd-update.conf <nowiki>'</nowiki>{{https}}github.com/pcbsd/freebsd/raw/master/etc/freebsd-update.conf<nowiki>'</nowiki>'''
 
'''freebsd-update fetch'''
 
'''freebsd-update fetch'''
 
'''freebsd-update install'''
 
'''freebsd-update install'''
Line 71: Line 99:
  
 
<!--T:38-->
 
<!--T:38-->
{{txtbox|box= '''touch /var/.runxsetup'''{{nbsp|59}}
+
{{txtbox|box={{B|<nowiki>touch /var/.runxsetup
'''touch /var/.pcbsd-firstboot'''
+
touch /var/.pcbsd-firstboot
'''touch /var/.pcbsd-firstgui'''}}
+
touch /var/.pcbsd-firstgui</nowiki>}}}}
  
 
<!--T:40-->
 
<!--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'''.}}
+
{{note|icon64= If you are using NVIDIA video hardware, load the driver before rebooting into the display wizard by running the command '''pkg install pcbsd-meta-nvidia'''.}}
  
 
== Converting FreeBSD to a TrueOS{{R}} Server == <!--T:26-->
 
== Converting FreeBSD to a TrueOS{{R}} Server == <!--T:26-->

Latest revision as of 00:03, 4 December 2014


Contents


An existing FreeBSD 10.x installation can be easily converted to either a PC-BSD® desktop or server. This can happen through the installation of a package which is available from the PC-BSD® package repository. The converted desktop will contain all of the graphical utilities that come with PC-BSD®. The converted server will contain all of their command line equivalents.

NOTE: While not required, ZFS is recommended as most of the PC-BSD® utilities rely on ZFS. Beginning with 10.1, the FreeBSD installer provides an option to create a ZFS pool during installation.

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

This section demonstrates how to configure a FreeBSD 10.x system to use the PC-BSD® pkgng repository. Once this configuration is complete, you can then convert that FreeBSD system to either a PC-BSD® desktop or a TrueOS® server as described in the next two sections.

Before switching to the PC-BSD® repository, make sure that pkg is installed on the FreeBSD system! If it is not yet installed, you will see the following when you type pkg. Type in y to install it.

pkg

The package management tool is not yet installed on your system.

Do you want to fetch and install it now? [y/N]: y

If pkg is already installed, you will instead get the error message "not enough arguments" if you just type pkg.

Next, make sure that pkgng is bootstrapped:

pkg upgrade

Then, disable the FreeBSD package repository:

mv /etc/pkg/FreeBSD.conf /root/FreeBSD.conf-old

Now create this directory:

mkdir -p /usr/local/etc/pkg/repos

Then, create the file /usr/local/etc/pkg/repos/pcbsd.conf with the following contents. When the repository is used, it will automatically grab the correct package set to match the operating system version.

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

Next, create the following directories:

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

Then, download the repository's fingerprint file:

fetch --no-verify-peer https://raw.githubusercontent.com/pcbsd/pcbsd/ea12c5c833ffa75573fe0f8aec58e7a3fc0ac3f5/src-sh/pcbsd-utils/pc-extractoverlay/ports-overlay/usr/local/etc/pkg/fingerprints/pcbsd/trusted/pkg.cdn.pcbsd.org.20131209 mv pkg.cdn.pcbsd.org.20131209 /usr/local/etc/pkg/fingerprints/pcbsd/trusted/

Finally, update the package database and any installed packages 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 as described in Section 5.4.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:

fetch --no-verify-peer -o /etc/freebsd-update.conf 'https://github.com/pcbsd/freebsd/raw/master/etc/freebsd-update.conf'

freebsd-update fetch freebsd-update install pkg install -fy pcbsd-base rehash pbreg set /PC-BSD/SysType PCBSD pc-extractoverlay ports

pc-extractoverlay desktop

Next, reboot the system. The PC-BSD® login manager will start, allowing you to login to the desktop. If you want to set 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
NOTE: If you are using NVIDIA video hardware, load the driver before rebooting into the display wizard by running the command pkg install pcbsd-meta-nvidia.

[edit] Converting FreeBSD to a TrueOS® Server

If you wish to convert a FreeBSD server to TrueOS®, install the server package instead, then extract the installed utilities:

pkg install -fy pcbsd-utils                                                     

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

pc-extractoverlay server

These steps 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-*.

References


  1. http://www.freebsd.org/doc/en/books/handbook/pkgng-intro.html
Other languages:German 44% • ‎English 100%
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox