XP on hdA,8.10 on hdB-no choice at bootup

Asked by Oldchap

Because my wife would kill me if I damaged her XP,I installed another hd and loaded it with Ubunto 8.10. I made this hd-master and the XP disk slave. I now want a choice on bootup between the two OS's. From forums I think I need to edit the grub file by "sudo gedit /boot/grub/menu.lst" and insert:-
title Windows XP
root (hd1,0)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

When I get to the menu.lst file I am confronted by a list of what,I'm sure, is very useful for those that understand, but for me, a complete newbie to Linux, it's a bit scary.So, is the above correct and how and where do I insert it? Oh! and with or without all those ###'s?--I can't type either.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Oldchap
Solved:
Last query:
Last reply:
Revision history for this message
Oldchap (playasol2) said :
#1

I forgot to add. I disconnected the XP drive when I loaded Ubunto.

Revision history for this message
Ariel Cabral (acabral1961) said :
#2

Hi,
This occurs because you installed Ubuntu without the windows disk connected.
Please, can you paste here the content of /boot/grub/menu.lst
Then I can show you where to put your modifications.
Hope this helps, let me know.

Revision history for this message
Tom (tom6) said :
#3

Yes you are quite right Old Chap :) But it might be slightly safer to back up the file first so i'd recommend

cd /boot/grub
ls
sudo cp menu.lst menu.100209
ls
sudo gedit /boot/grub/menu.lst

the "ls" is "LS" in little letters and shows a list of what's in the folder. "dir" works too but isn't as pretty. The first sudo command will ask for your user password, not your SuperUser/Root one. Then just add ...

# This entry tenderly added by Old Chap for the Xp on /dev/sdb1
title Windows XP Pro
root (hd1,0)
savedefault
chainloader +1

to the end of your menu.lst - the
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
is a bit over-zelous i think, really don't need it. However you can always add it in if Xp doesn't boot. Note that you can modify the "title" as it's just the entry for the actual menu and anything after a # gets ignored by the boot-loader. The # comments are just for humans to read through to explain stuff

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#4

lol, ok if we have used "cd" to Change Directory into the /boot/grub then we really don't need the /boot/grub part in the gedit command

sudo gedit menu.lst

would have been plenty

Revision history for this message
Tom (tom6) said :
#5

Note that for a noob to linux i tend to put the Windows block of text as the first item in the list so that it becomes the default and the noob has to press down-arrow in order to boot into Ubuntu

Revision history for this message
Tom (tom6) said :
#6

Another way to boot back into Windows would be to simply plug the Xp drive in the space where the Ubuntu drive is but really sorting the menu.lst is a much better answer in the longer term

Good luck with this, please let us know how you're getting on
Regards from
Tom

Revision history for this message
Oldchap (playasol2) said :
#7

Thanks Ariel and Tom. Please bear with me-I have to open up and reconnect my UbuntU disk and dinner's nearly ready.I will return with,I hope, the good news asap. thanks again.

Revision history for this message
Oldchap (playasol2) said :
#8

Right I'm back. No dinner yet. I'm going to have to get a new model.
I tried your fix Tom, without success I'm afraid. I tried adding my "map" thing, but again no joy-it boots up every time to Ubuntu. I'm using BIOS to switch between the two at the moment.
Sorry Ariel, but as it's a new installation, I haven't yet got my ADSL connection and all the other stuff working through Ubuntu yet,so I can't paste,copy or print anything at the moment.
I am open to suggestions, but I may have to take the bull by the horns and re-install Ubunto with XP connected and take my punishment like a man if anything goes wrong.
On your head be it.
Cheers! Grub's up..

Revision history for this message
Robert Lynn (rdlynn) said :
#9

This happened to me. I installed Ubuntu several times and then suddenly the boot menu disappeared one time and I couldn't boot to Ubuntu anymore. The problem was that somewhere along the way I had changed the boot drive.
My suggestion is to plug in all the drives and re-install Ubuntu and everything should be fine.

Revision history for this message
Tom (tom6) said :
#10

Don't even need to go that far. Simply fixing the Grub is enough. I found out after doing lots of reinstalls of course. The info is out there but i just didn't read it lol, a classic - I'm glad to hear i'm not alone there ;)

Good luck and regards from
Tom :)

PS yes a reinstall will fix it if everything is plugged in lol

Revision history for this message
Tom (tom6) said :
#11

Copy the menu.lst to the Xp side and copy and paste it into here from there?

You put my lines right at the end of the menu.lst right?

Revision history for this message
Tom (tom6) said :
#12

Right-click it when you're in Xp and "Open With ..." Notepad (or SciTe)

Revision history for this message
Oldchap (playasol2) said :
#13

Hello againTom. I think I may be getting somewhere at last.
I had, in fact placed your commands in the wrong place and they are now near the bottom of the menu.lst, just above those entries for Ubuntu. I used various combinations of commands until I tried my original set which now gives me options to boot. XP is first, followed by two Ubuntu options and finally a memtest86+option.
Unfortunately, before the menu I get an "Error 11: Unrecognized device string-please press any key to continue"
message.
Then if I select Ubuntu-everything goes according to plan, but if I select XP it reverts to the Error 11 message.
My menu.lst entry is:-

title Windows XP
root (hd1,0)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

Can you spot the error?

Also, sorry to be a pain, but can a timeout be set up to auto boot into XP if no other option is selected?

Thanks a lot from an oldie newbie to Linux and computers in general-but I'm learning fast.

Revision history for this message
nhasian (nhasian) said :
#14

hello,

if you havent gotten your grub boot menu up and running yet, may i recommend the Super Grub Disk?

http://www.supergrubdisk.org/

Revision history for this message
Tom (tom6) said :
#15

@ OldChap - i think nhasian is onto something (he usually is). I can't spot what is wrong with your grub (lol) but i'd need to have a tinker around with your machine i think. I'm not familiar with Error 11 but suspect it may just be the line

root (hd1,0)

which may need to be

root (hd1,1)

Personally i'd go for installing a 3rd OS, Wolvix, on the system as a dual-boot on the same drive as Ubuntu. It's usually helped me clarify exactly what is going one but i may be biased in favour of an answer that has usually and often worked for me.
https://launchpad.net/~tomdavies04
http://distrowatch.com/table.php?distribution=wolvix
https://help.ubuntu.com/community/BootFromCD

On the other hand nhasian's advice might be easier

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#16

The

root (hd1,1)

is much more likely on a laptop than a desktop machine but quite possible in either.

Revision history for this message
Oldchap (playasol2) said :
#17

Thanks Tom. I tried (hd1,1). I don't know what happened but I couldn't boot into anything afterwards, not even to a bootable rescue cd-and I did change the boot order in the bios.Turned off the power, had my dinner, turned the power back on and it booted up as though nothing had happened. I've trawled the forums and it looks like there are quite a few dual-booters out there with "Error 11" problems installing 8.10. Thanks, Computer Active!
I will persevere- if I can stand the stress-I'm a bad loser.I will try Nhasian's suggestion-THANKS NHASIAN and I will get there eventually.
Thanks again for your assistance and I've learnt a lot on my first trip into the Forum domain.
I doubt that you've heard the last of me, No doubt "I shall return".
Cheers!

Revision history for this message
Ariel Cabral (acabral1961) said :
#18

Hi Oldchap,
Please, note the differences between what you are trying to do and this (don't add anything to the list I giving to you).
To make the boot happens, please do the following:
1.-Open a terminal (Applications->Accessories->Terminal)
2.- Execute the following command:
         gksu /boot/grub/menu.lst
3.- At the end of the file (maybe under ### END DEBIAN AUTOMAGIC KERNELS LIST) add the following lines:
      title Windows XP
             rootnoverify (hd1,0)
             map (hd0) (hd1)
             map (hd1) (hd0)
             chainloader +1
4.- To make windows start by default you must modify the line that contains the word "default" and change the zero with the quantity of titles do you have minus one (this is because grub start counting on zero)
5.- To change the time do you wish that grub wait for a selection you must modify the line that contains the word "timeout" and change the value by the amount of seconds do you want.
6- To make the list shows to you in order to select which OS start (Ubuntu in your case), press <Esc> while grub waits.

I do this on my machine in exactly your conditions and works well.
Hope this helps, let me know.

Revision history for this message
Tom (tom6) said :
#19

Ahah, looks like Ariel is well on the way to fixing this :)  There's couple of typos tho ...

2. gksu gedit /boot/grub/menu.lst

Note that gksu and sudo are about the same except that sudo asks for the password in the terminal console whereas gksu gives a nice pop-up box that looks a bit more professional. ie the difference is eye-candy

Also in 5. it should have been

5. ... "timout" and change the value TO the amount of seconds you want

again a minor issue that might make a difference.  Now if only i could spot the errors in my own postings i'd be happier lol

Good luck and regards from
Tom :)

Revision history for this message
Oldchap (playasol2) said :
#20

Hi' Tom and Ariel. Thanks for your dedication, mine is wilting slightly. I did discover the timeout thing last night when I was going through the menu.lst to see if I could spot anything with my untrained eye and thanks to you Ariel, I now know how to prioritize the boot order in GRUB.
I tried your string of commands Ariel both with and without my string. With both strings, I received two options on the boot menu for XP. Using your string alone, gave me the same single option as using mine alone. Each time after the invitation to press ESC I got the "Error 11: Unrecognized device string...etc...etc.."
On entering the menu, an XP selection always takes me back to the Error page.
Is it possible that my syntax is wrong?

title(sp)Windows XP (sp=space)(this must be right 'cos it comes up in the menu)
root(sp)(hd1,0)
makeactive
map(sp)(hd0)(hd1)
map(sp)(hd1)(hd0)
chainloader(sp)+1

Thanks again to you both. Bye for now.

Revision history for this message
Tom (tom6) said :
#21

rootnoverify(sp)(hd1,0)

instead of

root(sp)(hd1,0)

Also lose the line

makeactive

So instead of

title(sp)Windows XP (sp=space)(this must be right 'cos it comes up in the menu)
root(sp)(hd1,0)
makeactive
map(sp)(hd0)(hd1)
map(sp)(hd1)(hd0)
chainloader(sp)+1

Use

title(sp)Windows XP
rootnoverify(sp)(hd1,0)
map(sp)(hd0)(hd1)
map(sp)(hd1)(hd0)
chainloader(sp)+1

Revision history for this message
Ariel Cabral (acabral1961) said :
#22

Hi again,
First, sorry for the typos (I burned my keyboard today), nice done Tom!!
Please Oldchap, see the changes I suggested to you (and remarked by Tom), copy and paste to your menu.lst
Hope this helps, let me know.

Revision history for this message
Oldchap (playasol2) said :
#23

Hi! IT'S CRACKED!!!

It was syntax.I tried putting spaces between the brackets in the map commands and BINGO!
All that time and grey hair for two flippin' spaces. BUT I have learnt a lot thanks to your generous assistance.
THANK YOU to all those who have contributed to my education, Robert Lynn, Nhasian, Tom and Senor Cabral.

y Buenas Noches and sweet dreams to you all.
                                                                    The Oldchap (No longer a grumpy old man)

Revision history for this message
Oldchap (playasol2) said :
#24

Sorry Ariel and Tom I was typing my last message when your two last posts came through.So my .lst file now reads:-

title Windows XP
root(sp)(hd1,0)
makeactive
map(sp)(hd0)(sp)(hd1)
map(sp)(hd1)(sp)(hd0)
chainloader(sp)+

It works. Is there any advantage in changing it to any of the above?

Ariel, I noticed you are probably Spanish from another listing. I am using a usb adsl modem at the moment from Telefonica made by Vitelcom. Do you know if drivers are available for Linux or must I buy a router?

Good night once again to all.

Revision history for this message
Ariel Cabral (acabral1961) said :
#25

Hi Oldchap,
This is why we propose the other solution.
Command: rootnoverify device [hdbias]
    Similar to root (see root), but don't attempt to mount the partition. This is useful for when an OS is outside of the area of the disk that GRUB can read, but setting the correct root device is still desired. Note that the items mentioned in root above which derived from attempting the mount will not work correctly.

Command: makeactive
    Set the active partition on the root disk to GRUB's root device. This command is limited to primary PC partitions on a hard disk.

I didn't know if there is drivers for your modem, but if you can afford is always better to use a Ethernet ADSL modem. Outside there is a lot of brands and models and in this case, you need a ADSL modem and (if you have more than one computer) a router. Please, open another question to see if someone else can provide more info.
Lamento desilusionaros, pero soy de Argentina. (I'm sorry to disappoint you, but I came from Argentina)
Con mis mejores deseos. (With my best wishes, also for you Tom)
If you want further discussion about this theme, please reopen this thread.
Good night.

Revision history for this message
Tom (tom6) said :
#26

If what you've got works then keep it. No need to change it to something else ;)
There's a saying "If it aint broke, don't fix it" lol

Nicely fixed. Congrats and welcome to linux :)
Regards from
Tom :)

Revision history for this message
Oldchap (playasol2) said :
#27

Lo siento,Ariel. Viva Argentina!
Vivo en espagne.
Muchas gracias para su ayuda.
Hasta luego.

Nice one Tom. Many Thanks.

Revision history for this message
Tom (tom6) said :
#28

:)))