Use partimage to restore fog images
-
hey thats ace thanks alot !
I just managed to almost do it but lots of problems, I copied images for XP, 7 and Vista. I downloaded partimage into it and then had a play around…couldn’t get any of them to work, the a vista image from gave me invalid file system error or something so left it alone. Be interesting to see how it can be done. Thanks for this!!!
edit although I have a horrible feeling my images are in the wrong the format - I used the NTFS resizeable jobs, I bet it needs a different one? :oops:
-
Seeing your note from above, all of my images are NTFS resizeable as well and this is what works when I tried it.
[SIZE=4][B]Prepping to image a computer with Parted Magic[/B][/SIZE]
-
Load PartedMagic, make sure your USB drive is plugged in
-
Go to “Start” > System Tools > Mount Devices or click the HDD icon (Which if you hover over it, should say Mount Devices) next to the “Start” button
-
Mount the drive that has your image currently stored on it. Make a note of the media/xxx (where xxx should say something like sdb1) this should be able to be determined by the size of your drive
[SIZE=4][B]Preparing Partition Image[/B][/SIZE]
-
Go to “Start” > System Tools > Partition Image
-
Under *Partition to save/restore select the drive in your computer
-
Hit Tab to go to different sections in the program, so hit Tab to move the cursor to *Image file to create/use. Here, enter /media/xxx/YourImage
-
Hit Tab again to move to Action to be done, hit the down arrow key so “Restore partition from and image file” is selected, and hit the space bar. You should see the “*” move to this. Once this is done hit F5
[B][SIZE=4]Imaging[/SIZE][/B]
-
Leave all the defaults on the options page, just hit F5
-
Hit Enter at the NTFS is experimental
-
Hit Tab then Enter at the NTFS informations screen
-
Verify that the information is correct and hit Enter to start the imaging
-
Wait…and wait some more
[SIZE=4][B]Cleanup[/B][/SIZE]
-
Go into Partition Editor
-
Make sure your PC/laptop hard drive is selected
-
Go to the Partition menu and select the item “Check”
-
Apply this to the drive (this forces the drive to check for the resize)
-
Restart and Enjoy.
-
-
This is really great, thanks so much. Is there any way that you know of to make this scriptable? Particularly, the cleanup phase in your write-up.
-
I’m sure it can be done, but I did all this testing/documenting this morning, so I haven’t looked into scripts for it. Maybe this afternoon i’ll take a look into it if time allows.
-
on a blank disk no partitions show up in part image - so should we just create them ? then overwrite one by one - obvs coz 7 got 2 parts yeah bro?;)
gonna have a go with parted magic as opposed to ubuntu with partimage installed so we on the same page
-
Your image from FOG should already have all this stored and should overwrite the MBR putting the partitions on the disk. All partition information is stored in the first 512 bytes of the drive
If you use Ubuntu, I think all you need is mounter-gtk, gparted, and partimage.
-
hmmm its not going good…better…but not good…ok so copied win 7 wint 2 *000 parts win vista the one image and XP and heres whats happened…
win 7 i could only choose one of the 2 images that make win 7 (system reserved and the C:) so I picked the fist one (system reserved) said experimental NTFS blah blah…hit ok…nothing happened…there is an OK button and im hitting it and nothing happens…by fluke I hit escape and the i got to are you sure you want to restore then it WORKED…but the drive didnt have the partiton on it??? even after checking …how do you do it for windows 7 with the two images??
also windows XP test - incorrect file compression - aborting
sorry to be a pain
-
Tried a windows 7 image again this time created 2 ntfs partitions on blank target 1 TB HDD within test laptop ; sda1 , sda2.
Installed image 1 (system reserved) over the top of Sda1 and the rest of the image 2 over Sda2.Ran check on both parts after.
System failed to boot!
Wish this would work for me
-
So I think what’s happening is that part image through PM is not liking the multiple partitions of the multiple OS’s since this is being installed on the first partition of the drive. You could try making each individual partition and copying the individual OS’s and seeing if that works, but at that point in time, it might be worth it to just get FOG working in a VM
But when I did my testing, and what I wrote everything up on, it’s was just Windows XP, I didn’t try Windows 7 with it yet.
-
Ok onto my next dream scenario - beefy laptop - running fog with all my images in a virtual box - attach problem laptop via cross over cable to fog laptop with it running in the VM - boot the laptop that needs imaging and it gets imaged from the FOG running in a VM via the laptop - gotta be easy peasy rihggt?
-
you don’t need that beefy of a laptop, mostly just drive space. Although we have it running in a VM, it’s just using 1 core of a Xeon E7 with 2 GB of RAM and we have had no problems with imaging. Drive speed and the cache play a big role in FOG. My server at home runs FOG on 1 core of an i7 with 1 gig of RAM, and I can image test machines (7GB) in about 5 minutes. Not blazing fast, but fast enough. So in theory, as long as the VM is setup in bridged network mode, I don’t see why it shouldn’t work. But personally i’ve always been a fan of plugging everything into a switch for stuff like that.
-
ok cool - so lets say I have my fog server in a VM on beefcake desktop…I have a good laptop too… can install virtual box on it and then copy the stuff from the desktop to the laptop as is…the IP was 192.168.0.13 in the VM on the desktop to work …what do I need to do with the laptop to make other machines be able to be cloned from it via PXE boot etc? I have a cross over cable between machines - thankS KEVIN!!!
-
If all of your machines have a gig Ethernet port, you don’t need to worry about specific cables, they will auto negotiate. If you have 10/100 cards, then you will need the cross over cable. However, depending on how many machines you want to do. You might be better off getting a switch and multicasting the image to multiple machines at once. I don’t think you can straight up copy everything over, I don’t think MySQL likes it (haven’t tried in a while), but I know if you install FOG first, you can copy your images, database and configs over. There is a post floating around right now somewhere, I think from Chad-Bisd that explains the backup/restore procedure. But other than that, there shouldn’t be any problems.
-
Again its purely for steam lining …turn up at a customers house…needs a wipe…BOOM…smashed in 20 mins…copy data back…adios!!! will let you know
-
Had some good success on tests - took cable out of desktop with vm fogbox , straight into laptop , did nothing with any LAN setting apart from make laptop boot network - can register a new host! and quick image as well …will test more after setting up laptop but that is all I need …virtual FOG server in a Virtual Box on a laptop…may even look into ISO booting as well for a complete solution via the CABLE!..will post more later …also I have a hunch the PART IMAGE thing might work better with the image types that have MBR.p1 files…dont know why (one file etc) but will test that also !!!
- 11 days later
-
I have this working now in a fashion, see what you think, any thoughts , improvements, would be good
- All fog images need to be Multiple Partition Non Re Size. Give you the MBR file which is essential.
- Use this command to load the mbr onto target disk [SIZE=12px][FONT=Courier][COLOR=#000000]sudo dd if=/pathtoimages/d1.mbr of=/dev/sda[/COLOR][/FONT][/SIZE]
- The disk now has the exact layout of the cloned disk about to be imaged.
- Load image files over the top of the partitions needing imaging. e.g. (win 7 machnie)
after MBR loading disk will have say dev/sda1 (reserved) and dev/sda2. Just load images d1p1 over sda1 and d1p2 over sda2.
Note. Resize in gparted will force a chkdsk in windows…if you leave resize till in windows no force check disk on first boot.
Tested with 7 , vista and XP images. All working.
7 looped a couple of time with the black and white boot manager window before then settling down and installing. Not sure why? But tested 3 or 4 times and it only happens once after loading. -
This post is deleted! -
I have this working now in a fashion, see what you think, thoughts would be good
- All fog images need to be Multiple Partition Non Re Size. Give you the MBR file which is essential.
- Use this command to load the mbr onto target disk [SIZE=12px][FONT=Courier][COLOR=#000000]sudo dd if=/pathtoimages/d1.mbr of=/dev/sda[/COLOR][/FONT][/SIZE]
- The disk now has the exact layout of the cloned disk about to be imaged.
- Load image files over the top of the partitions needing imaging. e.g. (win 7 machnie)
after MBR loading disk will have say dev/sda1 (reserved) and dev/sda2. Just load images d1p1 over sda1 and d1p2 over sda2.
Note. Resize in gparted will force a chkdsk in windows…if you leave resize till in windows no force check disk on first boot.
Tested with 7 , vista and XP images. All working.
7 looped a couple of time with the black and white boot manager window before then settling down and installing. Not sure why? But tested 3 or 4 times and it only happens once after loading.