Jump to content











Photo
- - - - -

grub4dos: Multiple XP's on same disk


  • Please log in to reply
14 replies to this topic

#1 bleu

bleu
  • Deactivated
  • 6 posts
  •  
    United Kingdom

Posted 08 September 2007 - 05:34 PM

Hello,

Can soneone please help....

I have an 80GB disk with 3 partitions, PART-A, PART-B, PART-C.
XP was installed on PART-A and PART-A was ghosted to PART-B and PART-C.

When I boot PART-A, I see the disks with their labels as follows:-
C: PART-A
D: PART-B
E: PART-C

I would like to boot PART-B sucessfully and see the disks as:
C: PART-B
D: PART-A
E: PART-C

and boot PART-C and see the disks as:
C: PART-C
D: PART-A
E: PART-B

However, so far I haven't managed to get the second partion booting...
If I canot see all the disks when booting PART-B and PART-C, then so be it - but it would be nice to be able to!

I have also copied GRLDR onto PART-A and created a menu.lst which at this point in time is as follows:

[codebox]
# n.b. grub sees 0,2,3,4 not 0,1,2,3

title WinXP on PART-A
unhide (hd0,2)
unhide (hd0,3)
unhide (hd0,0)
root (hd0,0)
makeactive
chainloader +1

title WinXP on PART-B
unhide (hd0,0)
unhide (hd0,3)
unhide (hd0,2)
root (hd0,2)
makeactive
chainloader +1

title WinXP on PART-C
unhide (hd0,0)
unhide (hd0,2)
unhide (hd0,3)
root (hd0,3)
makeactive
chainloader +1
[/codebox]
boot.ini has the line: C:\GRLDR="Start GRUB" and grub boots OK but I can only get the first partition to boot.

Any constructive help welcome.

Hal

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 08 September 2007 - 06:31 PM

I need more info on the setup you are trying.

"ghosted" is a bit generical, and NOT the "correct" way to setup a multi-partition system.

You see, NT/2K/XP assign drive letters based on info on the disk, like disk signature and partition start.

The "same" (i.e. "ghosted" install) will always try to have as C: (i.e. system drive) the first partition, as it is on the original install.

You do not report an error,

I haven't managed to get the second partion booting...

is again generical, do you get a grub4dos error, a bootsector error, a NTLDR one or a BSOD of some kind?

Are the partitions all Primary?

Did you "ghost" the entire partition? (i.e. including bootsector, that will thus become invalid on the new partition?)
If this is the case, do not use:

chainloader +1

but rather:

chainloader hd(0,x)/ntldr

(thus bypassing the bootsector)

Do read this:
http://www.goodells....iboot/index.htm
and expecially these pages:
http://www.goodells....boot/ptedit.htm
http://www.goodells....ot/editbini.htm
http://www.goodells....ot/partsigs.htm

in order to understand some of the problems involved in what you are trying to make.

jaclaz

#3 yahoouk

yahoouk

    Silver Member

  • .script developer
  • 518 posts

Posted 09 September 2007 - 09:59 AM

Hi bleu,

Welcome boad :loleverybody:
You can try as follow:
chainloader (hd0,2)/ntldr
boot

chainloader (hd0,3)/ntldr
boot

I had similar error once in some mobos and you have to hide other 2 partition instead of unhide.
title WinXP on PART-B
hide (hd0,0)
unhide (hd0,2)
hide (hd0,3)
root (hd0,2)

title WinXP on PART-C
hide (hd0,0)
hide (hd0,2)
unhide (hd0,3)
root (hd0,3)

NOTE: hide - unhide with grub can sometimes occur your partitions to be unactive.

Hope a little help.

Regards

yahooUK

#4 my77

my77

    Newbie

  • Members
  • 14 posts
  •  
    Afghanistan

Posted 10 September 2007 - 03:36 PM

I assume "ghosted" means copying a whole partition?

Then you simply have to change the drive letters in windows xp on part b and part c. Since they are exact copies, they will also have exactly the same drive letters assigned. Easiest way is using the registry. Go to HKLM/System/Mounted Devices and rename the entries \DosDevices\C: \DosDevices\D: \DosDevices\E:. For PartB, \DosDevices\C: would become \DosDevices\D: and \DosDevices\D: would become \DosDevices\C:. Just rename them, do not change the contents.

You can also change the registry of part b and part c from your windows that runs on part a. Either with special tools or by loading them to your registry with regedit.

You can avoid this in the future by deleting the contents of HKLM before you "ghost" your partition. Then windows will rebuild the assignments of each partition clone after first boot.

#5 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 11 September 2007 - 08:03 AM

Then you simply have to change the drive letters in windows xp on part b and part c. Since they are exact copies, they will also have exactly the same drive letters assigned. Easiest way is using the registry. Go to HKLM/System/Mounted Devices and rename the entries \DosDevices\C: \DosDevices\D: \DosDevices\E:. For PartB, \DosDevices\C: would become \DosDevices\D: and \DosDevices\D: would become \DosDevices\C:. Just rename them, do not change the contents.

For the record, unfortunately :loleverybody:, the above will probably make the system on the partition unbootable and/or will create "cross-links" to files on other partitions. A number of paths to folders and files are "hardcoded" in the Registry to the original letter assigned to the partition and after a rename will either fail to work anymore or work with files on another partition (as they are clones).

Do read these, AND links therein:
http://www.goodells....ot/partsigs.htm
http://www.911cd.net...showtopic=18782
http://www.msfn.org/...showtopic=90495

jaclaz

#6 bleu

bleu
  • Deactivated
  • 6 posts
  •  
    United Kingdom

Posted 11 September 2007 - 10:57 PM

OK, I have done some reading and things have progressed quite a bit. Thanks for help so far!
Previously whenever I booted, it always ended up booting off PART-A, regardless of what I selected.
I have set things up now so that the menu.lst on each partition is:
[codebox]# n.b. grub sees 0,2,3 not 0,1,2 title WinXP on PART-A # Let's see them all unhide (hd0,2) unhide (hd0,3) unhide (hd0,0) root (hd0,0) makeactive chainloader +1 title WinXP on PART-B # show only PART-B hide (hd0,0) hide (hd0,3) unhide (hd0,2) root (hd0,2) makeactive chainloader +1 title WinXP on PART-C # show only PART-C hide (hd0,0) hide (hd0,2) unhide (hd0,3) root (hd0,3) makeactive chainloader +1[/codebox] and the boot.ini is [codebox][boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(x)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(x)\WINDOWS="XP Pro on partition x" /noexecute=optin /fastdetect C:\GRLDR="Start GRUB"[/codebox]Where x is 1, 2, 3 for PART-A, PART-B, PART-C respectively. When I boot PART-A it comes up fine, if I then restart, go into grub and boot PART-B it also comes up fine and then when I restart, go into grub and boot PART-C, it comes up fine too. However, when I then restart again I immediately get the error message: 'Missing operating system' and the system hangs. Recovery is possible using a grub floppy and the steps under 'WinXP on PART-A' in menu.lst above.

Any thoughts on why PART-C is misbehaving on reboot?

Hal

#7 bleu

bleu
  • Deactivated
  • 6 posts
  •  
    United Kingdom

Posted 11 September 2007 - 11:14 PM

Forgot to say:

1) All 3 partitions are primary
- XP was installed on an 80GB IDE disk, it was resized down to 6GB using Partition Magic and 2 more primaries were added of a similar size.
2) 'ghosting' was actually done using ImageCenter 5.6 (Drive Image). I simply asked for the first partition to be copied to the second and then to the third.
3) Then the partitions were labelled.

Hal

#8 my77

my77

    Newbie

  • Members
  • 14 posts
  •  
    Afghanistan

Posted 12 September 2007 - 12:49 AM

@jaclaz

For the record, unfortunately :loleverybody:, the above will probably make the system on the partition unbootable and/or will create "cross-links" to files on other partitions. A number of paths to folders and files are "hardcoded" in the Registry to the original letter assigned to the partition and after a rename will either fail to work anymore or work with files on another partition (as they are clones).


Why shouldn't it? If Part B is an exact copy of Part A and you boot Part B as primary active then the registry in Part B will actually have Part A assigned as drive C:. With switching \DosDevices\C: to \DosDevices\D: and vice versa you actually _avoid_ cross-links or using files from another partition.

@bleu:Possibly you had y logical partition before that now is still in the second line of the partition table and that is why grub does not see your xp's as 0,1,2 but 0,2,3. For testing you can put 0-byte files on each partition for example name them xp1,xp2,xp3 and in grub command line enter find /xp1 or find /xp2 to determine which partition corresponds to which hd label. Careful, case sensitiv.

Do you have a ntldr on Part C? When you boot from Part C does the corresponding boot.ini appear "XP Pro on partition 3"? You also have to check the ARC partition numbering for Windows. Boot from recovery console and type map arc. If indeed there is a logical partition it might cause different partition numbering for grub and windows. windows puts logical partitions always after primary ones.

#9 yahoouk

yahoouk

    Silver Member

  • .script developer
  • 518 posts

Posted 12 September 2007 - 07:44 AM

OK, I have done some reading .......................................................


Your boot.ini wil be as follows:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(x)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Partition A " /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=" Partition B "
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS=" Partition C"
C:\GRLDR="Start GRUB"

If not, you need to check with DiskManagement and re-write it.

For your 'Missing operating system' error, you did not notice my FootPrint in my note as follows:

NOTE: hide - unhide with grub can sometimes occur your partitions to be unactive.

Sorry for my missing explainatopm because I thought you are very familiar with Grub.
Because you made active your partition B or C during operating, when you restart, your active partition will be changed to B or C. That's why your OS cannot find boot.ini file in new active Partition.
You have 2 options to prevent that and you can use both of them as well.
1. copy your boot.ini file to B and C partition.
2. add rootnoverify (hd0,0) command in every menu.lst title.
For example,
title A

hide (hd0,1)

hide (hd0,2)

unhide (hd0,0)

chainloader (hd0,0)/ntldr

rootnoverify (hd0,0)



title B

hide (hd0,0)

hide (hd0,2)

unhide (hd0,1)

chainloader (hd0,1)/ntldr

rootnoverify (hd0,0)



title C

hide (hd0,0)

hide (hd0,1)

unhide (hd0,2)

chainloader (hd0,2)/ntldr

rootnoverify (hd0,0)
Hope a little help.

Any error, reply me.

Regards,

yahooUK

#10 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 12 September 2007 - 12:13 PM

Why shouldn't it? If Part B is an exact copy of Part A and you boot Part B as primary active then the registry in Part B will actually have Part A assigned as drive C:. With switching \DosDevices\C: to \DosDevices\D: and vice versa you actually _avoid_ cross-links or using files from another partition.


Theoretically, yes :loleverybody:, and if you are 100% sure that EVERY function and feature connected to or depending from:
1) Drive/partition number
2) Partition letter assignment
3) Volume serial
4) SID
5) License of OS and apps
of the Operating System and of all installed applications (I am assuming that it is not a bare-metal OS :w00t:, otherwise there is no much sense in cloning it) is not affected in any way, AND you have a way out in case of problems hiding/unhiding making active/not-active partitions, it is a working solution.

What I meant was that it is my opinion that probably it won't work as expected as noone can be 100% sure of the above.

jaclaz

#11 yahoouk

yahoouk

    Silver Member

  • .script developer
  • 518 posts

Posted 12 September 2007 - 12:47 PM

QUOTE"(yahouuk)
Why shouldn't it? If ............................. cross-links or using files from another partition.

:loleverybody: :w00t: :w00t: :w00t:



#12 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 12 September 2007 - 01:40 PM

:w00t: :w00t: :w00t: :w00t:


Sorry, I don't understand what you mean? :loleverybody:

jaclaz

#13 yahoouk

yahoouk

    Silver Member

  • .script developer
  • 518 posts

Posted 12 September 2007 - 03:13 PM

Sorry, I don't understand what you mean? :loleverybody:

jaclaz


:w00t: ..... because you've mis-coded my name instead of "my77".....

:w00t:

#14 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 12 September 2007 - 04:43 PM

@yahoouk

Oooops, :w00t: sorry :w00t: .

I have done a mis-copy (or a mis-paste) :loleverybody:

:w00t:

jaclaz

(Editing my previous post to fix the wrong reference)

#15 bleu

bleu
  • Deactivated
  • 6 posts
  •  
    United Kingdom

Posted 26 September 2007 - 08:05 PM

An update is in order. Sorry this is a bit long.... Thanks for the help supplied.

I have settled on a near-optimal solution which is as follows:

4 partitions, A,B,C (as before) and new partition D, a 'shared disk' which is always visible.

The way it works is as follows.

On initial power up I get an XP boot screen saying:

XP on Partition A
XP on Partition B
XP on Partition C
set partition visibility via grub

I can then go into grub and set which partitions I want to see:

Show all disks
Just show A
Just show B
Just show C

If I now select 'Just show A', I get an XP boot screen saying:

XP on Partition A
set partition visibility via grub

and I can boot A, in which case partition A boots and I can see A (and D).
Alternatively I can set visibility which takes me back to the grub screen and I can select show all disks.
If I then boot A, I can see all the disks.

The visibility aspect works as you would expect for B and C as well.

So this method allows me to boot any partition and see all disks or just see the boot partition and the shared disk.

n.b. I would get a blue screen if I did the following:
  • Select 'Just show C' on the grub screen
  • boot C
  • shutdown & reboot - this gives the initial power up screen
  • Select partition A
This is as you would expect since trying to boot an invisible partition is a bit daft! I should just select the grub option and either make all partitions visible or just the one I want to boot.

Here are the files and their contents:-

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Part-A has the following relevant files:

* grldr
* menu.lst (on Part-A only)

# n.b. grub sees 0,2,3,4 not 0,1,2,3

title Show all disks
unhide (hd0,2)
unhide (hd0,3)
unhide (hd0,0)
chainloader (hd0,0)/ntldr
rootnoverify (hd0,0)

title Just show A
hide (hd0,2)
hide (hd0,3)
unhide (hd0,0)
chainloader (hd0,0)/ntldr2
rootnoverify (hd0,0)

title Just show B
hide (hd0,0)
hide (hd0,3)
unhide (hd0,2)
chainloader (hd0,2)/ntldr
rootnoverify (hd0,2)

title Just show C
hide (hd0,0)
hide (hd0,2)
unhide (hd0,3)
chainloader (hd0,3)/ntldr
rootnoverify (hd0,3)

* boot.ini

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP on Partition A" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="XP on Partition B" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="XP on Partition C" /noexecute=optin /fastdetect
C:\GRLDR="set partition visibility via grub"

* boat.ini

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP on Partition A" /noexecute=optin /fastdetect C:\GRLDR="set partition visibility via grub"

* ntldr (untouched so points to boot.ini as normal)
* ntldr2 (hacked with hexedit to point to boat.ini)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Part-B has the following relevant files:

* grldr (needed here too)
* boot.ini

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="XP on Partition B" /noexecute=optin /fastdetect
C:\GRLDR="set partition visibility via grub"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Part-C has the following relevant files:

* grldr (needed here too)

* boot.ini

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="XP on Partition C" /noexecute=optin /fastdetect
C:\GRLDR="set partition visibility via grub"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I would prefer not to use the hack for ntldr2 but I think the above is an effective solution to my requirements.

I think this is a relatively safe way of doing things. Any subtle issues I should look out for?

Hal.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users