Bugs in FOG 0.33
-
I think I’ve found out the issue to the single disk, resizable not operating. I believe it’s due to the start of the 2nd partition being input improperly. It is set in the init.gz /bin/fog file as part2start=105906 but in actuality, the part2start could be found by the fdisk command, hence making it operable for, basically, an windows ntfs system. fdisk -lu will output the partitions in their sector start/end positions. This might help us out a little, maybe. I’ll do some more testing before posting results.
-
so no luck so far with Single Disk, Resizeable. It feels like it’s not making/rewriting after upload a copy of the mbr. For UEFI this shouldn’t be required, but that’s a different story. 105906 is the right start point for part 2. Remember I’m nobody so I was just testing different things. Maybe force the file to copy the mbr before resize, then resize image/upload, then resize back and write mbr back?
I know that’s a lot, but the script could do it all. I just don’t know where to begin.
Thanks,
-
‘I’m nobody’ don’t say that, your contributing
-
I’ve got a busy week ahead of me at work, but I’ll try to look more into this this following weeked. I’ll add the components to my init.gz fog script to rewrite the mbr after the upload and after the reload of sys.img.000 and rec.img.000 and see if this works.
-
Fixed the kernel update system. Just needed a pointed function to do the update.
First things first. Make a copy of the fog.about.kernel.js file and save it as name fog.about.kernel-update.js in {fogwebdir}/management/js
Then copy the FOGConfigurationPage.class.php file to
{fogwebdir}/lib/pagesYou should now be able to update your kernel using the FOG Web GUI.
[url=“/_imported_xf_attachments/0/377_FOGConfigurationPage.class.php?:”]FOGConfigurationPage.class.php[/url]
-
I need to build a .33 VM and add in your edits
-
You want, I can try to rebuild the tarball and post it on my website for download. It’ll need some adjusting for you particular setup, but other than that you should be good? All I’d really have to do is delete the original packages/web directory and place mine in there!. Maybe add my init.gz file to the proper area as well so we don’t have the fog registration system asking you for osID of the host.
Let me know, and I can probably have it up and ready to download by Friday Evening-ish time frame. (I’m on -5hr GMT) So right now it’s about 4:30 PM/1630 EDT or 8:30 PM/2030 GMT.
-
Alright, alright,
So apparently I’m too dedicated to getting this out there. I’ve copied all the changed files to the trunk system. Removed all the .svn folders for compactability. Added the bzImage kernel 3.10.6 and my modified init.gz file.
All web pages should be modified.
Link to download the new tarball is:
[url]https://mastacontrola.com/fog_0.33b.tar.bz2[/url]
Download the file, extract with:
tar -xjf fog_0.33b.tar.bz2
Then install like you normally would. I didn’t copy any of my configuration files so there should be no information pertaining to my system. Hopefully this helps you falko, and whomever else decides to download.
-
[quote=“Tom Elliott, post: 14251, member: 7271”]Alright, alright,
So apparently I’m too dedicated to getting this out there. I’ve copied all the changed files to the trunk system. Removed all the .svn folders for compactability. Added the bzImage kernel 3.10.6 and my modified init.gz file.
All web pages should be modified.
Link to download the new tarball is:
[url]https://mastacontrola.com/fog_0.33b.tar.bz2[/url]
Download the file, extract with:
tar -xjf fog_0.33b.tar.bz2
Then install like you normally would. I didn’t copy any of my configuration files so there should be no information pertaining to my system. Hopefully this helps you falko, and whomever else decides to download.[/quote]
Also, if you decide to use wget to obtain the file use the command:
wget --no-check-certificate [url]http://mastacontrola.com/fog_0.33b.tar.bz2[/url]
-
Found a small issue in the group management system. There is no submenu to create a new group. So I added it.
The modified file is in:
{fogwebdir}/management/includes/submenu.include.php
I will update the tarball, if you’ve already downloaded, just redownload and you’ll be able to create groups. Now I just need to find out how to add a host to the group.
-
Alright, I’m not going to upload with the group attachment. The reason being that I can’t, for the life of me, figure out how it’s adding/modifying groups. I’ll look further and post when I’ve finally figured it out.
-
Alrighty then,
I finally got groups, sort of, working.
So it’s just like the old method for now where when you’re looking at the list of hosts, you can create your group and add systems to a group.
I can also add, under the group management icon, a link to create a new host directly from there. I haven’t, however (sorry guys) figured out how to add a host to a group from within the group management system. Though, if patient enough, I might be able to figure out a way to do so.
The Groups listing doesn’t display naturally. Simple fix, edit the css file. Open up:
{fogwebdir}/management/css/fog.css
Search for the line: action-box, there are 3 of them.
In the first line of action-box, there is a place that say’s, display: none
Set it to :
display: hidden
Then you’ll be good to go for creating and adding systems to groups the method we’re all used to.
I’ll update my fog package, but also post the changed file here as well. It’ll be a few for the tarball to be updated.
Inventory:
{fogwebdir}/management/css/fog.css
{fogwebdir}/lib/pages/GroupManagementPage.class.phpThe GroupManagement part is fully working, but I wanted to give some semblance of operation in this. The membership options current work which didn’t even after I updated my fog.css file.
EDIT:
Tarball is up and running. I may need some help getting the Associative parts of Groups to work: e.g
Image
Snapins Add and Remove
Service Settings
AD
and Printers.OS Association is there, but there really isn’t a need as we don’t need it for the hosts anymore. I’ll look into what else uses it and remove it as needed.
[url=“/_imported_xf_attachments/0/380_GroupManagementPage.class.php?:”]GroupManagementPage.class.php[/url][url=“/_imported_xf_attachments/0/381_fog.css?:”]fog.css[/url]
-
I’ve got a new kernel based on the core config for 3.10.7
I don’t have a lot of hardware to test on, so please test.
It can be downloaded from:
[url]https://mastacontrola.com/fogboot/kernel/bzImage[/url]
OR
wget --no-check-certificate [url]http://mastacontrola.com/fogboot/kernel/bzImage[/url] -
I figured out the image association but I will not post the update until I work out the other sections a little bit. I think I’m getting to the point, that the only reason I have the includes folder is to reference these for the class building.
I hope you guys don’t mind the time as I am, as the true developers, working a full time job with all of this.
-
Ok,
For now I’ve removed the OS Association Field, and create new group menu from the submenu.include.php file, and for ease of use I moved submenu.include.php from:
{fogwebdir}/management/include/submenu.include.php
TO:
{fogwebdir}/commons/submenu.phpI’ll post this file and the updated:
{fogwebdir}/management/index.phpAlso, I’ll post the GroupManagementPage.class.php file.
I’ll update my tarball as well with these changes so far.
Inventory of simple changes:{fogwebdir}/management/index.php (just changed reference of submenu.include.php to submenu.php}
{fogwebdir}/commons/submenu.php (this file has OS Association removed from Group menu. Moved file from management/includes)
{fogwebdir}/lib/pages/GroupManagementPage.class.php (removed OS Association area, included parts for Image Association, and Removing hosts from membership field. Membership area, host names are links to edit host directly if needed.)[url=“/_imported_xf_attachments/0/382_GroupManagementPage.class.php?:”]GroupManagementPage.class.php[/url][url=“/_imported_xf_attachments/0/383_submenu.php?:”]submenu.php[/url][url=“/_imported_xf_attachments/0/384_index.php?:”]index.php[/url]
-
[quote=“Tom Elliott, post: 14297, member: 7271”]I’ve got a new kernel based on the core config for 3.10.7
I don’t have a lot of hardware to test on, so please test.
It can be downloaded from:
[url]https://mastacontrola.com/fogboot/kernel/bzImage[/url]
OR
wget --no-check-certificate [url]http://mastacontrola.com/fogboot/kernel/bzImage[/url][/quote]I can test this monday, thanks
-
I was looking into the init.gz system, but I haven’t been able to figure which parts happen in which order. There’s kind of a lack of comments. So this will be one of the long winded projects, where I try to break the system to figure out exactly what’s happening and when. Hopefully we’ll see partclone working here shortly. I’m actually looking to figuring out how to build partclone into the initrd filesystem and maybe figure out how I can use it.
-
This weekend was rather busy for me, but I did take some time to try out a few things. It looks like the init.gz package from the 899 revision already contains the components for partclone. However, I can’t figure out how to get the /bin/fog script to actually use it. I tried editing the file, especially pertaining to Windows 7, and tried getting it to use part clone with the commands:
partclone.ntfs -c -s <hard drive/partition> -o <file to save as>
and
partclone.restore -s <filename> -o <hard drive/partition>
But i kept getting the typical invalid syntax response.
I am going to try, in debug mode, to mount the nfs share and commandline partclone to find out exactly what I need to do to get partclone working.
For right now, I’m just lost in the sauce trying to figure out how to get this to work. My hopes are that partclone will work better for the single disk, resizable than partimage currently does.
One question I have though, hopefully somebody can answer, is How come, during the deploy process for Single Disk, Resizable, there isn’t a method to recreating the first partition? The lines that I find are:
elif [ "$win7partcnt" == "2" ]; then win7part2start=`parted -s $hd u kB print | sed -e '/^.2/!d' -e 's/^ [0-9]*[ ]*//' -e 's/kB .*//'`; if [ "$win7part2start" == "" ]; then handleError "Unable to determine disk start location."; fi adjustedfdsize=`expr $sizefd + $win7part2start`; parted -s $hd u kB rm 2 &>/dev/null; parted -s $hd u kB mkpart primary ntfs ${win7part2start}kB ${adjustedfdsize}kB &>/dev/null;
Now I understand that the mbr, supposedly, gets rewritten after the imaging begins, but what I’m finding, is that the partitions aren’t deleted and their not recreated.
Also notice, there’s nothing stating which part is the boot partition either.
I guess I just don’t understand enough of the system, but it would seem to me that we would need somthing like:
elif [ "$win7partcnt" == "2" ]; then win7part2start=`parted -s $hd u kB print | sed -e '/^.2/!d' -e 's/^ [0-9]*[ ]*//' -e 's/kB .*//'`; if [ "$win7part2start" == "" ]; then handleError "Unable to determine disk start location."; fi adjustedfdsize=`expr $sizefd + $win7part2start`; parted -s $hd u kB rm 1 &>/dev/null parted -s $hd u kB mkpart primary ntfs 2048s ${win7part1end}kB &>/dev/null; parted -s $hd set 1 boot on &>dev/null parted -s $hd u kB rm 2 &>/dev/null; parted -s $hd u kB mkpart primary ntfs ${win7part2start}kB ${adjustedfdsize}kB &>/dev/null;
This would need to happen anytime the system is being written, but maybe not so much on the Multiple partitions as the MBR is directly written which should, theoretically, contain the partitioning of the hard drive so it can continue with no issues.
For Single Disk, resizeable, this doesn’t happen and the partitions, apparently, are removed, but not properly recreated. This causes an issue in that that rec.img.000 gets installed, but because ${hd}2 doesn’t exist, sys.img.000 can’t be written to the 2nd partition, so it just continues on like the deploy has completed.
-
While testing my custom init.gz, I found an issue in the Quick Image system. This, from what I can tell right now, affects all of the PXE options to perform the Quick Image (Full host registration, quick image, etc…) as the function it calls does not exist. I see a function called createImagePackage(…) but the function performed within the files is not relative and it’s not pointing to the class. I’m going to play a bit until I figure this part out, but until then, just wanted to post this issue.
-
I was able to correct for the issue with Quickimage, but it did require me to do two things.
First thing I had to do was edit
{fogwebdir}/service/hostlookupbymac.php
Here’s what I did/changed to this file:
From:
53 $tmp;
54 if( createImagePackage( $conn, $imageMember, “”, $tmp, false ) )
To:
53 $tmp;
54 $Host = new Host($hid);
55 if ( $Host->createImagePackage(1,“AutoRegTask”,true,true,true) )
56 //if( createImagePackage( $conn, $imageMember, “”, $tmp, false ) )
Then in file:
{fogwebdir}/lib/fog/Host.class.php
Go to and comment out Line 528.
Then all worked well. Including the Main GUI.
I don’t like commenting lines within a class that was, for the most part, working already, but I had to for quickimage as it’s trying to assign, for logging purposes I guess, the username to create the task. When it’s quick image, it doesn’t know who the user is so it spits out an error and will not create the task, the PXE File for the host will get created, but no database task gets created.
I’m guessing a similar change will need to be made in the Full Host registration script.