Results 1 to 6 of 6
Hi,
I currently have two separate Windows XP partitions on the one drive (along with Ubuntu) that were both installed as what grub would call hd(0,0). Each installation of windows ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-20-2008 #1Just Joined!
- Join Date
- Dec 2008
- Posts
- 2
Grub partition swapping
Hi,
I currently have two separate Windows XP partitions on the one drive (along with Ubuntu) that were both installed as what grub would call hd(0,0). Each installation of windows needs to be partition 0 before it will start and run. At the moment i am using ranish to make the partition i want to use partition 0 then booting via grub.
Is it possible to have grub somehow swap the partition numbers for me, similar to the way you can use the map command to swap disk drive order.
Thanks
- 12-20-2008 #2Linux User
- Join Date
- Dec 2007
- Location
- Idaho USA
- Posts
- 358
My guess to what ranish is doing is hidding the first XP partition when the 2nd XP is booted. So the first question , when you boot the 2nd XP can you see the first XP ? IF you can not then you can use the hide function in GRUB. (hide parition)
{For 1st XP}
unhide (hd0,0)
hide (hd0,1) *only if you want to hide the 2nd XP
rootnoverify (hd0,0)
chainloader +1
makeactive
boot
{for 2nd XP}
unhide (hd0,1) *only if you hide it for 1st XP
hide (hd0,0)
rootnoverify (hd0,1)
chainloader +1
makeactive
boot
I hope the above is correct , have never used it. wait for others to comment.
- 12-20-2008 #3Just Joined!
- Join Date
- Dec 2008
- Posts
- 2
Thanks for the reply Lostfarmer.
With Ranish i am actually changing the partition table so that the first entry (hd0,0) refers to the partition that i want to boot.
Doesn't matter which windows installation i boot they both appear as the C: drive with whichever installation i am not booting appearing as the F: drive.
- 12-20-2008 #4Linux User
- Join Date
- Dec 2007
- Location
- Idaho USA
- Posts
- 358
For your basic question. NO, grub can not move/map partition entries, That I know of any way.
It looks like your current setup is a pain to switch XP's to boot.
To make it easier you might take a look at PLOP , a partition manager /boot manager. I have 4 copy's of 98, 4 copy's of XP and 2 linux, all on primary partitions. All Micro Soft OS's when booted are in the first partition slot (HD0,0). I boot directly into 98,XP and use GRUB for linux only. I preselect how each OS will boot and what partitions are in the MBR table.
PLoP - Bootmanager - Free Boot Manager, builtin usb driver, native usb, boot different operating systems, cdrom, usb, freeware
If you have more than the normal partitions, and decide to try plop be sure you have the partition information written down/backed up and understand what is happening.
- 12-20-2008 #5Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 2,515
Have you modified your boot.ini file on one of your xp installs to accomodate both systems? You understand that Grub doesn't actually boot any windows system, just points to the windows bootloader to take care of the job. Usually with Grub, you will have the menu come up with for example: xp, w2k, w98, as an entry if you have those systems. Then you get the windows bootloader which will have these entries listed separately and you can choose which to boot.
Maybe I'm being too simplistic here?
What does the output of 'fdisk -l' look like? Also, what is the output of geometry (hd0), you need to be root and enter grub to get the grub prompt (grub>) to enter that command and post results.
- 04-16-2010 #6Just Joined!
- Join Date
- Apr 2010
- Posts
- 3
One can, in fact, have GRUB "swap the partition numbers" ...
From the GRUB manual:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
This performs a virtual swap between your first and second hard drive.Last edited by kevlar; 04-16-2010 at 03:59 AM. Reason: mis-spelling.


Reply With Quote
