• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Can you manually image from a sys.img.000 file?

Scheduled Pinned Locked Moved
FOG Problems
3
21
7.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Creedasaurus
    last edited by Sep 2, 2014, 5:34 PM

    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.

    • Creed
      (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!)
    1 Reply Last reply Reply Quote 0
    • J
      Junkhacker Developer
      last edited by Sep 2, 2014, 5:41 PM

      it is possible to deploy an image manually, but it may be difficult for you, depending on your linux experience. you will need to create your partitions manually, then apply the image files to them with a linux boot disc with partclone or partimage, depending on what version of fog the image came from. rec.img.000 is the recovery partition. img.000 is the system partition. it would probably be easier to bring the fog server back up. is it not working?

      signature:
      Junkhacker
      We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

      1 Reply Last reply Reply Quote 0
      • C
        Creedasaurus
        last edited by Sep 2, 2014, 6:02 PM

        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.)

        Setup:
        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).

        1 Reply Last reply Reply Quote 0
        • J
          Junkhacker Developer
          last edited by Sep 2, 2014, 6:24 PM

          what version of fog was the old server?

          signature:
          Junkhacker
          We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

          1 Reply Last reply Reply Quote 0
          • C
            Creedasaurus
            last edited by Sep 2, 2014, 6:26 PM

            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?

            1 Reply Last reply Reply Quote 0
            • J
              Junkhacker Developer
              last edited by Sep 2, 2014, 6:30 PM

              is there a /tftpboot.prev directory? if so, what are it’s contents, including other directories?

              signature:
              Junkhacker
              We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

              1 Reply Last reply Reply Quote 0
              • C
                Creedasaurus
                last edited by Sep 2, 2014, 6:49 PM

                This is what is listed in that directory. I didn’t see any others.

                [CODE]boot.txt
                default.ipxe
                ipxe.kkpxe
                ipxe.kpxe
                ipxe.krn
                ipxe.pxe
                memdisk
                pxelinux.0.old
                snponly.efi
                undionly.kkpxe
                undionly.kpxe
                undionly.kpxe.INTEL
                undionly.pxe
                vesamenu.c32[/CODE]

                1 Reply Last reply Reply Quote 0
                • J
                  Junkhacker Developer
                  last edited by Sep 2, 2014, 6:53 PM

                  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?

                  signature:
                  Junkhacker
                  We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                  1 Reply Last reply Reply Quote 0
                  • C
                    Creedasaurus
                    last edited by Sep 2, 2014, 7:01 PM

                    I believe close to 2 years? At least.

                    1 Reply Last reply Reply Quote 0
                    • J
                      Junkhacker Developer
                      last edited by Sep 2, 2014, 7:24 PM

                      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.

                      signature:
                      Junkhacker
                      We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                      1 Reply Last reply Reply Quote 0
                      • T
                        Tom Elliott
                        last edited by Sep 2, 2014, 8:12 PM

                        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.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        1 Reply Last reply Reply Quote 0
                        • C
                          Creedasaurus
                          last edited by Sep 2, 2014, 8:59 PM

                          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?

                          1 Reply Last reply Reply Quote 0
                          • J
                            Junkhacker Developer
                            last edited by Sep 2, 2014, 9:26 PM

                            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:
                            /var/www/fog/*
                            the contents of /var/www/fog should belong to www-data:www-data and have 644 privileges
                            /tftpboot
                            the contents of /tftpboot should belong to fog:root and have 644 privileges
                            /images
                            the contents of /tftpboot should belong to root:root and have 777 privileges
                            /opt/fog/*
                            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

                            signature:
                            Junkhacker
                            We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                            1 Reply Last reply Reply Quote 0
                            • J
                              Junkhacker Developer
                              last edited by Sep 2, 2014, 9:34 PM

                              also you’ll need the contents of [SIZE=15px][FONT=Lato][COLOR=#3d3c40]/var/lib/mysql moved over as well[/COLOR][/FONT][/SIZE]

                              signature:
                              Junkhacker
                              We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                              1 Reply Last reply Reply Quote 0
                              • J
                                Junkhacker Developer
                                last edited by Sep 2, 2014, 9:39 PM

                                from tom:
                                [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]
                                [LEFT][COLOR=#3d3c40][SIZE=15px][FONT=Lato]restart mysql[/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]

                                signature:
                                Junkhacker
                                We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                                1 Reply Last reply Reply Quote 0
                                • C
                                  Creedasaurus
                                  last edited by Sep 6, 2014, 6:32 PM

                                  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.

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    Creedasaurus
                                    last edited by Sep 6, 2014, 6:36 PM

                                    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.

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      Junkhacker Developer
                                      last edited by Sep 8, 2014, 1:14 PM

                                      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

                                      signature:
                                      Junkhacker
                                      We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        Creedasaurus
                                        last edited by Sep 8, 2014, 9:02 PM

                                        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.
                                        1 Reply Last reply Reply Quote 0
                                        • C
                                          Creedasaurus
                                          last edited by Sep 11, 2014, 12:54 PM

                                          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!!

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          1 / 2
                                          • First post
                                            19/21
                                            Last post

                                          182

                                          Online

                                          12.1k

                                          Users

                                          17.3k

                                          Topics

                                          155.3k

                                          Posts
                                          Copyright © 2012-2024 FOG Project