Great, thanks for the quick reply I will try this!
Van den Bossche Martial
@Van den Bossche Martial
Latest posts made by Van den Bossche Martial
-
RE: Automatic hardware detection & driver installs in FOG
-
RE: Automatic hardware detection & driver installs in FOG
Hey Andrew, I really like this work but I like to do it more simple.
As we are only using DELL machines at our school I can get cab files containing all drivers per model. I extract these files under /images/drivers/<modelname> and copy the appropriate directory to the client. So I’ve changed your driverinstall.sh a bit to copy these extracted drivers and the folder common to c:\Drivers. I’ ve also changed the registry key in the client image to resemble this:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath: REG_EXPAND_SZ:%SystemRoot%\Inf;c:\DriversSo windows checks c:\drivers for drivers before going to the internet when installing hardware after the client has been imaged.
This should make it all a bit easier and you don’t need the machinedrivers.sh BUT and here is the question: my script does not seem to run.
I’m running fog on ubuntu and placed my scripts in /images/postdownloadscripts on the server. And I’ve made them executable. I don’t know how these scripts are called by FOG, I guess it checks for fog.postdownload in /images/postdownloadscripts and executes that file? In my case it only contains:
#!/bin/sh
This file serves as a starting point to call your custom postimaging scripts.
<SCRIPTNAME> should be changed to the script you’re planning to use.
Syntax of post download scripts are
#. ${postdownpath}<SCRIPTNAME>
${postdownpath}/driverinstall.sh
So I’d like to do some debugging, can I append the output to a file changing this script like this:
${postdownpath}/driverinstall.sh >> /images/drivers/postdownloadscripts.log because I tried this but with no result.Are there perhaps problems with these scripts privileges?
Maybe you can give me some tips on how to better troubleshoot?anyway I like what you’ve done and I will keep searching myself for a solution
Txs!
-
RE: Fog database not correctly installed
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! -
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’);
…