Difference between revisions of "Configuration on Fedora Workstation"

From FOG Project
Jump to: navigation, search
m
m
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
 +
<font color="red">NOTE:</font>The material in this article is very dated. It's still good for reference, but it's advised to instead follow one of these Fedora articles instead, these server articles will work fine on Fedora Workstation as well.
 +
 +
* [[Fedora_21_Server]]
 +
 +
* [[Fedora_23_Server]]
  
  
 
'''
 
'''
== FOG (r2922) Configuration on Fedora 21 Workstation inside Windows Server 2012 Hyper-V using ProxyDHCP ==
+
== FOG (r2922) Configuration on Fedora 21 Workstation inside Windows Server 2012 Hyper-V using Windows Server DHCP ==
 
'''
 
'''
  
Line 9: Line 15:
  
  
Although these instructions were specifically written for r2922 & Fedora 21 (non-updated) inside Hyper-V using proxyDHCP, they might help a lot with other newer versions of Fedora; although these other versions have not been tested. These instructions should work fine if you're not using Hyper-V; maintaining that everything else remains the same.
+
Although these instructions were specifically written for r2922 & Fedora 21 (non-updated) inside Hyper-V using Windows Server DHCP, they might help a lot with other newer versions of Fedora; although these other versions have not been tested. These instructions should work fine if you're not using Hyper-V; maintaining that everything else remains the same.
  
  
Line 25: Line 31:
 
*Everything else is default
 
*Everything else is default
  
 +
For further details about network setup of Hyper-V: https://forums.fogproject.org/topic/4706/hyper-v-server-2012-configuration-for-fog-overview
  
 
==='''Installing Fedora 21'''===
 
==='''Installing Fedora 21'''===
Line 36: Line 43:
 
===='''Configuring your own partitions'''====
 
===='''Configuring your own partitions'''====
  
*Create a directory called /images  and give it as much space as you can. You don’t need to specify the size at first. You can create it and then change the size in the next screen.
+
The one thing with using Fedora (or any red-hat based distro) is that the default partitioning isn't optimal for FOG.
*To give it over 400GB, you’ll need to reduce the “/home” and “/” directories. /” only needs double the amount of ram the system has (8GB). “/home” only needs working space… 20 gigs should be ample.
+
 
 +
Basically, you'd give "swap" the same to double the amount of RAM.
 +
Give "home" just a little for working space.. like 5 gigs.
 +
I'd bump the "boot" partition up to 2 gigs to be future proof.
 +
Finally, give the rest to "/"  (root).
 +
 
 +
Fedora (and most red-hat installers) auto-adjust partition sizes for you if you go over what is available... meaning.. if you are unsure about how much space is left on the drive to assign to "/", and you have a 500GB drive, you can just type something absurd in like 999 GiB and hit "update" and the installer will auto adjust that amount to what is available.
 +
 
 +
===='''Continuing installation'''====
 
*Network & Hostname: FOG (or whatever you like)
 
*Network & Hostname: FOG (or whatever you like)
 
*Click “Begin Installation”
 
*Click “Begin Installation”
Line 46: Line 61:
 
*When install is complete, click Quit.
 
*When install is complete, click Quit.
 
*Shutdown Fedora gracefully via the in-system power button. Then remove the ISO in the settings via Hyper-V.
 
*Shutdown Fedora gracefully via the in-system power button. Then remove the ISO in the settings via Hyper-V.
 
  
 
===='''Pre-Configuration of Fedora 21 for FOG'''====
 
===='''Pre-Configuration of Fedora 21 for FOG'''====
Line 113: Line 127:
 
*Yes, you want to install (this will install "beta" Please download from [http://sourceforge.net/projects/freeghost/files/latest/download?source=files sourceforge] for "Stable")
 
*Yes, you want to install (this will install "beta" Please download from [http://sourceforge.net/projects/freeghost/files/latest/download?source=files sourceforge] for "Stable")
 
<pre>svn co -r 2922 https://svn.code.sf.net/p/freeghost/code/trunk /opt/fog_trunk</pre>
 
<pre>svn co -r 2922 https://svn.code.sf.net/p/freeghost/code/trunk /opt/fog_trunk</pre>
(for newer revisions, change the number to what you want.)
+
(for newer revisions, change the number to what you want. See more info about updating to revisions here: [[Upgrade to trunk]])
  
 
<pre>cd /opt/fog_trunk</pre>
 
<pre>cd /opt/fog_trunk</pre>
Line 138: Line 152:
 
*wait for that to get done.
 
*wait for that to get done.
 
*Press enter in installer.
 
*Press enter in installer.
 
 
==='''Setting up ProxyDHCP'''===
 
 
Create /etc/dnsmasq.d/ltsp.conf using gedit 
 
<pre>gedit /etc/dnsmasq.d/ltsp.conf</pre>
 
*type this stuff in there (or copy paste from this document)
 
 
<pre>port=0
 
log-dhcp
 
tftp-root=/tftpboot
 
dhcp-boot=undionly.kpxe
 
dhcp-option=17,/images
 
dhcp-option=vendor:PXEClient,6,2b
 
dhcp-no-override
 
pxe-prompt="Press F8 for boot menu", 3
 
pxe-service=X86PC, “Boot from network” undionly
 
pxe-service=X86PC, "Boot from local hard disk", 0
 
dhcp-range=x.x.x.x,proxy</pre>
 
 
*Where you see x.x.x.x,  that should be your FOG server’s IP.
 
 
  
 
==='''Necessary post install configuration'''===
 
==='''Necessary post install configuration'''===
Line 166: Line 158:
 
*Change the fog user’s password using <pre>passwd fog</pre>
 
*Change the fog user’s password using <pre>passwd fog</pre>
 
*enter the Password
 
*enter the Password
*Make a copy of the undionly file you want to use as undionly.0.
 
<pre>cd /opt/fog_trunk/packages/tftp</pre>
 
<pre>cp undionly.kpxe undionly.0</pre>
 
*Restart dnsmasq with <pre>service dnsmasq restart</pre>
 
 
*Create blank file to make Fog check directories  
 
*Create blank file to make Fog check directories  
 
<pre>cd /</pre>
 
<pre>cd /</pre>
Line 315: Line 303:
 
*Start, stop, disable, enable, restart by changing the “status” portion of that command to what you need.
 
*Start, stop, disable, enable, restart by changing the “status” portion of that command to what you need.
  
== Client CMOS Settings for auto-boot to network ==
+
== Client BIOS Settings for auto-boot to network ==
  
  
==='''Dell Optiplex 7010 CMOS configuration'''===
+
==='''Dell Optiplex 7010 BIOS configuration'''===
  
 
*F12 while system is powered on.
 
*F12 while system is powered on.

Latest revision as of 01:41, 21 April 2016

NOTE:The material in this article is very dated. It's still good for reference, but it's advised to instead follow one of these Fedora articles instead, these server articles will work fine on Fedora Workstation as well.


FOG (r2922) Configuration on Fedora 21 Workstation inside Windows Server 2012 Hyper-V using Windows Server DHCP


Notes: These instructions are intended to be followed IN ORDER.


Although these instructions were specifically written for r2922 & Fedora 21 (non-updated) inside Hyper-V using Windows Server DHCP, they might help a lot with other newer versions of Fedora; although these other versions have not been tested. These instructions should work fine if you're not using Hyper-V; maintaining that everything else remains the same.


Also, these instructions should be good for any SVN above r2922. If you want to check out a newer revision (which I would recommend), simply change the SVN command below to a different number. Keep in mind, you can upgrade but not downgrade (unless using snapshots).


Hyper-V machine settings

  • 4 cores (or higher)
  • 4086 MB of non-dynamic ram.
  • 512GB HDD (large size for storing the images on the v-machine)
  • Ensure v-machine is connected to a working virtual switch (a working internet connection is required during the FOG software installation).
  • set Fedora 21 workstation ISO into the virtual optical drive.
  • Everything else is default

For further details about network setup of Hyper-V: https://forums.fogproject.org/topic/4706/hyper-v-server-2012-configuration-for-fog-overview

Installing Fedora 21

  • Boot the V-Machine
  • Install to Hard drive
  • english & english -> next
  • ‘Automatic partitioning selected’ is not optimal. Say you want to configure them on your own, and then click the “Make partitions automatically” on the left. From there, you can customize the mount points and their sizes.


Configuring your own partitions

The one thing with using Fedora (or any red-hat based distro) is that the default partitioning isn't optimal for FOG.

Basically, you'd give "swap" the same to double the amount of RAM. Give "home" just a little for working space.. like 5 gigs. I'd bump the "boot" partition up to 2 gigs to be future proof. Finally, give the rest to "/" (root).

Fedora (and most red-hat installers) auto-adjust partition sizes for you if you go over what is available... meaning.. if you are unsure about how much space is left on the drive to assign to "/", and you have a 500GB drive, you can just type something absurd in like 999 GiB and hit "update" and the installer will auto adjust that amount to what is available.

Continuing installation

  • Network & Hostname: FOG (or whatever you like)
  • Click “Begin Installation”
  • Set root password to the Password, MAKE NOTE OF THIS (It must be longer than 8 characters and not a dictionary word, otherwise you’ll run into problems later).
  • Make user & Password (I made one called Administrator with a lowercase ‘a’ for the username.)
  • Check ‘Make this user administrator’
  • Wait for Fedora to install….
  • When install is complete, click Quit.
  • Shutdown Fedora gracefully via the in-system power button. Then remove the ISO in the settings via Hyper-V.

Pre-Configuration of Fedora 21 for FOG

  • boot, if given options, choose the non-emergency one.
  • Log in as the user you created. (Administrator)
  • On first login, choose english & then NEXT
  • Standard English keyboard and NEXT
  • Skip online accounts, “SKIP”
  • click “Start using Fedora”
  • Close “Getting Started” because were already started….
  • OPEN THIS DOCUMENT on the FOG Machine! Lots of copy/pasting!


Disable Firewall and SELinux

  • Click “Activities” in top left.
  • Type “Terminal” (this is a lot like windows metro on a desktop, just type what you want)
  • Switch to root with
    su root
  • Enter password set during install
  • Disable the firewall
systemctl disable firewalld.service
  • Disable SELinux by editing /etc/selinux/config
    gedit /etc/selinux/config
Change the line
SELINUX=enforcing
to
SELINUX=disabled
  • save and close.
  • Reboot the machine.


CHECK SETTINGS SO FAR

  • After reboot, verify that the firewall is off, and SELinux is off.
  • log into your Administrator account, open terminal.
  • Switch to root.
    su root
  • Enter your password.
sestatus
should return ‘disabled’
systemctl status firewalld.service
should return “disabled” and “dead”.
  • Don’t close terminal window, don’t exit ‘root’.


Set up a static IP address

  • Click Activities
  • type “settings”, the Settings icon should appear. Click it.
  • Click Network
  • Under the “wired” adapter, click the gear to set up custom settings.
  • Click “IPv4”
  • Enter in the IP you want to use, netmask, gateway, and DNS server information.
  • Click “Apply”
  • For settings to update, turn off the adapter and then turn it back on. (click the slide)
  • Test by trying to visit Google with firefox. Confirm and close.


Configuring existing DHCP server (Windows Server 2012)

Inside your DHCP server, we have to set some options.

  • IPv4 -> Scope -> Scope Options.
  • Right click Scope Options.
  • Enable 066 Boot Server Host Name, enter the FOG server’s IP.
  • Enable 067 Bootfile Name, set it as
    undionly.kpxe


Setting Up Fog

  • install svn
yum install svn
  • Yes, you want to install (this will install "beta" Please download from sourceforge for "Stable")
svn co -r 2922 https://svn.code.sf.net/p/freeghost/code/trunk /opt/fog_trunk

(for newer revisions, change the number to what you want. See more info about updating to revisions here: Upgrade to trunk)

cd /opt/fog_trunk
cd bin
./installfog.sh
  • Choose option 1 (because we are using Fedora)
  • Choose the “normal server” because we want it to do everything (but dhcp)
  • Hit enter to accept the currently assigned IP address.
  • Router Address for the DHCP server -> optional. I said no. You’d need this if you were using the FOG server as a DHCP server.
  • DNS address for the dhcp server ->optional. I said no. You’d need this if you were using the FOG server as a DHCP server.
  • Change default network interface, NO!
  • Use FOG server for DHCP service? NO!
  • Install internationalization support? NO! (“yes” will break FOG running on Fedora)
  • Donate computer resources? NO! (Unless you want to. See wiki information on how that works)
  • Do you wish to continue? Yes!
  • Fog installs…. wait…
  • Make notes of ANY failed package installs…
  • When it asks, the installer directory should be /images (we pre-made this during the Fedora install)
  • Yes, you left the mysql password blank (it’s blank out of the box).
  • Update the database schema by navigating to the provided link.
  • Use a web browser. Address is: x.x.x.x/fog/management You don’t have to use Linux for this, use any computer’s web browser (any computer within your LAN).
  • If it only works in Fedora, check Firewall and SELinux status.
  • click “install/Upgrade Now”.
  • wait for that to get done.
  • Press enter in installer.

Necessary post install configuration

  • Some required file manipulation and permission changes:
  • Change the fog user’s password using
    passwd fog
  • enter the Password
  • Create blank file to make Fog check directories
cd /
touch /images/.mntcheck
touch /images/dev/.mntcheck
  • Edit the FTP settings file with
    gedit /etc/vsftpd/vsftpd.conf
  • add this line to the bottom of the file:
    seccomp_sandbox=NO
  • Save the file.Reboot server


Set the FOG services to start 30 seconds after boot

(necessary with Fedora 21 & r2922. There's an issue with the FOGMulticastManager after a reboot; it's timing related.)


  • Disable FOG services with:
systemctl disable FOG{MulticastManager,Scheduler,SnapinReplicator,ImageReplicator}
Create a startup script with
gedit /etc/rc.d/rc.local
  • Make that file look like below, exactly.
#!/bin/bash
sleep 30
systemctl start FOGMulticastManager
systemctl start FOGScheduler
systemctl start FOGSnapinReplicator
systemctl start FOGImageReplicator
exit 0
  • save the file
  • Then Run this command to make that file executable:
    chmod +x /etc/rc.d/rc.local


FOG Configuration.

  • go to the web interface using
    x.x.x.x/fog/management
  • login (default is fog:password)
  • Click “Storage Management” (network folder looking thing at top).
  • Click “Default Member” in the list.
  • Change management password to the linux fog user’s Password and then click “Update”.
  • Click “Fog Configuration” (blue question mark at top).
  • Click “Fog Settings” on left.
  • Click “TFTP Server”
  • Change Password to the right one.
  • Click Save Changes
  • If you have custom Multicast Settings (like address and port), click Multicast settings and put them in there, and then save the changes.



At this point, you should be done with major configuration.

FOG Server Troubleshooting Help (Fedora 21, r2922 & up)



TFTP Services

  • Check TFTP status with
    systemctl status xinetd.service
    (should be on and green, no errors, and enabled)
  • stop, start, disable and enable TFTP service.
systemctl stop xinetd.service
systemctl start xinetd.service
systemctl enable xinetd.service
systemctl disable xinetd.service


RPC Services

  • Check the status of RPC with
    systemctl status rpcbind
    (should be on and green, no errors, and enabled)
  • Stop, start, disable and enable RPC Service
systemctl stop rpcbind
systemctl start rpcbind
systemctl enable rpcbind
systemctl disable rpcbind


NFS Services

  • Check the status of NFS with
    systemctl status nfs-server
    (should be on and green, no errors, and enabled)
  • stop, start, disable and enable NFS service
systemctl stop nfs-server
systemctl start nfs-server
systemctl enable nfs-server
systemctl disable nfs-server


FTP Services

  • Check the status of FTP with
    systemctl status vsftpd.service
    (should be on and green, no errors, and enabled)
  • stop, start, disable and enable FTP service.
systemctl stop vsftpd.service
systemctl start vsftpd.service
systemctl disable vsftpd.service
systemctl enable vsftpd.service
  • Test that it’s functioning by using a web browser and going to
    ftp://x.x.x.x
  • Use fog / your-fog-account-Password for the credentials
  • You should see “Index of /”


Firewall Service

  • Check the status of the firewall with
    systemctl status firewalld.service
    (should be OFF, no errors, and disabled)
  • stop, start, disable and enable FTP service.
systemctl stop firewalld.service
systemctl start firewalld.service
systemctl disable firewalld.service
systemctl enable firewalld.service


SELinux Service

  • Check the status of SELinux with
    sestatus
    (should be disabled)
  • Disable/enable by editing using
    gedit /etc/selinux/config
    followed by a reboot.


FOGMulticastManager

  • Check status with
    systemctl status FOGMulticastManager.service
    (Should be active, green lit, with no errors)
  • Start, stop, disable, enable, restart by changing the “status” portion of that command to what you need.


FOGImageReplicator

  • Check status with
    systemctl status FOGImageReplicator.service
    (Should be active, green lit, with no errors)
  • Start, stop, disable, enable, restart by changing the “status” portion of that command to what you need.


FOGSnapinReplicator

  • Check status with
    systemctl status FOGSnapinReplicator.service
    (Should be active, green lit, with no errors)
  • Start, stop, disable, enable, restart by changing the “status” portion of that command to what you need.


FOGScheduler

  • Check status with
    systemctl status FOGScheduler.service
    (Should be active, green lit, with no errors)
  • Start, stop, disable, enable, restart by changing the “status” portion of that command to what you need.

Client BIOS Settings for auto-boot to network

Dell Optiplex 7010 BIOS configuration

  • F12 while system is powered on.
  • select “BIOS setup”
  • General -> Boot Sequence
  • “Onboard NIC” should be the first.
  • System Configuration -> Integrated NIC
  • “Enabled w/PXE” should be selected.