No option for XP in grub after ubuntu 8.10 install
Thought I'd be clever and try dual booting ubuntu 8.10 with windows XP. Install seemed fine. I partition the drive manually leaving the windows partition alone, setting up 10GB partition for ubuntu and 8GB as swap file, both set as logical. On reboot the grub says its loading but goes straight to Ubuntu. I can press ESC during the load and it gives me the options for ubuntu normal, recovery and memtest but nothing for XP.
I started the install process from the CD again and on the partitioning section it still shows the original windows partition, and now also the two new partitions. Also in ubuntu the windows NTFS drive is there but it doesn't mount. So I'm fairly sure XP is still there but the grub is not finding/looking for it.
As you may have guessed I and completely new to ubuntu. Is there as easy work around? ...or I have been told by booting from the CD I can delete the ubuntu and swap partitions. Is this so? and will that allow access to XP? Then I could try ubuntu again using the guided partitioner.
I am trying to avoid a complete reinstall of XP here! Help
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu grub Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Tom
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
lol, yes avoid re-installing Xp. There's a few quick fixes that would totally solve this problem!
Basically you just need to use a text editor to write Xp into the menu, lol
Revision history for this message
|
#2 |
Thats sounds more like it! ....less grief from wife about losing XP!
As I said I'm new to ubuntu, could you possibly post how to access the menu and what text to add???
Revision history for this message
|
#3 |
To access the Xp partition from the Ubuntu you'll need to install "Samba" so go up to the top taskbar and click on
System - Administration - Synaptic Package Manager
it asks for your normal user password, not your SuperUser/Root one. Use either search tool to find Samba and right-click to install it. Then click on the "Apply" button and it'll connect to the internat and download Samba and all the "dependencies" that samba needs in order to run properly. Note that any packages with a green blob beside them are already installed on your machine and shouldn't need reinstalling or anything.
Now you should be able to see the Windows partition in the "Places" menu on the top taskbar - it'll be called something 'helpful' like "5.1Gb media" or something like that.
Good luck with this part :)
For the part about fixing your 'menu.lst' file in /boot/grub it would be helpful if you could do 2 things for us. First of all go up to the top taskbar and click on
Applications - Accessories - Terminal
into the terminal/command window/console type
cd /boot/grub
ls
sudo cp menu.lst menu.lst.260309
ls
not that the ls is a lower-case "LS", dir also works but unlike the Dos command ls typically more helpful and gives a colour-coded list of the files in the folder. After type the "sudo" command you'll probably be prompted for your normal user password again. The second "ls" command after entering your password should show that the "cp" command has created a CoPy of the menu.lst file - it's always a good plan to make a back-up like this before working on a crucial system-file!
Now just try typing into the same terminal console
gedit menu.lst
and copy all the chunks that don't have a # at the start of lines into here so we can have a look at what's going on with the menu. Then we'll hopefully be able to make some suggestions to tidy it up :)
Good luck and regards from
Tom :)
Revision history for this message
|
#4 |
Ooops typo! Instead of
not that the ls is a lower-case "LS"
i meant
Note that the "ls" is a lower-case "LS"
Revision history for this message
|
#5 |
The 2nd thing that would help us is if you go up to the top taskbar and click on
System - Administration - Partition Editor
guess which password? lol. Take care with this tool as we don't want to accidentally delete anything! For some reason the installer uses the wrong colours for the partitions. The right way is here in gparted. Windows green and linux blue with linux-swap as red because the swap only needs to be about twice as large as your Ram size or een less - if it's smaller than ram you probably wont be able to use the hibernate/
Congrats at getting this far. Please let me know if you need a bit more nudging in the right direction for getting all this info to us as i have kinda forgotten what it's like to be a noob although i've only been using linux for a few months. You'll learn fast too :)
Thanks and regards from
Tom :)
Revision history for this message
|
#6 |
Really all you need do is open a terminla console and type in
cd /boot/grub
sudo gedit menu.lst
and add something like
title Win Xp
root (hd0,0)
makeactive
chainloader +1
to the beginning of the section that isn't commented out by # marks. The sudo command needs a password but gives you SuperUser rights which allows you to save the menu.lst file into the system folder where it belongs. The key is getting the numbers right in "root (hd0,0)" as the grub loader is meant to be better at communicating with the machine rather than being good at talking to humans. It starts all it's numbering at 0 rather than 1 and and uses numbers instead of letters. (0,0) is the main drive (master drive, sda) and then the first partition on the drive, the one linux calls sda1.
Hopefully we can help you sort out your partitions first tho?
Good luck and regards from
Tom :)
Revision history for this message
|
#7 |
Tom
ok, during my lunch hour, I've managed to do the "sudo gedit menu.lst" and add the text as you described.
XP now appears in the grub list, but when I select it is says "starting up...." and nothing happens!!
Here is my partition table if it helps:
Boot Start End Blocks ID System
/dev/sda1 * 1 12748 10239828+ 7 HPFS/NTFS
/dev/sda2 12749 14937 17583142+ 5 extended
/dev/sda5 12749 13964 9767488+ 83 Linux
/dev/sda6 13965 14937 7815591+ 82 Linux swap
Thing is I'm stuck at work and not at my home PC. To make things work my sagem Modem doesn't work with ubuntu. I need to get the drivers.
So I would appreciate any further thoughts??
Revision history for this message
|
#8 |
I have a very strange idea about this issue (corrupted boot record I mean) but, first of all, could you paste the full content of your menu.lst file?
Revision history for this message
|
#9 |
@ Crimer
You want the commented out items?!?!? lol
Revision history for this message
|
#11 |
Ok, i'm assuming that this is such a new install that you don't have any data in there that you want saving. If you do then just copy it across to the Windows side but make sure there's no horrendously long names such as you only really get from saving web-pages.
Using Ubuntu as a Live Cd (ie without installing anything, just try the "Try Ubuntu without changing anything" option) open the partition editor and umount and delete sda6, sda5 and sda2! Ok i know that sounds shocking but there are a number of things we can straighten out and it seems a few things have gone wonky. The sizes seem all wrong in the partition table but i'll go with what you said earlier
Now first create a new Primary Partition immediately after the Windows partition and make it only about 2,048 Mb (hopefully that's at least over Ram size), this is the linux-swap and nudge it right up against the Windows partition, now that its a swap Windows will let it get closer. Next create the Primary Partition of file-system type ext3 (that doesn't mean an extended partition, just an unfortunate coincidence in naming conventions :( ) filling up the rest of the drive. This last partition should be at least 10Gb or 10,240 Mb! Ok, i know 8Gb is the real lower limit but you'll need to give it some elbow room realistically.
This should now allow you to istall Ubuntu properly using these guides and go through the "Manual Partitioning" which should be easy this time ;) Just remember to set the ext3 partition's "Mount Point" to / the root of the linux file-system.
Hopefully it should all work now and grub should find the Xp easily too although it sound like there might be some Windows problem going on that might take a bit of tweaking to fix.
Good luck and regards from
Tom :)
Revision history for this message
|
#12 |
I've just noticed your modem issue. If you're still at work please download and burn a Cd of Wolvix Cub
http://
It's only about 250Mb and should download fast if you avoid the torrents. Run as a LiveCd it should pickup on your modem better as it's Slackware based and a lot of work went into modems and stuff like that in Wolvix. Often if one branch of linux can't see a device another fork will pick it up more easily. Ubuntu is from the Debian fork/branch lol
Revision history for this message
|
#13 |
Also try posting the Sagem issue as a new question in here so that people from the front desk with experience of that particular issue pick up on it (hopefully).
https:/
Good luck and regards from
Tom :)
Revision history for this message
|
#14 |
Tom, thanks for your replies.
Back at home now!
To get XP working I followed some advice to do the following using the live CD
"sudo apt-get install lilo"
"sudo lilo -M /dev/sda mbr"
This sucessfully restored windows mbr allowing XP to load. I'm now trying to unmount and delete the partitions as your advice using the live CD. However in the partition editor the option to "umount" is greyed out and it won't delete sda2 sda5 or sda6 without unmounting them first!...any thoughts? I notice you suggest setting both partitions as primary...I set them up as logical could that be causing the issue??
At least now I can use XP. But I would like to get ubuntu working properly, i'll address the modem issue once I have successful dual boot.
Revision history for this message
|
#15 |
With sda6 you might need to do "Swap Off" before "unmount"ing it and the sda5. i forgot that the terminology is a bit different with linux-swap partitions and so "Swap Off" is the option you need.
I've been told that there's no theoretical difference between logical and primary any more but i have often found a difference in the 'real' world although my machines and drives tend to be fairly old and i'm not sure how much difference all that makes. Making them Primary would be a good way of nudging things in our favour rather than necessarily being "the answer". There's too many variables to be certain of "the answer" at this point. I found that 3rd time i installed a linux everything just magically worked and i'm still unsure what (if anything) i did differently!
Revision history for this message
|
#16 |
Something that usually troubles me at about this point in a problem is - Ok, now everything is working as it shuld. Do i leave it there and maybe try again another day or do i press onward knowing i can get back to this point easily ;)
Revision history for this message
|
#17 |
Thanks Tom
I'll try the "swap off" tomorrow (Friday) and let you know how I get on.
One other point that I forgot to mention was that in gparted I noticed that both sda5 and sda6 are contained within the extended partition sda2.... like two secondary folders within one main folder (if that makes sense!!).....is that how it should be???
Revision history for this message
|
#18 |
Yes that's the whole reason for the Extended Partition, it's just a kind of bucket for holding extra partitions.
It started that drives were set with a limit of 4 partitions but then some people found an advantage with having more and developed the new "Extended Partition" type in order to be able to contain a lot more partitions.
It's this point about "secondary folders" type of thinking that made me notice that when i have OS and Swap on Primary Partitions instead of in an Extended Partition that sometimes quirky problems seem to evaporate. For data it really doesn't seem to matter at all and also sometimes a machine has plenty of Ram so i don't really need a swap partition, so it doesn't seem to matter then if it is in an "Extended Partition" as the only time i'll use it is when i use sleep/hibernate
Nicely spotted! lol, i should have described it better earlier but i had 2 very similar threads at the same time and kept forgetting what had been said in one and not the other!
By the way, thanks for your Lilo answer, that definitely saved one chap that was in serious trouble!
https:/
Good luck and regards from
Tom :)
Revision history for this message
|
#19 |
Sorry for the delayed response on this one.
Thanks for your help Tom. I now have a successful dual boot.
Just for the record here is how...Using the live CD, I selected 'swap off' in partition editor which then allowed me to delete both partitions.
From then I did a fresh install of ubuntu creating, a 8GB swap partition & 10GB linux partition both as primary partitions, with the linux partition set as "/" mount point. The installer still didn't detect XP and offered no options to import setting from XP. When booting up the grub menu still showed no option for XP.. arghh!! So as before I had to edit the grub menu with the following:
cd /boot/grub
sudo gedit menu.lst
title Win Xp
root (hd0,0)
makeactive
chainloader +1
This gave an option for XP in the grub menu which when selected...guess what?...it worked!! :)
So with a bit more tweaking to increase the countdown time on the grub menu, and to set XP as the default loading OS (makes my wife happy) I now have a successful dual boot.
Now if I could just get my USB modem to work!! but thats for another question
Thanks for your help.
Revision history for this message
|
#20 |
Thanks Tom, that solved my question.
Revision history for this message
|
#21 |
Fantastic!! Excellent result, nicely done & congrats :D
Welcome to linux land, especially the Ubuntu corner of it :)
For the modem ...
https:/
the front-desk because i don't have a clue :)
Good luck and regards from
Tom :)