Slashdot Mirror


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?"

20 of 133 comments (clear)

  1. dd by Hatta · · Score: 2, Funny

    dd

    --
    Give me Classic Slashdot or give me death!
    1. Re:dd by optimism · · Score: 2

      Yeah, my initial drive-imaging experiences were with Ghost, but I gave it up when I got serious about imaging our systems.

      PING is much better in my opinion, and not just because it is free.

      It does have a resizing-on-the-fly capability (during image creation). I don't use it because I've simply standardized on a 25GB partition for Windows system & programs. I rarely use more than 15GB. Data lives on a different partition with file-level backup.

      I boot PING from a USB stick, and save the disk images to an external USB drive. In theory you can put everything on a bootable CD or DVD set, but I've never bothered. Since PING ignores the huge hiberfil.sys and pagefile.sys, and provides several choices for compression, you can easily fit a complete image of Windows XP with office apps, on a single DVD.

  2. partimage? by vlm · · Score: 2

    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
  3. Here's an idea by LiroXIV · · Score: 2

    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

    1. Re:Here's an idea by FalleStar · · Score: 3, Informative

      No need to launch CloneZilla, all the bash script would have to do is:

      1. Get confirmation from the user to perform the restore
      2. dd if=/path/to/backup.img of=/dev/sda1(or whichever is the main partition)
      3. Reboot
  4. Double down on clonezilla... by bwcbwc · · Score: 2

    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..
  5. Comment removed by account_deleted · · Score: 2, Informative

    Comment removed based on user account deletion

  6. Comment removed by account_deleted · · Score: 2

    Comment removed based on user account deletion

  7. Re:Recovery partition is moot by poity · · Score: 2

    Software fuckup is more common than disk failure. That's why recovery partitions are convenient. They also minimize support costs.

    --
    your thin skin doesn't make me a troll
  8. No, ntfsclone is what you're looking for. by yakovlev · · Score: 2

    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.

    1. Re:No, ntfsclone is what you're looking for. by realityimpaired · · Score: 2

      The GGP suggested dd, which doesn't really care whether it's ntfs or not. dd piped with gzip to compress the image, and you should be able to easily create images of just about any filesystem out there. If you don't care about storage space (or it's a small OS partition with user files on a separate partition), you can also forgo piping in gzip.

    2. Re:No, ntfsclone is what you're looking for. by zougloub · · Score: 3, Informative

      For NTFS partitions, ntfsclone --save-image / --restore-image is really efficient. You probably want to feed its output to lzop instead of gzip, because gzip/bzip2/xz would be a bottleneck and you don't gain that much with it: - compressing is longer - decompressing is longer - space gain is not magical (when performing an initial disk image (whole disk, with dd/cat) of an OEM laptop with a 640GB disk, I had 26GB with xz --extreme instead of 44GB with lzop -3). xz file was too slow to decompress, so I finally deleted it. Note: if the MBR or partition boot is broken, you'll need to boot with a Windoze rescue CD to fix that.

    3. Re:No, ntfsclone is what you're looking for. by Ayourk · · Score: 3, Interesting

      For the MBR being broken, why not just take a dd image of that section of the HDD and present that as an option as part of the repair process? Having backups of the MBR, partition table and FAT are good ideas for recovery options IMHO.

  9. If you're using Windows by magamiako1 · · Score: 2

    Look into the Windows ImageX utility, and make sure to *sysprep* your machines.

  10. DD of a GZipped Image by rhadc · · Score: 3, Informative

    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.

    1. Re:DD of a GZipped Image by bheading · · Score: 2

      Slightly more optimal if you do the first steps in reverse, ie

      - install the OS first and do a cleanup on it (eg ccleaner on Windows), uninstall any crap that's on it, clear out logs/tmp files etc.
      - within the OS, write a big file full of zeros to fill the drive - ccleaner can do this easily by zeroing any unused space - dd will work if you can mount it from Linux.

      Then use dd to capture the image as you suggested.

  11. Guide by Aggrajag · · Score: 2

    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

  12. Ship a DVD with it by nurb432 · · Score: 2

    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 ----
  13. I've done it a few ways by forgottenusername · · Score: 2

    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

  14. Re:This would take a bit of time, but by Culture20 · · Score: 2

    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.