Opps. My fault. It’s amazing you can double and triple check something, and then something like this occurs. Thanks for the fix Tom.
Latest posts made by Chuck Sites
-
RE: Fog 1.2 bug in lib/redhat/functions.sh
-
RE: SVN BUGS
I wonder if we shouldn’t complain the PHP maintainers. A warning like that should not get dumped into logs unless verbosity is really high. Besides, which is more ‘dangerous’. Trusting the system’s timezone with or date_default_timezone_get() or forcing a programmer to fix it to UTC just to avoid an overzealous warning?
-
RE: SVN BUGS
Thanks Tom. Your not going to believe this, the timezone thing is back. I’m seeing this over and over in the logs;
[CODE][Thu Jun 19 18:24:11.832481 2014] [:error] [pid 26346] [client 192.168.1.4:38335] PHP Warning: date_default_timezone_get(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/fog/commons/system.php on line 26, referer: http://192.168.1.4/fog/commons/schemaupdater/index.php[/CODE] -
RE: TFTP boot fails - "the selected boot device failed" - after upgrading to FOG 1.1
Sorry, I didn’t mean to drop a second thread into this question on the “TFTP boot fails”. I thought they were related but I see now this is a different question entirely. When you boot do you get something like this;
[CODE]
Interl Boot Agent GE v1.3.66
Copyright 1997-2010, Intel CorpClient MAC Addr: F0 DE F1 99 72 C6 GUID: 81F1D9AE AA51 CD11 B3A0 8E5CCB381DF1
Client IP: 172.18.68.24 MASK: 255.255.252.0 DHCP IP: 10.20.1.10
GATEWAY IP: 172.18.68.1
TFTP
PXE-M0F: Exiting Intel Boot Agent
[/CODE]If so, what do the Client IP: MASK: and DHCP IP: say? It might be the DHCP server is out in the wrong domain or something like that.
-
RE: SVN BUGS
I also received the same SQL error(s) when installing SVN 1880. Using fresh installs of the fog, when it prompts for Install/Update SQL data base, it always fails with 20/30 different sql fails (a cascading fail). It fails even with a database upgrade.
I am seeing a lot of warnings like this in my httpd/error_log.
[CODE]PHP Warning: mysqli::escape_string(): Couldn’t fetch mysqli in /var/www/html/fog/lib/db/MySQL.class.php on line 247[/CODE]
There are allot of references to MySQL.class.php in the error_log.
[CODE] PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/html/fog/lib/db/MySQL.class.php on line 180, referer: http://192.168.1.4/fog/commons/schemaupdater/index.php[/CODE]Nothing out of the ordinary in mysqld logs.
-
RE: TFTP boot fails - "the selected boot device failed" - after upgrading to FOG 1.1
Problem solved. It was in the PXE Menu. This worked for me; Fog Configuration > PXE Boot Menu > Exit to Hard Drive Type > GRUB Style. It was set on Sansboot Style (default), and Exit Syle did the same ‘PRESS A KEY TO REBOOT’. Should ‘GRUB style’ be default I wonder?
-
RE: TFTP boot fails - "the selected boot device failed" - after upgrading to FOG 1.1
I’m having a very similar problem. PXE works, and I get to the PXE menu, but when I select ‘Boot from hard drive’, It clears the screen and prints “PRESS A KEY TO REBOOT”. Pressing any key reboots.
It’s not a corrupt OS either. If I take the bios route (on a dell; F2-setup and F12 boot device), and select F12 and say boot from HD,
it boots right into windows. This is new and looks like a bug in the ipxe menu. -
RE: Add Mageia in Redhat variants and fix a few things
Well this is most embarrassing. There was one critical line I left out of the Mageia patch. It was installer variable. the bug doesn’t effect redhat users, just us mageia users. I found this out after doing fresh install of FOG svn on a fresh Mageia4 machine.
Tom, if you could install this asap. This is for rev 1871, June 18th.To install, in top level fogserver install directory; “patch -p0 < fog-mageia-patch2.txt”
[CODE]
diff ‘–exclude=*~’ -r -u …/free-ghost-svn/lib/redhat/functions.sh ./lib/redhat/functions.sh
— …/free-ghost-svn/lib/redhat/functions.sh 2014-06-18 15:50:51.697789341 -0400
+++ ./lib/redhat/functions.sh 2014-06-18 16:00:19.806067492 -0400
@@ -551,7 +551,7 @@
if [ “$?” != “0” ]
then
echo " * Installing package: $x";-
yum -y install $x 1>/dev/null;
-
${packageinstaller} $x 1>/dev/null; else echo " * Skipping package: $x (Already installed)"; fi
[/CODE]
[url=“/_imported_xf_attachments/1/1017_fog-mageia-patch2.txt?:”]fog-mageia-patch2.txt[/url]
-
-
RE: Add Mageia in Redhat variants and fix a few things
Here are the patches to Fog svn revision 1859, June 17th (Fog 1.1.1) to Include Mageia in the Redhat variants, This should work for Mageia releases 2,3 and 4. Mageia Linux is the spin off/successor of Madriva which was spun off Mandrake Linux, which was spun off of Redhat. Mageia is my favorite of all of the Linux distros just for ease of use and robust packaging. This patch could be extended to include other Redhat variations like PCLinuxOS, but it uses apt-rpm which I know little about.
The changes are all minimal. There are the file-names and file-installer used by the different distros. There are some changes in the names of the nfs and dhcp services. There are changes in the default location of the tftp directory. Lastly I added a few entries into the dhcp.conf to help with multicasting, and to show how to block dhcp services on a particular network interface (if you have two or more interfaces).
To install, in top level fogserver install directory; “patch -p0 < fog-mageia-patch.txt”
Have fun. The patch is attached below.
[CODE]
diff ‘–exclude=*~’ -r -u …/free-ghost/bin/.install.sh ./bin/.install.sh
— …/free-ghost/bin/.install.sh 2014-06-17 15:12:10.154656509 -0400
+++ ./bin/.install.sh 2014-06-17 13:45:07.530310345 -0400
@@ -25,7 +25,7 @@
. …/lib/common/config.shDetermine Linux release name
-linuxReleaseName=
lsb_release -a 2> /dev/null | grep "Distributor ID" | awk '{print $3,$4,$5,$6,$7,$8,$9}'
;
+linuxReleaseName=lsb_release -a 2> /dev/null | grep "Distributor ID" | awk '{print $3,$4,$5,$6,$7,$8,$9}' | tr -d " "
;
if [ -z “$linuxReleaseName” ];
then
# Fall back incase lsb_release does not exist / fails - use /etc/issue over /etc/release
diff ‘–exclude=*~’ -r -u …/free-ghost/lib/common/functions.sh ./lib/common/functions.sh
— …/free-ghost/lib/common/functions.sh 2014-06-17 15:11:59.027652913 -0400
+++ ./lib/common/functions.sh 2014-06-17 14:09:00.627415217 -0400
@@ -172,7 +172,7 @@
else
echo " What version of Linux would you like to run the installation for?"
echo “”;-
echo " 1) Redhat Based Linux (Redhat, CentOS)";
-
echo " 1) Redhat Based Linux (Redhat, CentOS, Mageia)"; echo " 2) Debian Based Linux (Debian, Ubuntu, Kubuntu, Edubuntu)"; echo ""; echo -n " Choice: [${strSuggestedOS}]";
diff ‘–exclude=*~’ -r -u …/free-ghost/lib/common/input.sh ./lib/common/input.sh
— …/free-ghost/lib/common/input.sh 2014-06-17 15:11:59.027652913 -0400
+++ ./lib/common/input.sh 2014-06-17 14:09:58.643421175 -0400
@@ -23,7 +23,7 @@
strSuggestedOS=“”;#tmpOS=`cat /etc/*release* /etc/issue 2> /dev/null | grep -Ei "Fedora|Redhat|CentOS"`;
-
if [ "`echo $linuxReleaseName | grep -Ei "Fedora|Redhat|CentOS"`" != "" ]
-
if [ "`echo $linuxReleaseName | grep -Ei "Fedora|Redhat|CentOS|Mageia"`" != "" ] then strSuggestedOS="1"; fi
diff ‘–exclude=*~’ -r -u …/free-ghost/lib/redhat/config.sh ./lib/redhat/config.sh
— …/free-ghost/lib/redhat/config.sh 2014-06-17 15:11:59.024652912 -0400
+++ ./lib/redhat/config.sh 2014-06-17 14:21:47.916486069 -0400
@@ -20,12 +20,29 @@Yum packages to install
-packages=“httpd php php-cli php-common php-gd php-mysql mysql mysql-server dhcp tftp-server nfs-utils vsftpd ne
t-tools wget xinetd tar gzip make m4 gcc gcc-c++ lftp”;
-storageNodePackages=“httpd php php-cli php-common php-gd php-mysql mysql nfs-utils vsftpd xinetd tar gzip make
m4 gcc gcc-c++ lftp”;+if [ “$linuxReleaseName” == “Mageia” ];
+then-
Mageia
- packages=“apache apache-mod_php php-gd php-cli php-gettext mariadb mariadb-common mariadb-core mariadb-comm
on-core php-mysql dhcp-server tftp-server nfs-utils vsftpd net-tools wget xinetd tar gzip make m4 gcc gcc-c++ ht
mldoc perl perl-Crypt-PasswdMD5 lftp clamav”; - storageNodePackages=“apache apache-mod_php php-cli php-gettext mariadb mariadb-core mariadb-common mariadb-
common-core php-mysql nfs-utils vsftpd xinetd tar gzip make m4 gcc gcc-c++ lftp”; - packageinstaller=“urpmi --auto”;
+elif [ “linuxReleaseName” == “Fedora” ];
+then-
Fedora
- packages=“httpd php php-cli php-common php-gd php-mysql mysql mysql-server dhcp tftp-server nfs-utils vsftp
d net-tools wget xinetd tar gzip make m4 gcc gcc-c++ lftp”; - storageNodePackages=“httpd php php-cli php-common php-gd php-mysql mysql nfs-utils vsftpd xinetd tar gzip m
ake m4 gcc gcc-c++ lftp”; - packageinstaller=“yum -y install”;
+else -
CentOS or Other PCLinuxOS uses apt-rpm
- packages=“httpd php php-cli php-common php-gd php-mysql mysql mysql-server dhcp tftp-server nfs-utils vsftp
d net-tools wget xinetd tar gzip make m4 gcc gcc-c++ htmldoc lftp clamav”; - storageNodePackages=“httpd php php-cli php-common php-gd php-mysql mysql nfs-utils vsftpd xinetd tar gzip m
ake m4 gcc gcc-c++ lftp”; - packageinstaller=“yum -y install”;
+fi
langPackages=“iso-codes”;
dhcpname=“dhcp”;
+nfsservice=“nfs”;where do the init scripts go?
initdpath=“/etc/rc.d/init.d”;
@@ -69,3 +86,16 @@
freshconf=“/etc/freshclam.conf”;
#freshcron=“/etc/sysconfig/freshclam”
freshcron=“/usr/bin/freshclam”
+
+# Distribution specific changes
+if [ “$linuxReleaseName” == “Mageia” ];
+then- #dhcpd package name
- dhcpname=“dhcp-server”;
-
where do the tftp files go?
- tftpdirdst=“/var/lib/tftpboot”;
-
NFS service name
- nfsservice=“nfs-server”;
-
NFS Subtree Check needed
- nfsexportsopts=“no_subtree_check”;
+fi
diff ‘–exclude=*~’ -r -u …/free-ghost/lib/redhat/functions.sh ./lib/redhat/functions.sh
— …/free-ghost/lib/redhat/functions.sh 2014-06-17 15:11:59.023652912 -0400
+++ ./lib/redhat/functions.sh 2014-06-17 14:55:21.068530873 -0400
@@ -81,13 +81,13 @@
{
echo -n " * Setting up and starting NFS Server…";
-
echo "/images *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure,fsid=1)
-/images/dev *(rw,sync,no_wdelay,no_root_squash,insecure,fsid=2)" > “$nfsconfig”;
-
echo "/images *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure,fsid=1,${nfsexportsopts})
+/images/dev *(rw,sync,no_wdelay,no_root_squash,insecure,fsid=2,${nfsexportsopts})" > “$nfsconfig”;
chkconfig rpcbind on;
service rpcbind restart >/dev/null 2>&1;-
chkconfig nfs on;
-
service nfs restart >/dev/null 2>&1;
-
service nfs status >/dev/null 2>&1;
-
chkconfig ${nfsservice} on;
-
service ${nfsservice} restart >/dev/null 2>&1;
-
service ${nfsservice} status >/dev/null 2>&1; if [ "$?" != "0" ] then echo "Failed!";
@@ -190,7 +190,7 @@
wait = yes
user = root
server = /usr/sbin/in.tftpd-
server_args = -s /tftpboot
-
server_args = -s ${tftpdirdst} disable = no per_source = 11 cps = 100 2
@@ -232,11 +232,33 @@
echo "# DHCP Server Configuration file.see /usr/share/doc/dhcp*/dhcpd.conf.sample
This file was created by FOG
+# Definition of PXE-specific options
+# Code 1: Multicast IP address of bootfile
+# Code 2: UDP port that client should monitor for MTFTP responses
+# Code 3: UDP port that MTFTP servers are using to listen for MTFTP requests
+# Code 4: Number of seconds a client must listen for activity before trying
+# to start a new MTFTP transfer
+# Code 5: Number of seconds a client must listen before trying to restart
+# a MTFTP transfer
+
+option space PXE;
+option PXE.mtftp-ip code 1 = ip-address;
+option PXE.mtftp-cport code 2 = unsigned integer 16;
+option PXE.mtftp-sport code 3 = unsigned integer 16;
+option PXE.mtftp-tmout code 4 = unsigned integer 8;
+option PXE.mtftp-delay code 5 = unsigned integer 8;
+option arch code 93 = unsigned integer 16; # RFC4578
+
use-host-decl-names on;
ddns-update-style interim;
ignore client-updates;
next-server ${ipaddress};+# Specify subnet of ether device you do NOT want serviced. For systems with
+# two or more ethernet devices.
+# subnet 136.165.0.0 netmask 255.255.0.0 { }
+
subnet ${network} netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
range dynamic-bootp ${startrange} ${endrange};
[/CODE][url=“/_imported_xf_attachments/1/1011_fog-mageia-patch.txt?:”]fog-mageia-patch.txt[/url]
-
-
RE: UEFI network boot
Thanks for the quick reply Tom. I tried legacy boot and it just ignored me. For some reason, what looks like a legacy network boot option in bios must be buggy. It always falls into a UEFI IP4 network boot. It also has UEFI IP6 booting too.
I was reading up on network UEFI booting and Red-hat has an excellent discussion on how to configure dhcp to load an efi boot kernel.
The dhcpd.conf has an option to tell if it’s an efi boot request, and if so which arch it is, otherwise it uses a default.
That may be an option for getting a fog UEFI kernel started.