Get yourself some Disk Imaging software.... | Page 2

Discussion in 'Tips and Tricks' started by vbap, June 14, 2005.

  1. Aquarius
    • Premium Supporter

    Aquarius MP Donator

    Joined:
    November 23, 2004
    Messages:
    346
    Likes Received:
    4
    Location:
    NRW
    Ratings:
    +8 / 0
    Home Country:
    Germany Germany
    Show System Specs
    YES, but only to a 2nd machine via network or to another local disk having FAT32- Format.

    Yes.
    Yes, no image file to a local NTFS- disk. But you can make a copy of the NTFS- partitin to another ( free ) local NTFS- partition. So no image FILE, but a complete clone.



    Writing to USB sticks should be no problem, they are recognized as local disk on Linux. I will try that at home tonight ( I'm at office right now :wink: )

    I will write and post a HOWTO in the next days here. So please be patient.

    Thanks all.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. rtv
    • Premium Supporter

    rtv Retired Team Member

    Joined:
    April 7, 2005
    Messages:
    3,622
    Likes Received:
    301
    Occupation:
    CTO at ES2000
    Location:
    Osnabruck
    Ratings:
    +301 / 0
    Home Country:
    Germany Germany
    Show System Specs
    I used many image tools in my job - acronis trueimage is definetly the best windows tool as ghost often produces non working images if ntfs volumes were "uncleanly" shutdown.

    If there are filesystem errors go for knoppix or any other linux live cd (C't bundles recovery linux cds with commercial ntfs drivers sometimes) and use "dd" as it copy sectorwhise..
     
  4. LastMar

    LastMar Portal Pro

    Joined:
    November 17, 2004
    Messages:
    74
    Likes Received:
    0
    Ratings:
    +0 / 0
    Also, I don't see any reason you couldn't copy that image file to a remote NTFS-formatted drive over a network... So yea, make that writeup, this would be extremely useful to me. Ghost does the job, but it's always nice to try something new...
     
  5. thornydevil

    thornydevil New Member

    Joined:
    April 20, 2005
    Messages:
    3
    Likes Received:
    0
    Location:
    Sydney, Australia
    Ratings:
    +0 / 0
    backup via Linux

    Aquarius,
    Another vote from me for a "HowTo" Linux backup.
    Thanks in adavance!
     
  6. Aquarius
    • Premium Supporter

    Aquarius MP Donator

    Joined:
    November 23, 2004
    Messages:
    346
    Likes Received:
    4
    Location:
    NRW
    Ratings:
    +8 / 0
    Home Country:
    Germany Germany
    Show System Specs
    HowTo use LINUX for Cloning/Saving disks and Partitions

    Ok,
    here’s some information on how to save/ clone disks and partitions using LINUX as a helper.

    Needless to say, that all tools described here are for free.

    What you need:

    A Live LINUX i.e. a LINUX which is able to boot from CD and has no interference with your current harddisk. I used KNOPPIX available from www.knoppix.org in various languages. Other distributions might also be available from SUSE,REDHAT,UBUNTU, ...

    If you want to copy/clone via network and your receiver is a WIN32- system then you also need some UNIX- commands for WIN32. You need ‚netcat‘ and ‚cat‘. Netcat is available as nc.exe all over the net, cat.exe can be used from a sourceforge project which I currently do not remember. For convenience, I have copied them all together into one archive and you can get them from here:

    http://de.geocities.com/gsi123/unix4win32.zip

    As said, you only need netcat.exe, cat.exe and perhaps md4sum.exe for creating checksums.

    Assuming the disk/partition does have an NTFS- filesystem, we use ‚ntfsclone‘ as our preferred program. If you have FAT system, use ‚dd‘ ( disk doubler) instead. Watch out, dd has different options than "ntfsclone".

    Cloning/ transfer via network:
    On the machine containing the disk/partition, boot the live LINUX. If you use KNOPPIX, at the command prompt start with "knoppix dma". This speeds up the disk access. If you forgot, get a root shell via TUX-icon -> root–shell. Then enter

    "hdparm –d1 /dev/hda" resp. /dev/hdb . This has the same effect.

    Network:
    If you have a DHCP –server runnning in the net, you‘re done with the network configuration. Otherwise go to TUX icon -> network/internet ->netcard admin ( or similar ) or enter "netcardconfig" in the shell. You are then guided through the network configuration dialogue. To determine your address assigned to you by DHCP enter "ifconfig".

    Disk enumeration:
    LINUX enumerates disc and partitions in a different way than WIN32. The first disk is /dev/hda, the second /dev/hdb. Partitions are numbered like /dev/hda1 for the first a.s.o., They are not numbered consecutively, so go to the disk icons on the LINUX- desktop and the tooltip will tell you the device, a double click will show you the contents. Thus you recognize the disc. Close this window before you proceed, as it is 'auto-mounted‘ and might disturb the cloning to that disk.

    Preparation on the client:
    The client is the receiver of the disk image. Let’s assume it’s a WIN32 machine.

    Unzip the unix4win.zip from above into a directory, open a shell ( the cmd – prompt ) there and enter

    "netcat –l –p 5000 >image.img"

    On XP open the firewall port 5000 as windows tells you. You can use any other port than 5000. That’s it on the client side.
    On the server side with the booted LINUX:

    Assuming we want to clone/ copy the first system partition on the first disk:
    In the root shell ( hopefully still open) , enter:

    "ntfsclone –s –o - /dev/hda1 | netcat <client-ip-adress> 5000"
    Watch the single dash ‚-‚ before /dev/... . It simply means copy the contents of /dev/hda to stdout where netcat is waiting for the input to transfer it over the network.

    That’s it. Now watch ntfsclone and the network working.
    If ntfsclone says "syncing..." then it’s ready and you can stop the process with CTRL-C. Also the "netcat" on the client will stop then.

    Restoral via network:
    SERVER: The machine holding the drive to be restored, boot the LINUX as described above. If you do not know the IP– adress just enter "ifconfig" in some shell.

    Then to restore:
    "netcat –l –p 5000 | ntfsclone –r –O /dev/hda1 –"

    Also watch the dash at the end.

    CLIENT: The WIN32 holding the formerly saved file

    In the shell enter
    cat image.img | netcat <ip-of-the-server> 5000

    That’s it.

    Creating partitions:

    If your target disk did not contain a MBR or is not partitioned yet, use LINUX utilities ‚qtparted‘ or 'cfdisk'. "qtparted" has some nice GUI and is also able to change the size of NTFS – partitions.

    Installing MBR:
    To boot from a blank disk, make the system partition bootable within "qtparted".To install a MBR use the command:

    "install-mbr /dev/hda1"

    Or use the XP- repair console : "fixmbr"

    Professionells do "on the fly" - compression:
    The receiver gets the same command, but the file should get some different naming:
    "netcat –l –p 5000 >image.img.gz"

    The sender makes the compression before it is transferred ‚over the wire‘:

    "ntfsclone –s –o - /dev/hda1 | gzip –9 | netcat <target-ip> 5000"

    (In another shell, watch your PC heavily working using 'top'. It's the taskmanager pendant.)

    To restore:
    On the receiver side ( with the target disk):
    "netcat –l -p 5000 |gunzip | ntfsclone –r –O /dev/hda1 –"

    On the sender, issue the same as already known:
    "cat image.img.gz | netcat <ip-of the server> 5000



    Of course more possibiliies are possible. Check the options of ntfsclone if
    you want to use direct copy.

    Clearly speaking, its more work than using some commercial program.
    But the possibilities are also wider. Restoring a dead PC over a network
    without opening the case it not a bad option.

    Hope it’s of use for somebody. Questions and remarks welcome.

    Aquarius
     
  7. scoop
    • Premium Supporter

    scoop Retired Team Member

    Joined:
    November 14, 2004
    Messages:
    614
    Likes Received:
    7
    Ratings:
    +7 / 0
    Re: HowTo use LINUX for Cloning/Saving disks and Partitions

    Hi,

    Great tutorial!


    I guess that would be http://unxutils.sourceforge.net. Great stuff, I use it all the time. And, it doesn't require me to remember to use "dir" in a Windows command shell after a long day @ work... :wink:

    If you want many more ported Unix software, you might want to check out http://www.cygwin.com. I believe netcat.exe is part of it, too. I use it daily as a freeware X server for Windows...

    Some more tips:
    • You don't need to use netcat if you already have shares enabled on the Windows target machine. Just use samba (smbmount) to "mount" the remote share and access it on your Linux live CD environment as if it is a local drive. See here for a description of the "Knoppix"-way.

      Make sure the partition you're about to clone is UNmounted, before you make the clone. Check with "df -h" or "mount" to see if it's still mounted. If it still is, unmount the partition with "umount <mountpoint>".

      If you need more compression, you might want to use bzip2 instead of gzip.
    Kind regards,
    Michel
     
  8. Anonymous

    Anonymous Guest

    Ratings:
    +0 / 0
    I use ghost 9 for making images, it can make one when windows is running, always handy when youve just installed a new cvs and want to secure your data :)
     
  9. l0z3r

    l0z3r Guest

    Ratings:
    +0 / 0
    Trouble with Knoppix

    I tried the method exatly as you laid it out, with knoppix Live CD, and ntfsclone gave me
    I tried and I tried to resolve this. Perhaps hda3, the partition in question, is mounted i thought. I checked, and then issued the unmount command anyway. I had no luck.

    The drive itself was not bad, Knoppix could mount the partition and see data one it.

    I run another version of linux, ubuntu, on the same machine as the ntfs partion, and I have a partition that is formated as linux-swap space. In the past when I have tried to use disk tools from Knoppix it has mounted the swapspace and caused problems when I tried to work with what should be a completely unmounted drive. When this happened, "swapoff hda?" was not able to solve the problem.

    I tried the commands the exact same way with the Ubuntu live CD, and it worked like a charm. I don't really know the problem with Knoppix, I am just a noob who is speculating. For those of you interested Ubuntu Live can be obtained for free here
    http://www.ubuntulinux.org/download/
     
  10. spotty

    spotty Portal Member

    Joined:
    April 27, 2005
    Messages:
    9
    Likes Received:
    0
    Ratings:
    +0 / 0
    Partition Saving with Dos

    I have been using a freeware dos program from http://www.partition-saving.com/ for backing up the OS partition.
    It has worked fine for me saving the OS partition C:\ to the data partition D:\ which can then be burnt to CD/DVD etc by Windows. This works fine even with both partitions being NTFS.
     
  11. vigstrom

    vigstrom Portal Member

    Joined:
    December 30, 2005
    Messages:
    6
    Likes Received:
    0
    Occupation:
    IT System Admin
    Location:
    Sweden, glorious sweden!
    Ratings:
    +0 / 0
    DriveImage XML

    A free program I've been using for a while is DriveImage XML from:
    http://www.runtime.org/dixml.htm
    No booting special cd-roms, just install and run from XP/win2003.

    I'm also using it on a BartPE cd ( http://www.nu2.nu/pebuilder/ ) to rescue, or fix stuff on non booting systems.

    At work there's just Ghost, mostly because of the ghostcasting function.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 1)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!