Can you manually image from a sys.img.000 file?
Alright, I’ll keep this brief. I need to know if it is at all possible to unpack or image something using the sys.img.000 file that is uploaded to FOG when creating an image, but without using FOG itself to deploy it. I know that sounds weird, but does it make sense at all? Basically FOG is down right now. I am new in my position at work (at a high school that relies quite a bit on FOG), and I just have to image a computer real quick using the backup of the image that was made from the FOG server (if that is even possible). Is there a particular program that can read or unpack the img.000? And what about the rec.img.000? What part of the image is that? Sorry, total noob. No time to learn it all at the moment and get FOG back up since it is the beginning of the school year and there are a million other things going on.
Also, glad to join the forum! Looks like a pretty good community! Thanks for any help ahead of time.
(p.s. unless I am just terrible at keyword searching, I could not seem to locate anything on the forum about this. correct me if I am wrong though!)
So here is some stuff I pulled from my Apache2 error logs. Don’t know if its related to the unable to resolve hostname. I can ping IPs from FOG (and in the web UI when I list all hosts, it shows a little graphic at the top saying it is pinging all hosts, although there are still red exclamations on everything), but not hostnames which I am not entirely sure I am doing correctly.
[CODE][Thu Sep 11 19:57:43 2014] [error] [client 18.104.22.168] (13)Permission denied: access to /fog/management/index.php denied, referer: http://--------.edu/fog/managemen$
[Thu Sep 11 19:57:43 2014] [error] [client 22.214.171.124] (13)Permission denied: access to /fog/service/servicemodule-active.php denied
[Thu Sep 11 19:57:44 2014] [error] [client 126.96.36.199] (13)Permission denied: access to /fog/index.php denied, referer: http://fogserver.whatever[/CODE]
(different IPs and server name)
Any chance I might be on to something at least?
Ok, darn it. I thought I was going to be good from here on out since I finally got an image out. Now I believe my last problem is with the little red exclamation “unable to resolve hostname.” Now I didn’t think I would have to do anything with our network seeing as it was working before, its the same machine, and I thought I had set everything up the same.
But the “unable to resolve hostname” problem will let me image but then nothing else. Its like it finds and sees the computer just fine when it PXE boots and sends it an image or whatever, but once windows is up, it doesn’t rename or anything. And all the computers that are already in FOG and have the fog client can’t have any snap ins added or be joined to the domain (via FOG). I’ve sifted around the forum to find this issue, but so far haven’t found anything that has worked. I know I’ve got to be able to ping the hostnames themselves, but I’m wondering where I could find files I need to make sure are correct to be able to do this. Any direction would be GREAT. I’m hoping I can deploy a piece of software here pretty soon that would be way easy as a snapin.
Let me know! Thanks!!
Iiiiinteresting. I’ll have to look into Debian. Just reading about it makes it sound a bit more on the stable end. Good for a server-box. Do they have like server-specific distros? Or is it just one size fits all kind of thing? (Don’t worry, I can obviously scour the internet for answers to these burning question.)
Thanks again for the help. I JUST imaged my first machine on the new re-build. And it worked. So I am in business now. I will update you if I run into any other quarks.
- Actually, just thinking of that.
everyone seems to be recommending debian for ubuntu users, since 14.04 has so many issues and 12.04 is out of support now.
so far as i know, debian works without issue
WAIT but I just remembered why I didn’t want to deal with 14.04! For some reason Apache2 would always say it had crashed whenever I logged in. I think I’m just going to deal without having the latest HWE. Its already killed me enough to have Fog down this long.
Ok. You all are geniuses. Thank you so much. I got a test server up and almost completely working.
My one last problem has to do with this:
I am now about to redo the server that Fog was originally on. Its a slightly newer machine with the space necessary to have all the images on there. I wanted to just put Ubuntu 12.04 LTS like what it was running, but I just remembered that I had serious issues when I tried updating to the current HWE version. So if its possible I would like to make the upgrade to 14.04 since it seems a bit more stable in that aspect (for this newer machine). Or am I way off? Should I just keep 12.04 since everything would copy over just the same (and not worry about the HWE update)? Or will all of these files copy over to 14.04 the same way they would for 12.04?
I will also comb the forums for an answer to this question. Figured I’d get my thoughts down first.
[COLOR=#3d3c40][SIZE=15px][FONT=Lato]but the simplest method[/FONT][/SIZE][/COLOR]
[COLOR=#3d3c40][SIZE=15px][FONT=Lato]rebuild new server[/FONT][/SIZE][/COLOR]
[COLOR=#3d3c40][SIZE=15px][FONT=Lato]run fog installer[/FONT][/SIZE][/COLOR]
[COLOR=#3d3c40][SIZE=15px][FONT=Lato]copy over /images[/FONT][/SIZE][/COLOR]
[LEFT][COLOR=#3d3c40][SIZE=15px][FONT=Lato]copy over /opt/fog[/FONT][/SIZE][/COLOR][/LEFT]
[LEFT][COLOR=#3d3c40][SIZE=15px][FONT=Lato]copy over /var/lib/mysql (after stopping the running session of course)[/FONT][/SIZE][/COLOR][/LEFT]
[COLOR=#3d3c40][SIZE=15px][FONT=Lato]make perm’s changes as needed (e.g. chmod 777 -R /images, chown -R www-data:www-data /var/www/fog)[/FONT][/SIZE][/COLOR]
[LEFT][COLOR=#3d3c40][SIZE=15px][FONT=Lato]change the password for the fog user[/FONT][/SIZE][/COLOR][/LEFT]
[LEFT][SIZE=15px][FONT=Lato][COLOR=#3d3c40]all should be ready to go[/COLOR][/FONT][/SIZE][/LEFT]
also you’ll need the contents of [SIZE=15px][FONT=Lato][COLOR=#3d3c40]/var/lib/mysql moved over as well[/COLOR][/FONT][/SIZE]
i mean the mysql database. it is possible to move a database from an offline server to a new server by installing mysql, copying the datadir from the offline server to the datadir on the new server, and then starting mysql server. if you copy the contents of the /var/www/fog directory to the new server, it will already have the database password set.
you will need the following directories, in all:
the contents of /var/www/fog should belong to www-data:www-data and have 644 privileges
the contents of /tftpboot should belong to fog:root and have 644 privileges
the contents of /tftpboot should belong to root:root and have 777 privileges
the contents of /opt/fog/ should belong to root:root and have 644 privileges
except /opt/fog/snapins which should be www-data:root and have 644 privileges
Now when you say ‘import the database’, what do you mean? What kind of database is it and what file or files am I looking for? (Sorry I can probably read a bit more on that particular aspect). I wonder because I thought that the database would make up mostly the images, the MySQL database, which I can’t seem to actually run the backup utility for since it is on an external and isn’t on a running system, ya know? Unless there is a way to run mysqldump on a non-booted system?
Tom Elliott last edited by
I can potentially help you too.
Also, of note, if your image files are of the partclone variety, there is supposedly a way to mount the rec.img.000 and sys.img.000 files though I’ve never had any major success in editing files and reclosing the loop after. Partclone-utils on sourceforge forums may have more documentation and leads than I can give you.
If you need any help, we’re typically on to help. While right now is pretty busy for all of us in school districts, there’s usually one or two of us on even during the busy period.
ok, that means you probably had a 0.32 server and it has been updated to more then one 1.0+ fog release.
since you likely have image files from multiple versions of fog, i think the easiest thing to do would be to rebuild the server and import the files and database from the old server if the old server is, as you implied, completely unrecoverable. the database will contain information on what format the images are in, and will be able to deploy them easily.
I believe close to 2 years? At least.
ok, looks like it was probably a 1.0+ server, but just to be sure, how long has fog been in use at the school?
This is what is listed in that directory. I didn’t see any others.
is there a /tftpboot.prev directory? if so, what are it’s contents, including other directories?
So I am not entirely sure now. Supposedly he updated from 0.32 to 1.2.0 right before the big crash. Any way I can sift through the filesystem to get a proper answer on that?
what version of fog was the old server?
Wowzer! Thanks for the fast response! I am a little under the gun, but I will try and get as much info for you as possible.
Basically it goes like this: Right before the previous tech left he ran an update on the FOG server that by his record, bricked it. I was able to at least boot off of a drive and backup everything I could find (basically the filesystem). I have since spent a decent amount of time reinstalling Ubuntu and getting the FOG services all installed and running. Reading as much as I could on restoring the images to the /images folder, I followed every bit of info I could find (permissions, adding them manually back into the web gui). I am still unable to get anything imaged. The computer will iPXE boot fine, see the task, and then when it attempts to image, it fails in various ways (depending on how I save the image in the web gui, e.g. Single Disk (resizable), Multiple Partition (single disk), etc.)
HP DC 8300 Minitower (i5, 8GB, 3-TB raid)
Ubuntu 14.04 (i believe? the latest stable server I could find)
FOG 1.2.0 (lastest stable release also)
Everything is running great on the web end (albeit for some reason every time I hop on the FOG server it says that apache2 has crashed, though it doesn’t seem to be affecting anything that I can tell).