Dual Boot Seperate HD wih Win XP
Hello All
I will apologies now for my limited or non existant knowledge of Linux, I have recently (yesterday) installed Ubuntu onto my PC, currently I also have Windows XP installed on a seperate HDD, however when I reboot I see the Grub menu but there is no option for Windows XP. I have read some of the posts relating to this style of issue but most seem to be on the same hdd, I have Win XP on a SATA and Ubuntu on IDE. Could someone please assist in how I should resolve this? Cheers Alan |
In Ubuntu, add an entry for WinXP to the file /boot/grub/menu.lst (you will need to edit the file as root). You will need to post the output of 'fdisk -l' in order for someone to tell you exactly how to phrasr the entry for winxp.
It will be something like this: title WinXP root (hdX,Y) where X and Y indicate the drive and partition of winxp makeactive chainloader +1 |
Thanks for the quick response and information I will post the details shortly.
|
First do you have any experience with terminal? To make a long story short you will need to modify you /boot/grub/menu.lst. Windows wants to be on the first partition of the first hd to boot. Your ide hd will boot first so we need to change the boot menu where windows thinks it is booting first. This will take three or four steps but we need to have an idea where to start.
|
Sorry bigrigdriver, your post slipped in while I was typing mine.
|
Hi Thanks for the great help and suggestions please find below the requested fdisk -l output.
Larry Webb I have a little experience with Terminal but want to expand this knowledge as much as I can. I am sure it will take a while but hey I love a challenge. Quote:
thanks in advance AL |
Hello All
Just wondered whether the following info would assist with helping me understand what needs to be entered into menu.1st? IDE 0 Master Ubuntu Installation 20Gb IDE 0 Slave Data Storage 80Gb IDE 1 Master DVD Device (optical) SATA 0 Windows XP Pro 80Gb SATA 1 Media Storage 500Gb Am I correct in thinking they would be labeled as follows IDE 0 Master = hda,x IDE 0 Slace = hdb,x IDE 1 = hdc,0 SATA 0 = sda,x SATA 1 = sdb,x where x is the partition number? |
The hds are listed hda,? is where the 'a' is the first drive and the "?' is the partition number on that drive (such as 1 for the first partition and so forth). hdb would be the second hd to boot and of course the partition is marked the same. sda is the same as the hds except it stands for sata drives and most external. They say the ides will always boot before the sdas in the boot order. Now with windows on your sda we need to trick it into thinking it is the first in the boot. I need you to go to terminal and show us your '/boot/grub/menu.lst' as root. If you have trouble locating it use the command ' find /boot/grub/menu.lst ' All of this without the hash marks.
|
I am sorry for the prior post, too late at night, your ubuntu will probably list all the hds at sd?. I appears you have one type of windows on sda1 and linux on sda5. Please go to terminal and locate '/boot/grub/menu.lst' by using the command 'find /boot/grub/menu.lst/' without the hash marks.
|
Under the circumstance with 4 hard disks of sda, sdb, sc and sdd it would be better to find out the disk order first.
This can be done while in Ubuntu, choose a terminal and fire up a Grub shell with the command Code:
sudo grub Code:
geometry (hd0) By comparing the geometry of each disk with the sudo fdisk -l in post #6 you can find out the disk orders. A MS Windows must be booted by a primary partition marked by a "*" in the output of fdisk -l. In your case there are two of them; namely sda1 and sdc1. So your WIndows will boot if you instruct Grub to boot up either sda1 or sdc1. The commands, installed in /boot/grub/menu.lst, will be as per bigrigdriver's suggestion in Post #2. All you need is the partition referefernce of (hdx,y). For sda1 it would be (hd0,0). If sdc is your 3rd disk then the partition reference should be (hd2,0). The above assumes you have not altered the disk order before and after Ubuntu installation. If you did then this is the time to tell us because the booting instructions will have to be modified. The other way you can find out which partition you should boot to is to look at the files inside. The partition that can fire up Xp will have the files like boot.ini and NTLDR inside. Lastly Ubuntu belongs to the modern group of Linux that has standardised calling all IDE, PATA, Sata, USB external hard disk and USB memory devices by device names sda, adb, sdc, sdd, sde,....etc. |
Drive order will also be listed explicitly in device.map which exists in /boot/grub.
In fact, should it prove necessary, the drive order seen by grub can be changed using device.map. For instance, here is my device.map: Code:
(hd0) /dev/sde |
The device map is accurate at the time when the Linux installer install Grub. If the disk order has been altered subsequently then the device.map can be out of date.
The interrogation with a Grub shell is the disk order as seen by Grub at the time the commands are issured. If the OP has not altered the disk order or added or withdrawed the hard disks then the device.map would be current. |
If the device.map is out of date, the system often won't boot - or a multiboot system that uses different hard drives may fail to boot some of the alternate choices.
|
I often write my own menu.lst and never bother with the device.map myself. Thus I don't think it matters. Grub only cares about the instructions in menu.lst (or grub.conf if it is a Red Hat).
Whenever I put Grub into a data-only partition or a USB drive I use only two files; stage1 and stage2. That is all one needs to boot "any" PC system manually. The menu.lst is just a script file. |
Hello all
Thank you all for your help this far I have been able to confirm the list of devices and also what the grub line should read. However I have one last issue. This will sound stupid but can someone please advise on how to enter the information? I seem to be limited by permissions when opening the menu.lst with a notepad? thanks again to everyone for your help and assistance on this. |
I am jumping in because saikee and jiml8 are probably asleep. As far as I know all linux distros come with command line text editor vi and most come with at least one GUI which I do not know which one ubuntu uses. But in terminal as root when you get to the file you want to open
# vi /mnt/hd??/boot/grub/menu.lst In other words just name your text editor and put the path behind and when you hit enter it should open the text editor and give you two options to either 'open a new session' or 'open default' which will open your path if your path is correct. If everything works out on your first try do not forget to write and save before ending the session. |
Hello All please ignore my last post, I have find out how to correctly enter information into menu.lst and have one last questions on this. Looking at the list below from "geometry (hdx)" I thought that (hd2,0) was the windows particition however when I entered the information into menu.lst I see the listed on reboot and when I select it I get a the words "starting up" but nothing happens.
could someone please help on advising what I have done wrong? Code:
grub> geometry (hd0) |
Your Grub has reported the same partition layout as Ubuntu Linix. As I predicted (hd0,0) and (hd2,0) are the most likely partitions with XP or its boot loader NTLDR because these two partitions have been marked "active" and bootable by any MS MBR, which is the first sector of a boot loader from Dos to Vista.
When a MS Windows is installed its installer tends to install the boot loader into the first partition, that it recognises (or supports) in the detection queue. Thus if (hd0,0) existed when you installed XP then its boot loader would be in (hd0,0) and the XP proper in the next free unallocated space likely to be (hd2,0). Unless you have altered the disk booting sequence therefore your XP should boot by these commands Code:
title XP installed in (hd2,0) with boot loader in (hd0,0) If you still have a problem then post here the file /boot/grub/menu.lst You can edit /boot/grub/menu.lst as an ordinary user by command Code:
sudo gedit /boot/grub/menu.lst |
Saikee & Larry Webb Thank you for your help here I will make these changes to the Grub as suggested.
Regards Al |
sudo gedit /boot/grub/menu.lst (typed in a terminal window) You need to have root edit privillages, so this will allow you to edit it in Ubuntu. And be sure to click the save button too before exit the file.
|
All times are GMT -5. The time now is 10:21 PM. |