Ask Slashdot: Create Custom Recovery Partitions With FOSS?
First time accepted submitter KowboyKrash writes "OK, a little background: I use Acronis to create custom recovery partitions for my personal computers that include all my software and drivers. I also work for a growing computer repair shop which has ventured into eBay sales of refurbished computers. We receive the machines with wiped hard drives. Since we get multiples of each model, we load everything on one then make images with Clonezilla. It would be nice to set up recovery partitions as well. Acronis is out of the question, since it would cost for a license for each machine. Do any Slashdotters know of any FOSS options?"
dd
Give me Classic Slashdot or give me death!
partimage
http://www.partimage.org/Main_Page
I haven't used it since probably 2005 or so, but it used to work quite well over the network.
"Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
Gparted on a live CD.
1. Rig a minimal Linux installation on another partition. 2. Make it auto-login and launch a bash script which will: a. Give you a warning message b. Launch Clonezilla automatically, somehow pre-configured to re-image in the right place
If you are doing windows boxes and you are already paying for new Windows OEM / System Builder licenses, I'm pretty sure it's legal for you to use WinPE or a similar tool to install a recovery partition. If you're using pre-existing Windows licenses on the boxes, it might still be legal.
But the easiest option may be to ship the clonezilla image you are already using with a bootable clonezilla partition. Basically instead of installing clonezilla to a flash drive or a DVD, put it on the recovery partition. Put some scripting in the clonezilla partition to configure the clonezilla settings so that it is setup to restore the image to the main OS partition as the default action. This would work for Windows or Linux.
We are the 198 proof..
Comment removed based on user account deletion
I've never really understood the purpose of a recovery partition as a means of restoring a system. If a disk fails, a common reason for wanting to restore the PC, then that partition becomes useless. It's much better to just include disks so that a user can restore the PC them selves after the new hard drive is in place. Having said that, I have done something similar while making an extra buck in college with ebay sales.
I would create a small partition (~2 GB) that held two CD images (.iso's). One was the XP install cd (with legal COA on the shell), the other was a disk containing the latest stable drivers for all the hardware, and any pre-installed software that I bundled with the PC, things like OpenOffice, imgburn, ect. that would get them back to the state in which they received the PC. What I then did was create a guide (hard copy) that instructed them how to step by step burn these images to cd's and store them in a safe place as soon as possible. I doubt any of them did, but it's there for them if they want it.
Either way, included DVD's or CD's are the best method. The average user probably would have a family member who knew what they were doing restore the system anyway, or bring it in to a shop that would do it for them. You have to ask what the return on this time investment is going to be too. Will this feature increase sales? will it make them more likely to come back for a repair? (hopefully they won't need it). Probably no, but that's up for you to decide.
Comment removed based on user account deletion
Redo Backup & Recovery http://redobackup.org/
I use CloneZilla with a backup and restore script on my netbook. However, I use Redo Backup & Recovery for clients computers, It has a nice GUI and can work over a wireless or wired network connection to store backups to a NAS (a nice feature).
http://partedmagic.com/doku.php
PartedMagic is a wonderful, well-maintained Linux LiveCD that is quite small (175MB file, 320MB RAM requierd). I keep it on a USB stick on my keychain for recovery/diagnostics. It comes with CloneZilla, solid network support for many chipsets (including wireless), a nice desktop environment and plenty of disk recovery tools. It even has a ready-made PXE bootable version.
If you buy a large enough USB stick (8GB of 16GB), you can fit an image of a brand new Windows install with your favorite applications onto it. Of course, you could always just mount a network drive or an external USB hard drive and store your disk images there. For that matter, you can network boot PartedMagic from PXE or even install it onto the USB external drive.
I made a BartPE recovery disk with DriveImageXML for the imaging component it worked great.
I made sure the install image fit onto a DVD.
I do this on my machines at home. Use ntfsclone and gzip to create compressed image files on a bootable linux partition. You can then create some custom scripts to ask for permission then restore the image automatically.
Look into the Windows ImageX utility, and make sure to *sysprep* your machines.
dd is your primary tool.
zero out your drive so that when you compress it, you get a very small image.
dd if=/dev/zero of=[drive]
Install and configure your OS onto [drive]
dd if=/dev/[drive] | gzip -c > zipped_drive_image.bin.gz
to restore:
gzcat zipped_drive_image.bin.gz | dd of=[drive]
I may be a bit rusty, so the commands may need slight work. I've definitely used this method though, and it has worked well.
A 'minor bug' that demands they rip that version off their server and that users don't use it. http://www.fogproject.org/?q=content/minor-bug-031
I'd go on a Vegan diet but the delivery time from Vega is too long. --brownkitty
It seems that all of the damn MBA's have convinced people that saving a few cents per million units is the way to go. What I'd suggest in regards to customer service is do what the OEM's aren't doing and simply include a physical set of recovery media. This way if they have to replace a failed drive, they've got some way of doing it.
As someone who's had drives fail on OEM hardware (out of warranty) I've always appreciated having physical media. Another issue is that of Virus/Malware infections. I've actually seen brand new systems with virus/malware on the recovery partitions and you can't clean them w/o a full wipe/repartition and if you're going that far, you may as well have physical media to do the job right. Another thing is to include dban with the main recovery disk setup to offer the option to Puke & Nuke the System. If you do that, then don't forget the Warning/Reminder to Backup before Nuking from Orbit.
From an end-user standpoint, I'd love to see the option to do a secure wipe before system restore so I can sell/donate an old system and not have to worry that any of My personal data is still on it.
Mod me up/Mod me down: I wont frown as I've no crown
The following thread has a guide on how to create a Windows 7 recovery partition:
http://forums.mydigitallife.info/threads/21978-Windows-7-OEM-Recovery-Partition-tools-creator-Free
While it looks like most people here didn't even read the requirements before they posted ( typical these days ) i did, and i think for the best 'customer expirence' you are best off sending a DVD along with it and not screw with a partition.
it gives them a way to come back from a *dead* drive ( the most likely scenario ) and it gives them something to hold in their hands that will if nothing else make them feel like you care.
Disks are cheap, eat a few pennies in the name of customer service...
---- Booth was a patriot ----
DeployStudio PC works very nice to deploy a machine. You create an image and then just re-deploy it - it resizes NTFS partitions correctly and have had so far no issues restoring any version of Linux or Windows with any number of partitions.
For a bootable recovery partition, you could put a small Linux (busybox) image with the ntfs tools and dd that automatically runs when you boot it.
Custom electronics and digital signage for your business: www.evcircuits.com
I was in a very similar situation as OP and found PING very helpful. It doesn't provide any automated way of creating a recovery partition, but the documentation does explain how to make automated system restore discs. The principle is nearly the same, so adapting it shouldn't be too hard.
Off the cuff, I imagine it would go like this:
The main downside to this is it relies on GRUB, which may not be desirable to your customers. It's also tedious to set up.
It's really worth mentioning that creating an automated restore disc is much easier.
1) dd mbr + data on disk
2) sfdisk partition data, then use xfsdump/xfsrestore to recreate the partition data on disk
Both of those have the advantage of being easily scriptable, and a disadvantage of being fairly dificult to deal with variable disk sizes without doing quite a bit more work.
You could also look at partimage which may be more what you had in mind - http://www.partimage.org/Main_Page
I use fsarchiver, and as far as I can tell it is better in every way than ntfsclone, clonezilla, et al.
- For the complete works of Shakespeare: cat
dd's a poor solution; if it hits a bad block on the drive, the default is the fail. Your best bet is to use a program that recreates the partition, formats it, and copies the data in place like partimage or ghost. Bonus points for not having to copy unused space ( even if you zero the drive first like some suggested, you'll have gigs of wasted space from deleted installation files). Worst case scenario, use ddrescue instead of dd since ddrescue is a little more verbose and has easier options for skipping bad blocks.
Right. For the database schema update after you upgrade FOG, when you use the web interface you don't get redirected to the 'schema update' page. Minor bug, that would require an admin to run mysql and pipe in the database schema update script. Not really that big of a deal...
What's your point exactly?
Here's to the crazy ones
LOL.... ""./"" 'd already...............
they don't sell new anymore, but that is what they did once setup.
you hit a button on the harddrive, and it ran a backup process.
http://www.pcmag.com/article2/0,2817,1230418,00.asp#fbid=t9YT9-CRkJe
found this from 2003....
apparently, they didn't last.. (nor maxtor)
every day http://en.wikipedia.org/wiki/Special:Random
We actually have something very much like this on the systems we deploy at work.
The boot menu has a "don't do this unless support tells you to" option.
If the user selects that option, it boots WinPE off a different partition. That Windows session puts up a message box for confirmation, then uses imagex to explode multiple WIM files out to the normal live partitions.
The way we load the boxes initially actually just adds one more step to this. Boot WinPE off DVD, partition the hard drive, copy the recovery partition's contents from DVD to hard drive, mark the "don't do this" boot menu as the default, and reboot. It then picks up with the WinPE off the hard drive recovery partition, which in turn loads the normal partitions. It works pretty well.
The preferred solution is to not have a problem.
Comment removed based on user account deletion
I have slax set up with partimage. Here are the steps I take .desktop file like C:\slax\rootcopy\root\Desktop\recovery.desktop
1. Create a 5 gig partition for the backup image
2. Create a folder on the hard drive named slax and copy all the files from the slax CD into this folder.
3. Create a recovery script that goes in C:\slax\rootcopy\usr\bin
4. Create a link to it using a
5. Rename C:\NTLDR to C:\NTLDRXP
6. Rename the GRUB4DOS bootlader to C:\NTLDR
7. Have C:\Menu.lst have 2 options. 1 to boot the default os after 5 seconds and another option to load slax.
8. Boot to slax. If you like zero out the pagefile get get better compression dd if=/dev/zero of=/mnt/hda1/pagefile.sys bs=1M count=1524 then umount hda1 and use partimage to create a backup on hda2.
This way slax is loaded off the hard drive and into RAM and automatically mounts both /dev/hda1 and /dev/hda2. The recovery script unmounts hda1 and uses the image on hd2 to restore hda1.
Since an XP install easily will fit on a 4GB DVD you can instead make a recovery DVD with slax where the recovery image is on the DVD instead of the hard drive.
Or you can make a recovery CD that just boots a copy of slax and expects to have a recovery image file on hda2.
In my case I work at a company with 7 locations and a server at each location. I have the slax setup on each XP workstation and the latest recovery image stored on the server. We don't use roaming profiles due to Outlook with Exchange. But if someone is having a problem with a system I convert their profile to a romaning profile, it backs up to the server, I then reboot the computer to slax (by modifying menu.lst) mount the networkshare, reimage the hard drive, reboot, rejoin the domain and log in with the roaming profile. At that point I convert the profile back to nonromaing. And set up the local printer.
I would be more than willing to provide in depth details, scripts and instructions on how to remaster slax ans necessary.
vi +
dd's a poor solution; if it hits a bad block on the drive, the default is the fail
Which is why alternatives like dd_rescue and ddrescue exist.
The other OSes can be installed on cd dvd and usb and booted from there when your hd goes clicky clicky. A 512 mb sd card can hold a linux os on which you can do work, an xp freshly installed system needs drivers for printing scanning 3d even unencrypted dvd.
---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
The other OSes can be installed on cd dvd and usb and booted from there when your hd goes clicky clicky. A 512 mb sd card can hold a linux os on which you can do work, an xp freshly installed system needs drivers for printing scanning 3d even unencrypted dvd.
You totally missed the point there, it went past you so fast it left skidmarks on your forehead.
My point was that no matter what OS you use, you're STILL going to need one or another tool to get it back to work if it goes borked up. Linux isn't some magic tool that suddenly just repairs itself if it gets screwed up and is no longer bootable.
Partition backups are unwieldy, inefficient and inconvenient. They basically assume that you'll be restoring to the same hard drive model. Back up files instead. I use rsync on Linux and vshadow+robocopy on Windows.
"When information is power, privacy is freedom" - Jah-Wren Ryel
Did the guy you were replying to imply linux repairs itself? He said it's easy to do something to linund ox because everything is treatable with some tools. I said it's also easy to get full featured and completely compatible versions on USB sticks SD cards live cds. I'll up the ante pointing out that the tools are multiplatform (in case you need to check out a powerpc config file) and that recovering a partition when you switched out enough hardware make windows barf out at boot. While linux tries it best to work with whatever it finds when it boots.
---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
DD IS a poor solution, but not really for any reasons you managed to hit upon. The only difference between partimage/clonezilla and DD is that the former knows enough about the filesystem structure to SKIP any blocks marked as unused, saving space and backup/restore time. If your bad block is one that is allocated, partimage/clonezilla will fail just as badly. They have the advantage of speed (possibly a LOT of speed) and nothing else...
You don't zero your drives first... when you're ready to create an image, you fill up the filesystem(s) with a large file with a single repeating character, usually nulls (0x00) from /dev/zero but really any other character works just as well. When all free space is full of those large file(s) filled with zeros, you delete the files to recover the space, then immediately create a DD image, and compress the result.
Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
testdisk is an excellent program if you need done what it does.
It's on the PartedMagic live cd, along with other useful stuff.
I'm not sure if it's the right program for what the OP wants to do, but then again, I'm not entirely sure exactly what it is that he wants to do.
I see even classic Slashdot is now pretty much unusable on dial up anymore.
* prepare image (partimage - my choice, fsarchiver, ntfsclone, dd or whatever works for you), put on disk with the rest of the iles (sample: /image/diskc.000).
/dev/sda1 /mnt/cdrom/image/diskc.000
/mnt/cdrom (unless you choose to load to RAM)
* put file named "autorun" in root dir
* if partition: the "rename NTLDR/BOOTMGR, put GRLDR in it's place" installation of GRUB4DOS is the simplest and survives various "repair boot sector" procedures
* if partition: hide the recovery partition, make GRUB4DOS only show additional menu if Esc key pressed (hiddenmenu command)
< sample autorun file >
#!/bin/sh
echo "** Are you really sure that you want to restore the system drive C:,**"
echo "** all installed programs and all data to freshly installed state?**"
echo ""
echo "** This will delete ALL user data (documents, pictures etc.)**"
echo "** so you should try to save the most important stuff on a pendrive**"
echo "** or portable hard disk first. If Windows does not boot, try this:**"
echo "** - press Alt+Ctrl+Del here**"
echo "** - as your computer is rebooting, keep tapping F8 (once a second)**"
echo "** until you see a menu with "Safe Mode" option on top. Activate it.**"
echo ""
echo "** If you want to continue, write: YES (has to be capitals)**"
echo "** then hit the Enter key**"
echo ""
echo "** If you write anything else, the computer will start in a rescue**"
echo "** mode (ie. System Rescue CD).**"
echo ""
echo ""
echo "** THIS IS YOUR LAST WARNING BEFORE OVERWRITING THE DRIVE C:**"
echo ""
read wpisal
if [ "$wpisal" = "YES" ];
then
echo "Here we go"
partimage -f2 -b restore
sync
shutdown -r now
else
echo "You typed: $wpisal, not YES; starting Linux"
echo "press any key to continue or Alt+Ctrl+Del to reboot"
read -n 1 -s
fi
-- < sample autorun file > --
* if DVD: make image of recovery partition (with image of system partition) rather than system partition,
* if DVD: adjust default kernel loading timeout in isolinux,
* if DVD: an option to re-write mbr makes sense in case the HDD was replaced
System Rescue CD always mounts it's media on
The disclaimer is going to be different in case of DVD recovery, obviously.
dd is suboptimal for this because it doesn't zero out unused sectors. For linux filesystems, clone2fs is the equivalent command. I don't know if something similar is available on OS X.