Using a Linux Live CD to clone XP - Page 2


Page 2 of 8 FirstFirst 123456 ... LastLast
Results 16 to 30 of 117

Thread: Using a Linux Live CD to clone XP

  1. #16
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    Just a report of cloning XP for a laptop.

    Daughter needed to switch from an old 40Gb (85% full) to a new 80Gb hard drive. She did not know how to separate the data from the system and everything was mingled up.

    Using Kanotix on a AMD64 3000 MSI mobo PC and The cloning took 1:04 hours, returning 10.6Mb/s trandfer rate. Source disk hooked as an external USB2 disk and the target was put inside a caddy running as internal disk. I had Kanotix installed in a 5Gb partition in the hard disk to perform this task.

    A CD would have been totally adequate but installing it is a 15 minutes job because Kanotix comes with QtParted handy for resizing the partition for its own installation.

    For the hell of it I then tried Ghost (2003 version) so as to see the difference. Got hold of another 80Gb 2.5" disk formatted with the first partition matching the source Xp. Ghost failed twice due to a variety of read and write errors. The maximum it reached was 4% and its scheduled time to completion then was 1:15 hours.

    I went back to Kantotix with the second disk but the cloning was unsuccessfull when I had both source and target disks running as internal hard drives (in caddies). The Toshiba source has no detail on how to configure master and slave. The target Hitachi disk booted but there were a lot of mis-linked files. I therefore had to repeat the exercise.

    I then used a media reader box, not knowing if it was a USB1 or USB2, to host the 80Gb Hitachi unit, which consumes 1 amp, as media reader has its own power supply and battery. The source disk was ran as an internal hard drive in a caddy. The time taken was 3:04 hours for the 40Gb transfer. The first 80Gb unit Fujitsu consumed only 0.55 Amp and could run off a double-head USB port without external power supply.

    Both units cloned by Linux were successfully. The commercial software in this case failed. Had it not it would be still slower than the Linux method.


    dkeav,

    Where does the "sysprep" come from? Is it from MS or a program one needs to build into the distro?
    Last edited by saikee; 01-21-2006 at 02:56 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  2. #17
    Join Date
    Mar 2003
    Location
    Tampa, FL USA
    Posts
    2,193
    Quote Originally Posted by saikee
    For the hell of it I then tried Ghost (2003 version) so as to see the difference... Ghost failed twice due to a variety of read and write errors. The maximum it reached was 4%...
    Good point you bring up there. I've had proprietary($$$) software fail on me several, several times before. Especially a program that rhymes with Martition Pagic. With Liberated Software that is marked "stable", stuff just seems to work. (makes you want to donate money for the cause.)

  3. #18
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    sysprep comes from microsoft, you can get it from their website or off a full install cd, its part of the distrib packages, you run sysprep on your "model" machine prior to ghosting/cloning it strips the drivers, configs etc etc and forces windows to act like it does when it is first installed on a machine, so it will hotplug to the new hardware if needed, plus you can use it to set new hostnames, and generate new SID's in case you are using a ms AD network

  4. #19
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    dkeav,

    Good relevant tips. Thanks for the explanation.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  5. #20
    Join Date
    Sep 2006
    Posts
    1

    Clone linux like norto ghost

    Hi i have a question, does linux have a program like norton ghost that clones hd? i whant to clone several hardrives, to skip install the system (Fedora Core) in each computer

    thanks

  6. #21
    Join Date
    May 2003
    Location
    San Juan Island
    Posts
    71
    There is a bootable iso running bsd that is made to clone hard disks

    http://www.feyrer.de/g4u/

    The disk you are cloning to has to be large or the same size than the source disk if you are on a network you can clone using ftp if you have a ftp server running. You can then remove old hard drive and ftp it back to the new. It works with Linux systems I have not tried to do an XP drive yet
    copeja
    Better is the worst enemy of good enough.
    In a world with out fences who needs gates?
    Avoid the gates of hell. Use Linux!
    Registered Linux User # 251131
    Gentoo Linux 2.6.16.16 SMP P4 2.8 GHz
    FreeBSD 6.0

  7. #22
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    The Linux command "dd" is effectively what Norton Ghost is all about.

    To clone a 300Gb disk with 60 bootable partitions of MS and Linux operating systems there is no simpler, neater and more powerful computing application than typing one line of
    Code:
    dd if=/dev/hda of=/dev/hdb bs=32768
    The above means to data dump from an input file of device hda to device hdb using a block size 32768 which is a track size of 64 time 512 sectors. Without specifying the bs parameter dd simply defaults to 512 bytes in each transfer.

    dd by nature works for any PC operating system because it is a binary transfer sector by sector without relying on any filing system and hence the operating system does not matter.

    There are software Ghost for Unix and Ghost for Linux versions but I have never failed to get what I want with the simple dd command. It helps me to understand what cloning is all about too.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  8. #23
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    This is just an update after trying out the latest Gparted program. The information is intended to convince XP owners to place more trust in Linux ability in resizing XP partitions

    Due to the hard work of forum member Exodus2001 of maintaining Gparted in the past and now offering Parted Magic as a Live CD iso image for free download I have been able to test the Linux resizing ability with ntfs partitions and now report here some excellent results. I did not go into the resizing of Linux partitions as that is taken for granted that a Linux partitioning can always look after its own system. The uncertainty with ntfs partition is until the arrival of "ntfs-3g" program the successful writing on ntfs partitions has been somewhat uncertain.

    For tackling ntfs partitions the program Gparted, which is available in both above Live CDs, has matured to very usable and stable level that Linux users should be aware of. It can form an ideal tool for any body wanting to resize a Win2k and XP. I shall investigate into Vista and report back later.

    Here are the tests I conducted.

    Win2000

    This is on my office laptop with a 2.5" internal 80Gb hard disk partitioned into "c", "d" and "e" drives. The "d" is nearly full but there are 20Gb free space from the "c" drive. In Linux my 3 Windows drives are known as hda1 (for being the 1st primary), hda5 and hda6 (for being the 1st and 2nd logical partition).

    I used Gparted to reduce the size of "c" (hda1). As the office laptop is mission critical so I first "dd" a copy of the entire disk on an external USB hard disk, described in the latter half of Post # 11 of this thread which may be of interest to users worrying about different hard disk geometries.

    To me it is a demanding task for a software to squeeze space out of a primary partition and to put it into the first logical partition because the extended partition border has to be re-drawn too. To play safe I therefore used Gparted to carry out the mission in two stages.

    Stage -1) Squeeze 10Gb out to become unallocated empty space between hda1 and hda5. (Please note Linux reserves hda1 to hda4 as primaries regardless if any of them is used or not, thus explaining how hda5 is following hda1.) When it was done I booted up the Win2k and checked everything was working alright before going into the second phase.

    Stage- 2) I selected hda5 ("d" drive to Windows) and asked Gparted to absorb the newly created empty space. It is easily done by specifying zero space in front of the partition or use the mouse to click/move the end boundary. This operation took a longer time to complete.

    On a reboot Win2k conducted a filing system integrity check as the bugger sensed something has changed. After it found nothing wrong the system boot normally.

    I therefore successfully squeezed 10Gb space out of Windows 2000 "C" drive and give it to the "D" drive which store data only, without the need of a commercial proprietary software.

    XP (professional version)

    I have a box where XP pro occupying the first 150Gb out of a 400Gb Sata disk. I took its back-up copy to conduct the following experiment.

    I know XP doesn't like to be moved so I went in asking for trouble by using the mouse in Gparted to reduce its size as well as moving the XP partition to the middle of the 150Gb space. Thus XP suddenly found 25Gb space at the front as well as 15Gb space in the rear. I asked Gparted to do all of this in one go without even defragging the partition first. It took about 2 hours and the message I got after a reboot was
    Code:
    Missing operating system
    .
    Others may jump out of the seat but not me as I thought since XP partition was occupying the first primary position the relocation of the whole partition could have moved its first sector which is the MBR. Without a MS MBR then of course the Bios has no mechanism to boot up XP. To prove my suspicion I slip in a bootable Grub floppy and rebooted the PC.

    I used the Grub’s geometry command "geometry (hd0)" and found the partitions intact. I then fired up XP manually in Grub by commands
    Code:
    root (hd0,0)
    chainloader +1
    boot
    XP came up and immediately invoked the file system checking. After the files were check it rebooted to the same message. This confirms my thought XP is now bootable but the original MBR has been moved with the partition. So I slip in a XP installation CD (Home edition as it is the nearest available) booted it up with the Sata floppy as this XP is in a Sata. I clicked “R” for repair. This gave me the recovery console (or the command prompt) and so I restored XP’s MBR by the command
    Code:
    fixmbr
    The next reboot saw XP fired up normally.

    Each time a XP detects its partition has been touched it will fire up this message
    Windows finished installing new devices. The software that supports your devices requires that you restart your computer before the settings take effect.

    Do you want to restart your computer?
    At this point I knew I got it licked as this is the standard message a user get if he/she migrates a XP to another disk.

    After this reboot XP works normally thereafter.

    In conclusion I can recommend Gparted, which is also inside Parted Magic, as an excellent tool for resizing Win2k and XP. The attraction of using Gparted in a Live CD is that the software does not need installation into a Windows system. From experience I would say it is on par if not better than the commercial software.

    I take this opportunity to thank Exodus2001 for bringing me up to date with the recent developments of the Linux partitioning/resizing software.
    Last edited by saikee; 01-01-2007 at 02:05 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  9. #24
    Join Date
    Mar 2003
    Location
    Tampa, FL USA
    Posts
    2,193
    Very cool. Thanks saikee.

  10. #25
    Join Date
    Jan 2007
    Posts
    280

    Arrow

    This article made me wonder: why not use dd to dump an image of a partition, containing a clean XP install, to a file on a different partition, which could then be used to restore the OS whenever necessary?

    Supposing I use this command to create the image:

    Code:
    dd if=/dev/hda1 of=/dev/hda10/image.img bs=32256
    And then, use this to do the restoration:

    Code:
    dd if=/dev/hda10/image.img of=/dev/hda1 bs=32256
    a) Will I be correct?
    b) If yes, will I be required to format hda1 before restoring (I usually do that during every reinstall)?
    c) I have a dual boot machine with Grub taking care of the booting process. Will I be required to reinstall Grub after the restoration is over? Or will Grub remain untouched?

    Sorry if the questions sound dumb; I just want to make sure I don't end up hosing my system.
    Last edited by i845_; 01-29-2007 at 02:59 PM.

  11. #26
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    (a) Yes and No because dd copies the binary pattern and so you must have the target of the identical size as the original down to the exact number of sectors. Also XP has a record of the partition number and disk number it was installed and alteration to another partition or another disk position in the booting queue will not work.

    (b) No formatting is needed in dd because it is "1" or "0" being copies across.

    (c) If you restore the image or the partition it works exactly as the original and that is none of Grub's business. It will be boot exactly the way as before.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  12. #27
    Join Date
    Jan 2007
    Posts
    280
    Yes and No
    Well, I don't fully understand this, but all I want to do is to dump the image of a partition (say X) to a file on another partition (say Y) that is far larger than X, and use it later to restore the contents of X, if the need arises. Like Ghost and DriveImage, both of which allow you to image your partitions into files, which can later be used to restore them.

    I remember backing up my boot sector once using dd. I dumped it to a file which I later used to restore the same. This was, if I remember correctly, what I used:

    Code:
    dd if=/dev/hda of=/dev/hda10/bootsect.lnx bs=512 count=1
    This might be irrelevant, but until now, I held the belief that if you dump a block of data using dd to a file, it does not matter whether you store it - restoration will work anyway.

    Was I wrong?

    Append: The forum software wouldn't let me post a reply, so...

    /* @saikee: I'm sorry if this begins to annoy you. */

    Let's consider another scenario this time:

    Supposing the partition containing XP, has a total capacity of 15 Gbytes, of which, only 10 Gbytes are filled up. I understand that an image of the partition, created using dd, shall consist of the data inside the partition, as well as the free space (owing to the fact that dd shall blindly copy bit-for-bit.) In such a case, is there any means of compressing the image so created (read: shaving off the 5 Gbytes of empty space from the image)?

    Again, supposing that it is possible to perform the compression, will restoration from the image so created, work? (I have a feeling that it probably won't - not without a little wrestling.)

    And about vBulletin acting up... I dunno, but each time I post a reply, it gives me a confirmation message. The reply, however doesn't turn up in the topic. Tried it from two separate machines, on separate networks, connected to the Internet via separate ISPs. Still no result.
    Last edited by i845_; 01-30-2007 at 01:43 AM.

  13. #28
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    No you are not wrong because you restore back to its original position which automatically has the same number sectors, in the same partition reference and the same disk order. The way you do it is fine.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  14. #29
    Join Date
    Jan 2007
    Posts
    280
    /* @saikee: I'm sorry if this begins to annoy you. */

    Let's consider another scenario this time:

    Supposing the partition containing XP, has a total capacity of 15 GB, of which, only 10 GB is filled up. I understand that an image of the partition, created using dd, shall consist of the data inside the partition, as well as the free space (owing to the fact that dd shall blindly copy bit-for-bit.) In such a case, is there any means of compressing the image so created (read: shaving off the 5GBs of empty space from the image)?

    Again, supposing that it is possible to perform the compression, will restoration from the image so created, work? (I have a feeling that it probably won't - not without a little wrestling.)

  15. #30
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    As reported in Post #33 the gparted 3.3 and the Parted Magic 1.0 are pretty reliable for resizing the XP partitions. So one can definitely resize the XP partition to the minimize the empty space before dd it out.

    I don't do it myself but if it is pretty standard if the output of dd is a file then it can be piped and compressed by tar.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •