Can't get Karmic & XP to dual boot
Hello all,
This has had me vexed for 3 days :-( I went from 9.04 to 9.10, and despite a few issues that I've now sorted, it's all good. However, the rest of the family is yet to be convinced of the benefits of 'nix OS's, and therefore this system has always been a dual boot with XP. Since GRUB 2 I can't get that to happen. The machine has 3 HHDs, 1 with XP, 1 with Windows data & games, and one with Karmic. fdisk -l output Code:
Disk /dev/sda: 120.0 GB, 120034123776 bytes Code:
/dev/sda5: UUID="A83CB1173CB0E18C" LABEL="Disk 2" TYPE="ntfs" Code:
(hd0) /dev/sdb Code:
# |
On which drive is windows xp ?
Because on one hand it says windows on sdb1 that is (hd1,0) But root is set for windows as (hd0,0) that is sda1 So on which drive and partition is windows xp |
Ubuntu Karmic 9.10 uses grub2. See this tutorial on grub2:
https://wiki.ubuntu.com/Grub2 First open a terminal and try running: Code:
sudo update-grub Also, did you do a dist-upgrade from 9.04 to 9.10, or did you do a clean install of 9.10? If you did an upgrade then I would recommend fully upgrading to grub2 as per this part of the tutorial: https://wiki.ubuntu.com/Grub2#Instal...untu%209.10%29 Then try running: "sudo update-grub" again. Then reboot. If updating grub does not fix the problem, you can create a custom entry for XP in /etc/grub.d/ as per this part of the same tutorial: https://wiki.ubuntu.com/Grub2#User-defined%20Entries The entry for XP would look something like this: Code:
echo "Adding WindowsXP" >&2 Be sure to run: "sudo update-grub" after creating a custom entry. |
Thanks guys - FYI those outputs were the result after running sudo update-grub.
The install is a clean one from the Alternate CD, as I couldn't get a GUI from either it or the desktop ISO (that's another story!!!) I was confused as well by the XP drive being labelled by the GRUB menu as /dev/sdb1, I thought it was /dev/sda as well. Is that to do with the different way it now counts? I'm sure Karmic is on /dev/sdc blkid reports XP as on /dev/sdb1, whereas fdisk says it's /dev/sda1 - am I reading that right? I'm not on that machine atm, but I will have a go at it later (about 7 or 8 hours local time) when I get home. oh, btw, I've checked that the XP install is still OK by changing the boot order in BIOS and booting to it. I will report back. |
I tried the custom entry method without luck :-( Various combinations of drives/partitions. After changing options, I chmodded and updated GRUB, and then rebooted. Countlessly.
I also installed the GRUB 2 to the /dev/sda and lost the ability to boot XP when it was moved in the bIOS boot order. Even though I tried 3 times to restore the mbr with the XP disk it failed. However, I had a Supergrub CD, and it did the job, thank the flying spaghetti monster!!! It's weird,even though there are 3 HDDs in this box, the HDD access LED is only hooked up to the XP c: disk. When GRUB is directed to pick that menu choice (the default one from the install process - /dev/sdb1), the drive light goes on. If I ctrl-alt-del before the blinking cursor disappears, the system will reboot. |
clarify the following please:
In which drive is grub installed to?? Where is your windows installation?? Have you explicitly set the device mappings?? |
Quote:
Your grub.cfg says: Code:
### BEGIN /etc/grub.d/30_os-prober ### If XP is on /dev/sdb1, that would be (hd1,1) in grub2. So a custom entry in /etc/grub.d for XP would be something like: Code:
echo "Adding WindowsXP" >&2 |
Quote:
GRUB is installed to dev/sdc - Karmic drive, in the / partition, according to Code:
sudo file -s /dev/sdXX XP is on dev/sdb1, media/DSK1_VOL1 (OS & the usual Win data, games etc) The other disk is dev/sda5, media/Disk2 (Data, games, music etc.) I have not changed the device mappings. I checked grub.cfg after the SuperGrub rescue, and nothing's changed, other than since then I've had a kernel update to 2.6.31-15 sudo ls -l /dev/disk/by-uuid returns Code:
total 0 |
Do the following:
1. Set the BIOS boot order such that the hard disk "sdc" (the third HDD) gets first priority. 2. Create (add) an entry as follows in grub.cfg: Code:
menuentry "Microsoft Windows XP Home Edition (on /dev/sdb1)" { By the way if u didnt explicitly set the mappings how/from where did you list it in post #1?? |
Quote:
2. Created an entry as detailed above in etc/grub.d, called it "50_addxp" and chmodded it. When selected in the GRUB 2 menu it returns "error, no such partition. I got the device map listings by looking in /boot/grub/device.map |
Is nt the grub.cfg file in /boot/grub??
try setting root=(hd0,1) in the above cose i mentioned and see.... By the way, wat is the output that you get whem u try the windowzz option that was created by default??? |
No luck with the (hd0,1) change.
I tried to make it simpler for poor old GRUB by removing the disk without an OS on it. It still won't kick XP in to boot. It might sound weird, but on selecting the XP menuentry the HDD light activates while the blinking cursor appears in the top LHS of the screen, and then it goes jet black and requires a hard reset to get back to the GRUB menu. I know it's that drive as it was the first one I installed when I built the machine, and the only one hooked up to a LED. It's as if there's not enough of something to get it over the boot hump :) I've changed the boot order to check that XP boots OK, and it's fine. I wonder if there's some sort of parameter in GRUB that needs to be added or removed to let it start? As before, in the BIOS the Karmic disk is first in order. Grub.cfg is now: Code:
# Code:
/dev/sda1: UUID="01C3D871F965AC80" LABEL="DSK1_VOL1" TYPE="ntfs" BTW, grub.cfg is in boot/grub/, but the config files that make it up are in etc/grub.d/ |
ok.. I never needed to work in /etc/grub.d. Modifying /boot/grub.cfg always gave me the required output.
Grub will not work if you take off a HDD simply because doing so will change the device mappings. Could you create a new grub.cfg file in /boot/grub (just rename the existing one) and just put in the following entries: Code:
menuentry "Ubuntu, Linux 2.6.31-15-generic" { |
Quote:
Did what you suggested - made a grub.cfg file and then from gksudo nautilus pasted it into the /boot/grub/ dir. The output when that menu item was selected was Code:
GRUB_ |
Ok... that was supposed to work... but it does nt thats strange....
You seem to get the grub menu which means grub installation should be fine and i suppose the linux menu entry worked... And since booting the windows HDD worked.... chainloader should ve worked.... Can you post output to Code:
fdisk -l /dev/sda |
All times are GMT -5. The time now is 06:14 PM. |