Tuesday, 23 October 2012

CloneZilla Windows Backup/Restore partition Tutorial added (Tut89)

Whilst discussing how to make a grub4dos menu.lst file show only one 'boot to Windows' option, a solution was posted by ndog37 on reboot.pro here for how to add CloneZilla to an existing Windows system. With this solution added, you can quickly backup your copy of Windows at any time and then later restore any of the previous Windows backup images. An XP backup takes approximately 5 minutes. Restoring an XP image takes approximately 1 to 5 minutes. The backup is made on the hard disk, so it is not suitable for off-line backups.

See YouTube vidoes here and here.

See also here for UEFI or here for MBR Tutorials.

You just need to add the files to your backup partition and then install grub4dos (I provide a script file in the download to do this with just one click) and then hide the files to protect them from accidental deletion (again using a script provided in just one click).
This makes it very quick to install onto any simple Windows PC or notebook (e.g. your grannies PC) so that they can quickly restore a working image if their Windows installation gets infected or becomes SNAFU'd.

32 comments:

  1. Woah this is amazing, I'm surprised no one has commented.

    I've been using clonezilla for a while and doing the options manually is a pain.

    Anyway, I was wondering if this would work with Windows 7 as well.

    Cheers!

    ReplyDelete
  2. The current commands are designed to backup the last partition on your hard disk that contains a \windows\explorer.exe file. Many Win7 systems also contain a boot partition and this would not be backed up. However, the boot partition rarely becomes corrupted and you can always boot to WinPE and run bcdboot to fix a restored Windows partition that does not have a boot partition.
    So, in short, yes, it will backup/restore a Windows OS partition.

    ReplyDelete
  3. Hey there! Thanks for the tutorial, this is exactly what I was looking for. I am hoping you could help with this requirement though, is it possible to request some sort of password for the restore? I have some users that can be dangerous at times and I would like to limit my exposure to someone reimaging the machine without direction.

    ReplyDelete
  4. under each title menu entry put a new line
    password fred

    they will be prompted for the password before it will run.

    ReplyDelete
  5. Great! I will give it a try.

    Paul

    ReplyDelete
  6. Wonderful, that worked well.

    I've run some backup and restoral tests and they went perfectly.

    But I have trashed the menu.lst file to the point where the system would not boot for a minute until I could get in and replace the file with a clean copy.

    I've setup a custom background image and have been trying to customize the colors and text.

    The docs I have found all seem to say different things, such as I can use color names, or have to use hexadecimal, but I haven't had much luck.

    Tee second line here is what I'm trying to do, but once I but this line in most text just goes grey. (top commented line is original)

    #color normal=31 highlight=0x75 helptext=0x1D heading=0x0A standard=0x0F border=0x00
    color normal=black highlight=red helptext=blue heading=red standard=0x0F border=0x00

    Now changing the color line doesnt do too much damage, but editing this next line will basically kill the script.

    write (md)0x220+1 !BAT\necho -n -P:0000 $[0133] --- CLONEZILLA BACKUP\\RESTORE MENU --- \necho -n -P:2300 www.rmprepusb.com\0

    I'd like to edit the header color to red and change the text...not sure whats going wrong. This looks like a custom command that is called on the next line using 'initscript (md)0x220+1', but I can't seem to do it in a way that isn't destructive.

    These two things are all I have left to finish this up, I've done my best to search the net for clues and not ask too many questions but as of now I'm at a loss.

    ReplyDelete
  7. No need to trash your HDD menu.lst.
    Use RMPrepUSB to make a bootable flash drive - click install grub4dos.
    Then add the menu.lst file and your background bitmap (same folder that it is in when on the hdd).
    Now click the 'Test using QEMU' button and you can test out the menu colours, headings, etc.

    ReplyDelete
  8. You will find the answers in Tutorial 21 on www.rmprepusb.com
    http://www.rmprepusb.com/tutorials/grub4dos#TOC-Grub4dos-color-values
    http://www.rmprepusb.com/tutorials/grub4dos#TOC-Adding-your-own-menu-title

    You should find all you need on my site ;-)

    ReplyDelete
  9. Wonderful, those links gave me everything I needed! Thanks again Steve!

    ReplyDelete
  10. Glad it helped. When you get time, have a look at Easy2Boot - it might be useful to you.

    ReplyDelete
  11. This is a fantastic utility, and very well explained too - just what I was after!

    However, I'm experiencing problems trying to remove the boot messages prior to the GRUB4DOS menu. Amending my menu.lst to turn feedback off (i.e. "debug off") eliminates my menu bitmap and the startup messages remain.

    Is there any way to facilitate a "silent" boot (i.e. no onscreen messages until the bootloader menu)? Any insight greatly appreciated!

    ReplyDelete
  12. Great utility, I've used it with success on a number of laptops. However now trying it on a new Acer that has an EFI partition (not sure if that's relevant).

    BIOS boot mode is set to 'Legacy BIOS' (only other option is UEFI) but the grubinst.exe command comes back with error --

    Image type: Other
    grubinst: Unknown image type

    Any ideas about what to try next?

    ReplyDelete
  13. Sounds like it doesn't have a legacy MBR in LBA0.
    Can you install to the PBR instead (the Windows boot partition that loads bootmgr).
    Use Disk Manager to see which one that is.

    ReplyDelete
  14. e.g. grubinst --install-partition=x (hd0)
    where x is the ptn number (0 based)

    ReplyDelete
  15. I have a x64 pc and I got the x64 clonezilla .iso, extracted its live folder properly and everything. When i reboot and have it do the auto-backup it starts backing up on that blue+gray screen and then when it gets to 10% each time it errors out saying Imput output error on device, and then some blue text overlay which I cannot read.

    Basically some bad error, its windows 7 os if this helps i've done this tut. on another pc though and it worked flawlesly, i appriciate all the hard work steve!

    ReplyDelete
    Replies
    1. Sounds like the hard disk is flaky and has an error. Can you run chkdsk /R on it?

      Delete
  16. After using a 10 year old customized bootable Ghost CD to accomplish this, this RMPrepUSB solution seems a valid successor for helping friends and family restoring their systems in an easy manner.

    Alas I must admit I got stuck very fast following the tutorial.
    On every restart I get the grub> command prompt.
    I can get past it typing the two given commands, but even after copying the menu.lst file to the root of C:, it keeps getting stuck there after every reboot.

    I assume it is because the system I am installing this on has three partitions, not two. I put all needed CloneZilla files on E:, since D: is a 'user' partition.
    If I copy "menu.lst" to D: everything works o.k., but as soon I delete it there (I don't want it on D: ) I get stuck again at reboot.
    How do I solve this?

    TIA!





    ReplyDelete
  17. If C:\menu.lst and E:\menu.lst is ignored, then you will have to put it on D: - you can always set the file attributes as hidden and system and read-only so it is not easily deleted.


    Are there any hidden partitions on the disk? Look in Disk Manager.
    If there are some hidden Primary partitions, you could try putting the menu.lst file on one. Typically there may be a type 27 partition. You can use Diskpart to set this to 07 so it is visible to Windows, copy over menu.lst and then set it back to 27 again (27hex that is).

    ReplyDelete
    Replies
    1. Wow, thnx for the fast and informative reply Steve!

      There are no hidden partitions on this specific system. I think I'll try re-partitioning and create one for this specific goal.
      I'm gonna do some experimenting and try to learn this '27'and '07' stuff.
      If you don't hear from me again I succeeded and say thanks!

      Delete
    2. Working great now. Thnx again!

      Delete
  18. Replies
    1. Through Windows 8 I created a small 10MB ntfs partition with drive letter 'A'.
      (I had some raw space left)
      Then I copied the "menu.lst" file to it, and then removed the drive letter and rebooted.
      I have no clue how this works, but it seems it does now...
      (I have zero knowledge about this grub stuff :-(
      Next step for me will be to learn how to personalize the boot screen options, and have a picture displayed again...
      With the great tutorials you made I should be able to accomplish this too.

      Delete
  19. What are the possible color values to change the colors of the text in menu.lst?

    (currently: color normal=31 highlight=0x75 helptext=0x1D heading=0x0A standard=0x0F border=0x00 )

    I have really been searching extensively to my best capabilities, but I I can't find any useful explanation or figure it out.
    The given values are not rgb and not hexadecimal. "color normal" has two 'normal' digits, the others have four, but all starting with 0x?

    Is there an overview somewhere of possible values?

    ReplyDelete
    Replies
    1. See Tutorial 21 - grub4os, on my site.

      Delete
    2. Thnx,
      I'd been there but obviously missed the appropriate part.
      (and looking back, the row with "0 1 2 3 4 5 6 7-L-0 1 2" etc. confused me a lot)

      One question and one suggestion:
      Why is white for normal text "31" and not "0x0F"?

      The color table is a rather low quality jpg which makes it very difficult to distinguish some values.Maybe replace it with a png?

      Cheers!

      Delete
    3. That picture is an actual screencapture of the grub4dos console when you type in the command echo -h - so that is how it looks.


      31 = 0x1f - bg=1=blue, fg=f=white, but as we are in graphicsmode, the background colur is ignored. so 31 is equivalent to 0xf = white.

      I have changed the text slightly now, hope it is clearer! Thanks.

      Delete
    4. Thank you for taking the time to help a newbie in this manner.
      I ran echo -h, but comparing the result to the image on your webpage it's obvious it is really degenerated through compression. E.g. the values directly to the right of 2021 and 3031 are completely unreadable. No biggie, just an observation.

      Delete
    5. ahh, OK - I see. Now changed to png. cheers!

      Delete
  20. It's a great solution, but I have a question.
    I support computers that are hundreds of miles away. There's not always someone on hand to punch keys, so nearly everything has to be done remotely. My remote access software only runs under Windows, and I don't have any options on that.

    Is there a way to set the following up?
    1. Set a flag to boot into Clonezilla.
    2. Manually restart computer.
    ; The next few steps have to be completely hands-off.
    3. Computer boots into Clonezilla partition.
    4. Clonezilla makes a backup of Windows partition.
    5. When backup completes, reset flag to boot into Windows.
    6. Computer automatically restarts.
    7. Boot into Windows.

    How do I do that?
    Thanks in advance.

    ReplyDelete
    Replies
    1. https://www.rmprepusb.com/tutorials/clonezilla#TOC-Automatic-Remote-Backup-Restore

      Delete
    2. THANK YOU! I thought I was reinventing the wheel.

      Delete