Dual boot XP from cloned copy

Started by freddie, February 01, 2011, 17:49:28 PM

Previous topic - Next topic

freddie

Hi,

I have watched the video for two istances of XP in a dual boot situation but it is different from the setup I want. I have three primary partitions on my first hard drive. On partition 1 (the C drive) I have installed XP and all the standard software I want such as antivirus, firefox, pdf reader etc. I have then cloned that installation with Clonezilla and restored it to partition 2 (the D drive). Partition 3 (the E drive) is to be a data partition shared by the two OS's.

Windows XP bootloader (with the boot.ini file amended) will boot into both partition 1 and partition 2 but there are some software problems. I think this is due to the fact that everything in Windows Registry refers to the C drive even though the cloned copy is, of course on the D drive.

I am no expert but I think I need a bootloader that not only hides the Partition 1 from Partition 2 but also fools Windows XP on Partition 2 and makes it think it is on the C drive. Is that correct and, if so, will Plop do what I want it to. Any help would be greatly appreciated together with advice on any particular options I need to use for my particular setup. Many thanks

Elmar

it depends how you cloned xp, but its possible with plop that everything works well

freddie

Hi Elmar

Thanks for your response though I am not sure I understand what you mean. I installed XP on a clean hard drive with a single partition of 25GB leaving the rest unallocated. That single partition is drive C. I then updated XP, activated it and installed my other software such as antivirus etc. I then used Clonezilla to create an image file of that C partition which I saved to a separate USB hard drive.

Using Gparted, I then created a second 50GB partition which became partition D. I then made some minor changes to three files of the cloned copy which referred to Partition 1 so that they referred to partition 2 (the partition they were to be copied to) as advised in the Clonezilla forum. Finally, I copied the image file of partition 1 to partition 2 with Clonezilla.

So I now have the origional XP installation with the other software installed on partition 1 (C) and the copied cloned XP with other software on partition 2 (D). After editing the boot.ini file on both C and D drives I can boot into both installations without a problem. However, there is a problem with some of the installed software on drive D which I guess is because all entries in the Windows Registry think the software is on Drive C and not D because D is a clone of C. What I think I need ( I am no expert) is a boot manager that hides all operating systems from XP EXCEPT the operating system being booted into. In other words, the operating system being booted into always appears to be on drice C. With the XP bootloader, that is not the case as it boots onto drive D.

With Plop, will the OS being booted into ALWAYS appear as drive C? Many thanks for your help

jan4

Yes with plop bootman it is easy to do.
The position in the master boot record (or eaven clear out) will make the drive letter.
So you must UNDO your changes.

Install the plop bootmanager , than boot and go in setup.
Than go to partitions and "Edit Partition" goto "Edit  MBR/Import Data"  , than write on paper the 4*16Byte  P1 to p4 ( just to know where the partitions are )
You can change labels too (in your case there chould be 3 partitions).

leds propose you name partitoins XP1 , XP2 and Data
Than go to profiles than I woud go to profile 16 to make a profile that is the state of the moment:
Label : original
Show in main menu : Yes
Linked Partitions  Hda : *80H XP1
                                               XP2
                                               Data

Back to Profiles menu than profile for booting XP2
Label : XP2 Boot
Show in main menu : Yes
Linked Partitions HDA : *80 XP2
                                       Clear
                                       Data (or leave on Don't Touch )

If you like to see XP1 as D disk you can set XP1 instead of CLEAR,


So you see it's easy to hide or change the position in the MBR.


freddie

Hi Jan4,

Thanks for your post: very kind of you. I did not completely understand your instructions and I have now ended up with an "autochk" error message!!! As I have on my USB hard drive an image file of XP from my origional Partition 1 (without any changes to the boot.ini file AND also a similar image file of XP from my Partition 2, it will be easier if I start again.

So far, I have reformatted the hard drive, created the first primary partition and copied the cloned image file of Partition 1 to it. I wonder if you could tell me the best way forward from here i.e whether I now install Plop or do I create partition 2 now and install the second instance of XP before I install plop.

I hope you can help futher and many thanks for the time you have spent so far.

jan4

Hi , it does not mather !

The easy way would be create all three partitions, then install plop boot manager.
Then you are able to boot XP by booting "HDA PARTITION 1"

If so then reboot to plop boot manager and define the "PARTITIONS" (there could be already 3 partitions , rename them so you know what they are for )
Then Go to "PROFILES" and Change and rename ,

Example :
EDIT LABEL  "HDA PARTITION 1" to  "BOOT XP1" AND IN "LINKED PARTITIONS" CHANGE :
HDA *80h  "DON'T TOUCH" TO  "xp1" (Enter and you can select one of the Partition labels created at partitions )
HDA           "DON'T TOUCH"  to "clear" ( C will do that)
HDA           "DON'T TOUCH"  to "DATA" (or leave it as is)
HDA           "DON'T TOUCH"  ( leave as is or clear if you dont use the 4 th partition)

Now you can still boot XP1 only difference is partiton 2 is hidden so XP will be C and data will be D.

Now make a Profile for XP2 same as XP1 only make boot label "BOOT XP2" and Select on the first line in "LINKED PARTITIONS" select the partition where your second xp will be (XP2) and set bootable (B).
As there is nothing yet booting this profile will fail! ( still Drive for boot = C: and drive for Data =D: Running XP1 now hidden!


Then make a profile with all 3 partitons visable
HDA *80 XP1
HDA        XP2
HDA        Data
HDA        DON'T TOUCH
and reboot that profile then copy Partiton 1 to 2  and you could be able to boot the second created profile.

P.S id you need the data to be E: then devide the data partiton so you can have 2 data partitions and select the emty one on position2 .




freddie

Hi Jan4,

Thanks. Tried to follow your instructions but I have gone wrong somewhere but I don't know where. I now have XP1 installed on partition 1. xp2 installed on partition 2 and the remainder of the drive as the data partition ie partition 3. I have installed Plop from the floppy disk I created and tried to create the profiles etc.

When starting the computer Plop loads and both xp1 and xp 2 appear on Plops menue so I must have done some things correctly. If I select XP1 everything is ok and XP1 boots. If I select XP2 I get a black screen with a flashing curser under the words "Loading Operating System...
                        Boot from CD/DVD :"
and nothing else happens. Can you help me futher? Thanks

jan4

After trying to "boot XP2" press CTRL+Alt+Delete and start your partition manager from CD.

What do you see ?
Free space , NTFS XP boot partition , Data Partition ?


freddie

Hi,

Sorry, not sure what you mean by "start your partition manager from CD?

jan4

You dit create the partitions using a program on cd  i propose  so use that program again to see any changes and if the boot Flag is ok.

You Dit set the boot Flag (B) on your second profile ?

freddie

Hi

If I select XP2 from the Plop boot menu and press ctl/alt/dlt when the flashing curser appears, as you asked me to, Gparted (my boot manager) shows the following:-

Partition          File system   size       Used       Unused     Flags
unallocated     unallocated   24.42     ...          ...
dev/sda1        ntfs             48.83      6.78       42.05       Boot
dev/sda3        ntfs             159.64    69.49(MB)      159.57

if I restart from within XP1 with the cd inserted Gparted shows:_
dev/sda1         ntfs            24.41    6.95        17.46         Boot
unallocated      Unallocated  48.83    ...           ...
dev/sda3         ntfs            159.64    69.49(MB)     159.57

If I select XP1 from the Plop menu and boot into XP1, "My computer" shows:-

Local Disk C  Total size 24.4 and Free Space of 17.4
Local Disk G  Total size 159 and Free space 159
(D I assume would be the hidden 48.83 drive and E and F are my two DVD drives).

Does this help?       


Elmar

hi all,

i think it will be the best when you restart from the beginning

start gparted
keep partition 3 (data) and delete partition 1 and 2
create 2 new primary partitions for xp1 and xp2
activate boot flag at partition 1
write the xp image to partition 1
write the xp image to partition 2

do not boot any xp at this point

install the plop boot manager
go to setup / profiles
select the first profile (created by the installer)
rename it to xp1
select linked partitions
press enter at first line and select hda1
press "c" at the second line to set it to "cleared"
press esc and save

go to the next line to create a new profile
give it the name "xp2"
set visible to "yes"
select linked partitions
press enter at the first line and select hda2
press "b" to set the boot flag at the first line
press esc to save the settings

now boot at first xp1

after that both xp's should work fine.

regards
elmar

jan4

#12
Yes that helps , i think 99% is right only thing I see that is not ok!
Partition where XP1 is got 6.95 used and
Partition where XP2 is got 6.75 used

So i think somethig has gone wrong with the copy to the partition of XP2
Oop they are not the same size , do you have a reason for that?

So try once again make partitions and copy for easy compare make the 2 XP Partitions the same size.

Using the instructions Elmar gave would be the fastest way to do it.

freddie

Hi Elmar,

Thanks. Have carried out you instructions. I am typing this on another computer!!! I am now at the end of your post and have selected XP1 from Plops boot menu and the following has appeared on the screen in red:-

                          ***   Warning   ***
                       The bootsector is the mbr
                       continue boot? [y/n]

Do I select "y"???

Elmar

no, press not "y"

check that in linked partition of the xp1 profile on the first position of hda hda1 is selected and beside hda1 there is the boot flag.

freddie

Hi Elmar,

Thanks but now I am back to the previous problem:one of the two XP's boots without any problem but the other gets stuck at the flashing curser on the black screen and I have no other option except to press ctl/alt/del so that I can boot into the other one, Any ideas?

Just a bit of information in case it is of importance. Before I cloned the two partitions, Windows boot.ini files on both partitions had been edited to add an additional line to bring up Windows dual boot window. This additioal line has been removed from the boot.ini file on hda1 but not on hda2 as it is hidden and I cannot get to the file to edit out that additional line.

jan4

Strange i did for test exaxly the same and both worked fine.

But how dit you manage to change the boot file on the now working partition?

How are you copiing back ??
You speek of 2 different partitions, in case so please retry with the 1 that is working.
So copy the working partition to BOTH PARTITIONS on your HD !

For now simply boot the not working profile, and use CTRL+ALT+Del
Than boot the copy tool from cd and copy the working partition to the visable bootable partition.
That scould do the trick

freddie

Hi Jan4,

Have started from the beginning again but still the same problem: XP1 boots OK but xp2 will not boot - just the black screen and flashing curser.

I have only been able edit the boot.ini file back to how it was when I installed XP from the CD in the first place. I cannot edit the boot.ini file on XP" as it is on partition2 which I cannot see!!

Let me clarify the position regarding the two separate image files I have.
After I installed XP to partition 1 on my new hard disk, updated it, activated it and added antivirus software etc, I cloned PARTITION 1 (not the whole hard drive). Let us call that "Clone1". I read (I think it was on Clonezillas web site) that it was possible to restore a clone of one partition to a different partition but to do so it is necessary to change two file names in the clone image file and to alter the contents of a third file. (Two of the image files have the partition number in their name and the third file has the partition number inside the file: you have to change the numbers from "1" which was the partition I was copying to "2" which was the partition I wanted to restore the copy to.

What I actually did was copy "Clone1" then I changed the three number "1" to number "2" of the three files in the copy and renamed it "Clone 2". Clone1 and clone 2 are exactly the same except for the chages of number1 to number 2. The image files themselves are exactly the same size.

I have tried restoring Clone 1 to partition 2 just to see if that would help but Clonezilla will not restore Clone 1 to Partition 2 - it gives an error message. Tomorrow, I will create another copy of Clone 1, change the numbers so that I have a new Clone 2 just in case the old one has got corrupted somehow. I will post back tomorrow with the result of that. Thanks again for your patience

jan4

Clone 2 is not ok You must undo the changes or use clone1

With the renaming of the 2 files you have probably disabled the boodloader and as you hide the other patition you can't use the bootloader from that.

You surly can boot a unix live cd from CD and undo the changes on your HD.

I don't know "Clonezilla" So i can't say anything about that , I used Norton Ghost to copy (it is on Hirens boot cd 9.5) but i think you can use gparted too.

Elmar

freddie,

when i wrote

Quote from: Elmar on February 03, 2011, 19:27:28 PM
write the xp image to partition 1
write the xp image to partition 2

i was talking about one and the same xp image. this can be either an image of a fresh xp or the image of xp1.

you say clonezilla is not able to write the image of xp1 to the second partition. very strange. why dont you use fsarchiver or partimage? both are free linux partition image tools.
how to use those tools: see http://www.plop.at/en/ploplinux.html#partimage

regards
elmar

freddie

Hi Elmar,

Below is a copy of one of the FAQ's from the Clonezilla website:-

"How can I restore an image of a partition to different partition, e.g. restore the image of /dev/sda5 to /dev/sda6?
Normally Clonezilla only allows you to restore the image to the same partition, i.e. if it's saved from /dev/sda5, you can only restore that to /dev/sda5. If you really want to restore it to different partition, e.g. /dev/sda6, you can:

   1. Create the partition /dev/sda6, and make sure the size is equal or larger than the /dev/sda5 which you save the source image.
   2. Make a copy of image dir, here we use the image "my-image" as an example, e.g.

          cp -a /home/partimag/my-image /home/partimage/my-image-new
         

   3. Now we have to change some files in /home/partimage/my-image-new,
          * Rename all the files /home/partimag/my-image-new/sda5* as /home/partimag/my-image-new/sda6*, e.g.

                    mv /home/partimag/my-image-new/sda5.ext4-ptcl-img.gz.aa /home/partimag/my-image-new/sda6.ext4-ptcl-img.gz.aa
                    mv /home/partimag/my-image-new/sda5.ext4-ptcl-img.gz.ab /home/partimag/my-image-new/sda6.ext4-ptcl-img.gz.ab
                    ...
                   

                Modify the content of /home/partimage/my-image-new/parts, replace "sda5" with "sda6".
    *

   4. //Hint// In the above steps, if you want to save time and disk space, you can create the dir /home/partimage/my-image-new, copy the small files from /home/partimag/my-image, and use symbolic link (ln -fs) to link the sda5* files as sda6*.
   5. Now you can use the menu "restoreparts" to restore the image of partition "sda6" from my-image-new to /dev/sda6, i.e. to use the new created image "my-image-new" instead of original "my-image". "

So that is what I did. I tried to copy the clone of partition 1 to partition 2 without making the changes above but it would not copy and I just got an error message. I will try the two free imaging tools you suggested and will post back when I have done so.

freddie

Hi All,

First my thanks to Elmar and Jan4 for all their help without which I would not have solved the problem. It is now solved!!! For the benefit of others reading this tread, I will try not to omit any important points.

As Jan4 suggested, the problem appears to have been caused by the boot.ini file in XP which I had altered before deciding to use Plop. I had added to the boot.ini file the following line necessary to use Windows bootloader in a dual boot installation:-

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP1" /noexecute=optin /fastdetect

It was after that line was added that I cloned XP1 with Clonezilla and the clone, of course, included the above additional line. I then copied the clone of XP1, altered the three files as instructed on the Clonezilla website as per my previous post and that clone became the copy to restore to partition 2. Unfortunately it included, of course, the additional line in the boot.ini file.

Today, I made a new clone of partition 1 WITHOUT the additional line in the boot.ini file copied the new clone and amended it for partition 2. That copy solved the problem. For the benefit of others, I will make an important point.

Anyone using Clonezilla to do what I wanted to do, may not need to amend the three files as instructed on the Clonezilla website: it all depends at what point in time Plop is installed. If Plop is installed AFTER both instances of XP have been installed, it will be necessary to change the three files because Clonezilla will see both HDA1 and HDA2. However, if Plop is installed and configered as Elmar instructed me in an earlier post above BEFORE XP2 is installed, no amendments will be necessary if you boot into Clonezilla by selecting XP2 from Plop's menu and then pressing ctl/alt/dlt to boot Clonezilla as XP1 will be hidden by Plop and XP2 will appear to Clonezilla to be on HDA1 so the clone of partition 1 will work. I hope I have explained that bit OK.

jan4

Hi freddie,

Nice to hear that you got it working.

If you like to set your data partition back to D you can do so in windows XP
Start --> Control Panel --> Administrative Tools --> Computer Management --> Disk Managment.
Right click on (E:) and right click "Cange Drive Letter and Paths"
Than you can select D and ok.

regards
jan4