OS reinstall
-
Ok, I’m to the point that I need to do a reinstall of my OS. I have ubuntu 14.04 and am getting a lot of errors on the OS. If I restart the computer a couple of times, I have to reinstall fog to get my web-interface working again. On my setup, I have a 64 GB ssd for the OS and a 2 TB hdd for all of my images. I did not set up this box, was already done when I got here. I’m not an expert in Linux, so trying to set it back up like it is hopefully won’t be a big challenge. Right now when I open the computer icon on my desktop, I see the two hard drives and then I see the file system, I can only open the file system. I don’t see anything to distinguish what is on which hard drive. So what would be the best way to go about setting this box back up so that my images continue to be stored on my bigger hdd? I am planning on going back to 12.04, a lot less problems for me.
-
A couple of questions and a few starting points. First is FOG serving DHCP or is that done by a different server? Second what version of FOG are you using?
Now to the high level thoughts on starting to rebuild the server. First you should run the FOGbackup script included in the installer directory. This will get you a backup of all your necessities, such as your DB, Snapins, and images. From there you could re-install and then reload the DB and snap ins.
But in order for us to better assist you we need to know the version of FOG as there are many different ways to approach things depending on your version and what version you are looking to go to.
-
@ITSolutions is correct. We really need to know the fog version. The different versions have different instructions for installation and upgrading. In addition to running the backup script, I’d also recommend doing just a host export as well. More options is always better.
Host Management -> Export Hosts -> Export
But for the 2nd HDD and what goes where - I’d recommend installing the whole OS on the ssd, and then mounting the 2nd HDD to a subdirectory called
/images
before installing FOG. FOG should then just use the hdd and directory you’ve already provided. -
Ok, I have another server handling dhcp. Fog version is 1.2.0
-
@Wayne-Workman thanks wayne, this is what I was looking for. This is how it is currently setup
-
@the_duke Do you have a DHCP reservation for FOG? or is it totally dynamic?
If IP addresses instead of names were used to install the fog client, you’ll need to use the same IP again too. If you have a DHCP Reservation, you’ll need to make sure this doesn’t change (if it’s virtualized or whatnot)
-
I was going to suggest the same setup as I almost always set my servers up that way. I like the separation.
Once you answer the questions raised by @Wayne-Workman then you can actually proceed with the rebuild. It sounds like you have a physical server from your description, does it have just a single nic or multiple? Also make sure you have the IP of the server and/or name of the server. The clients will need it to stay the same, unless you want to updated with GP and new config file. On the legacy clients it is trivial to update the config file with GP if you choose to change IP’s or names.
Also given that you are rebuilding the server this may be a time to weigh the Pros and Cons of upgrading to trunk as it is rather stable and offers many new features.
I would run the back up script and also do the export as @Wayne-Workman mentioned and save all of this to an external location either usb HDD or network location. I would also include the .fogsettings file, usually in /opt/fog/ for Ubuntu, as it has the original install settings stored in it. As long as you want it back to how it worked on install this could save sometime.
** A side note that may help, backing up your fstab file under /etc/ maybe wise also as it most likely will have the mounting point for /dev/sdb1 as the /images dir. (If the second HDD is auto mounted as /images as you have indicated). I will often unplug the second drive as to ensure it will not overwrite any thing during OS re-install(saving time on coping images back). I have had bad experiences in the past on this.
Then I would reinstall your OS and if you are staying with 1.2 then definitely use 12.04. But if you choose to upgrade to trunk then 14.04 or higher maybe a better choice. Then set you IP if it is static on the server. Proceed with the reinstall of FOG, you can copy the .fogsettings file from backup to the install location, usually /opt/fog/ if I recall correctly. After it is set up and database is configured then you can restore the database from the web gui. You can copy the “snap in” back up directory to the “/opt/fog/snap in” directory. If you chose to back up your fstab file then restore that to /etc/ (make sure to backup the original fstab in case there is a conflict), shutdown the server, plug in the second drive and reboot. If all goes well FOG should be installed and images there and ready for deployment.
@Wayne-Workman if I am missing something please chime in, I think that pretty well covers it though.
-
@Wayne-Workman yes I have a dhcp reservation for the fog.
-
@ITSolutions Ok, I have reinstalled 12.04 and installed fog and tried to import my database backup but it says can’t upload file. I have uploaded all of my hosts from .csv file, but when I look in the image management section, I can’t find my images. In the filesystem, the /images directory is where all of my images are located. It just auto mounted into the /images directory. Any ideas as to what maybe happening?
-
@the_duke I’m guessing your installing 1.2.0? The cannot upload db file is most likely because of the size of the file. How big is the db dump you have? Would you be willing to consider installing trunk? Trunk alters a bit of the php.ini file so you can upload larger files. I believe trunk sets the size to 100 MB which should be enough I hope for the db dump. What it sounds like is your setup is pretty vanilla right now meaning the max file size you can upload is either 2 or 8 MB which is really small. This can be changed if your willing to edit the file yourself. When you change the sizes you will have to restart Apache. On Ubuntu, I believe, the file you need to edit is /etc/php5/php.ini and you need to look for post_max_filesize and max_upload_size.
-
@Tom-Elliott Yes I used 1.2.0. I have edited the file and was able to restore my database, but when I go to image management, there are no images listed. My path is correct in storage management and my /images directory has all my images
-
@the_duke, because this is a fresh install, you still have to create the image definitions. It knows NOTHING about your system.
-
@Tom-Elliott Oh ok. I just thought all that would be pulled from the database backup.
-
Right but you said uploading the database backup failed so…
-
@the_duke then I doubt the DB backup worked correctly, or, I doubt the import went correctly.