Fog database not correctly installed
-
Hello all,
I had to reinstall Fog because my server crashed. So I installed a new one with the latest stable version of ubuntu server ( release 14.04 trusty ) And afterwards installed Fog as this server only has to serve as a Fog server.
But I immediately ran into some problems. The client fog menu at startup did not load unless I paused it during loading time there is already a thread about this but without a solution. ( iPXE issues - work around ) After trying out some suggested solutions and reinstalling everything I noticed the installation of the fog database gave a lot of errors which caused some tables not to be created. Tables like os, taskStates, taskTypes… No wonder some thinks do not work as for instance I could not chose an operating system. I removed the fog database completely in /var/lib/mysql and reinstalled fog but the errors remained.I hope you guys can help.
At the bottom is the output of what went wrong:here is the output: ( a part of it, because this is to long)
[B]Update ID:[/B] 25 - 0
[B]Database Error:[/B]
Table ‘fog
.os
’ already exists
[B]Database SQL:[/B]
CREATE TABLE IF NOT EXISTSfog
.os
(
osID
mediumint(9) NOT NULL AUTO_INCREMENT,
osName
varchar(30) NOT NULL,
osDescription
text NOT NULL,
PRIMARY KEY (osID
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;
[B]Update ID:[/B] 25 - 1
[B]Database Error:[/B]
Table ‘fog.os’ doesn’t exist
[B]Database SQL:[/B]
INSERT INTOfog
.os
(osID
,osName
,osDescription
) VALUES
(1, ‘Windows 2000/XP’, ‘’),
(3, ‘Windows 98’, ‘’),
(2, ‘Windows Vista’, ‘’),
(4, ‘Windows Other’, ‘’),
(5, ‘Windows 7’, ‘’),
(50, ‘Linux’, ‘’),
(99, ‘Other’, ‘’);
[B]Update ID:[/B] 32 - 0
[B]Database Error:[/B]
Table ‘fog
.taskStates
’ already exists
[B]Database SQL:[/B]
CREATE TABLE IF NOT EXISTSfog
.taskStates
(
tsID
int(11) NOT NULL,
tsName
varchar(30) NOT NULL,
tsDescription
text NOT NULL,
tsOrder
tinyint(4) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (tsID
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
[B]Update ID:[/B] 32 - 1
[B]Database Error:[/B]
Table ‘fog.taskStates’ doesn’t exist
[B]Database SQL:[/B]
INSERT INTOfog
.taskStates
(tsID
,tsName
,tsDescription
,tsOrder
) VALUES
(1, ‘Queued’, ‘Task has been created and FOG is waiting for the Host to check-in.’, ‘1’),
(2, ‘In-Progress’, ‘Host is currently Imaging.’, ‘2’),
(3, ‘Complete’, ‘Imaging has been completed.’, ‘3’);
[B]Update ID:[/B] 32 - 18
[B]Database Error:[/B]
Table ‘fog
.taskTypes
’ already exists
[B]Database SQL:[/B]
CREATE TABLE IF NOT EXISTSfog
.taskTypes
(
ttID
mediumint(9) NOT NULL AUTO_INCREMENT,
ttName
varchar(30) NOT NULL,
ttDescription
text NOT NULL,
ttIcon
varchar(30) NOT NULL,
ttKernelTemplate
text NOT NULL,
ttType
enum(‘fog’,‘user’) NOT NULL DEFAULT ‘user’,
ttIsAdvanced
enum(‘0’,‘1’) NOT NULL DEFAULT ‘0’,
ttIsAccess
enum(‘both’,‘host’,‘group’) NOT NULL DEFAULT ‘both’,
PRIMARY KEY (ttID
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;
[B]Update ID:[/B] 32 - 19
[B]Database Error:[/B]
Table ‘fog.taskTypes’ doesn’t exist
[B]Database SQL:[/B]
INSERT INTOfog
.taskTypes
(ttID
,ttName
,ttDescription
,ttIcon
,ttKernelTemplate
,ttType
,ttIsAdvanced
,ttIsAccess
) VALUES
(1, ‘Download’, ‘Deploy action will send an image saved on the FOG server to the client computer with all included snapins.’, ‘senddebug.png’, ‘type=down’, ‘fog’, ‘0’, ‘both’),
(2, ‘Upload’, ‘Upload will pull an image from a client computer that will be saved on the server.’, ‘restoredebug.png’, ‘type=up’, ‘fog’, ‘0’, ‘host’),
(3, ‘Debug’, ‘Debug mode will load the boot image and load a prompt so you can run any commands you wish. When you are done, you must remember to remove the PXE file, by clicking on “Active Tasks” and clicking on the “Kill Task” button.’, ‘debug.png’, ‘type=down mode=debug’, ‘fog’, ‘1’, ‘host’),
(5, ‘Memtest86+’, ‘Memtest86+ loads Memtest86+ on the client computer and will have it continue to run until stopped. When you are done, you must remember to remove the PXE file, by clicking on “Active Tasks” and clicking on the “Kill Task” button.’, ‘memtest.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(6, ‘Disk Surface Test’, ‘Disk Surface Test checks the hard drive’‘s surface sector by sector for any errors and reports back if errors are present.’, ‘surfacetest.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(7, ‘Recover’, ‘Recover loads the photorec utility that can be used to recover lost files from a hard disk. When recovering files, make sure you save them to your NFS volume (ie: /images).’, ‘recover.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(8, ‘Multi-Cast’, ‘Deploy action will send an image saved on the FOG server to the client computer with all included snapins.’, ‘senddebug.png’, ‘’, ‘fog’, ‘0’, ‘group’),
(9, ‘Virus Scan’, ‘Anti-Virus loads Clam AV on the client boot image, updates the scanner and then scans the Windows partition.’, ‘clam.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(10, ‘Hardware Inventory’, ‘The hardware inventory task will boot the client computer and pull basic hardware information from it and report it back to the FOG server.’, ‘inventory.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(11, ‘Password Reset’, ‘Password reset will blank out a Windows user password that may have been lost or forgotten.’, ‘winpass.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(12, ‘All Snapins’, ‘This option allows you to send all the snapins to host without imaging the computer. (Requires FOG Service to be installed on client)’, ‘snap.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(13, ‘Single Snapin’, ‘This option allows you to send a single snapin to a host. (Requires FOG Service to be installed on client)’, ‘snap.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(14, ‘Wake-Up’, ‘Wake Up will attempt to send the Wake-On-LAN packet to the computer to turn the computer on. In switched environments, you typically need to configure your hardware to allow for this (iphelper).’, ‘wake.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(15, ‘Download - Debug’, ‘Download - Debug mode allows FOG to setup the environment to allow you send a specific image to a computer, but instead of sending the image, FOG will leave you at a prompt right before sending. If you actually wish to send the image all you need to do is type “fog” and hit enter.’, ‘senddebug.png’, ‘type=down mode=debug’, ‘fog’, ‘1’, ‘host’),
(16, ‘Upload - Debug’, ‘mode allows FOG to setup the environment to allow you Upload a specific image to a computer, but instead of Upload the image, FOG will leave you at a prompt right before restoring. If you actually wish to Upload the image all you need to do is type “fog” and hit enter.’, ‘restoredebug.png’, ‘type=up mode=debug’, ‘fog’, ‘1’, ‘host’),
(17, ‘Download without Snapins’, ‘Deploy without snapins allows FOG to image the workstation, but after the task is complete any snapins linked to the host or group will NOT be sent.’, ‘sendnosnapin.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(18, ‘Fast Wipe’, ‘Full Wipe will boot the client computer and perform a full disk wipe. This method writes a few passes of random data to the hard disk.’, ‘veryfastwipe.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(19, ‘Normal Wipe’, ‘Normal Wipe will boot the client computer and perform a simple disk wipe. This method writes one pass of zero’‘s to the hard disk.’, ‘quickwipe.png’, ‘’, ‘fog’, ‘1’, ‘both’),
(20, ‘Full Wipe’, ‘Full Wipe will boot the client computer and perform a full disk wipe. This method writes a few passes of random data to the hard disk.’, ‘fullwipe.png’, ‘’, ‘fog’, ‘1’, ‘both’);
… -
@Van den Bossche Martial,
Can you remove the fog database completely?
[code]mysql -u root [ -p’PASSWORDONLYIFYOUHAVEPASSWORD’ ]
drop database fog;
exit[/code]Then try rerunning the database schema?
It looks like maybe a ibdata issue?
Follow this:
[url]https://github.com/mastacontrola/fogproject/issues/1[/url]I don’t know what else the problem is. That said, it should also be known that the Dev team has seen many many issues with Ubuntu 14.04 specifically. While I’m not having the issues others are reporting, they’re far to common and always seem to be related to this particular OS.
-
Hello,
off course, a clean removal of the table, using mysql syntax did the job. (I did it in phpmysql) I think I might have screwed up the database by doing an import of hosts from a csv file. Thanks Tom for your quick reply!
I might also think about your suggestion to return to an earlier version of ubuntu server and restarting completely. Maybe that will solve my ipxe boot issues as well. I do need that startup screen as with my older fog server I was able to do multicast installations and include specific drivers per model. Lucky for me I wrote it all down
Great stuff this FOG server!