LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-22-2009, 07:09 PM   #1
wroseland
LQ Newbie
 
Registered: Aug 2005
Location: Dayton OH
Distribution: Debian
Posts: 5

Rep: Reputation: 0
Grub Ubuntu Problem Booting Win2K


I run Ubuntu 9.04 and I currently have Grub 0.97. The main drive has win2k on the first partition, NTFS on the second, /boot on the third and additional ubuntu directories on the fourth. I use ubuntu 99.9 percent of the time but need to use windows occasionally. Currently Ubuntu boots but win2k gives me an invalid executable type error. The third partition is usually active. When I started to troubleshoot the problem (win2k fails to boot) the menu entry was:
# This is a divider, added to separate the menu items below from the Deb\
ian$
# ones.$
title\t\tOther operating systems:$
root$
$
$
# This entry automatically added by the Debian installer for a non-linux\
OS$
# on /dev/sdb1$
title\t\tMicrosoft Windows 2000 Professional$
root (hd1,0)$
savedefault$
map (hd0) (hd1)$
map (hd1) (hd0)$
chainloader +1$
The previous failed altogether as it did not find anything to boot.

I changed the menu entry to:
title\t\tMicrosoft Windows 2000 Professional$
root (hd0,0)$
makeactive$
chainloader +1$

And it boots Win2k fine, but it has set the first partition as the active one so on the next boot grub does not load and win2k always boots. I must use a live cd and fdisk to change the active partition so it boots to grub.

The current entry is:
title\t\tMicrosoft Windows 2000 Professional$
map (hd0) (hd2)$
map (hd2) (hd0)$
root (hd2,0)$
chainloader +1$
And I get the error I mentioned.

I do not understand the grub commands well enough to determine why something that seems so simple will not work. I appreciate any help.
 
Old 12-22-2009, 07:22 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
title \t\tWindows 2k
rootnoverify (hd0,0)
makeactive
savedefault
chainloader +1

The rest of your post seems to describe the situation where you have two drives - one of which has ntloader in it's mbr and the other has grub. This would happen if one of your drives was once a windows C:\ drive.
 
Old 12-22-2009, 08:49 PM   #3
wroseland
LQ Newbie
 
Registered: Aug 2005
Location: Dayton OH
Distribution: Debian
Posts: 5

Original Poster
Rep: Reputation: 0
I modified the menu entry as you suggested. It boots Ubuntu OK, and it boots Windows OK, but once that Win2K menu entry executes, the first partition is active so it always boots windows thereafter. I used Knoppix and fdisk to activate the third partition so that Grub loads and I could get back to Ubuntu. The "makeactive" command appears to be a permanent change to the active partition on the drive.

Yes the first two partitions are a Windows 2K installation and they where drives C and D. At one point I moved a viable win2k installation to a new larger drive. I have since installed Ubuntu to use the rest of the drive. It dual booted for quite a while but I did not use Windows for maybe 5 months and when I tried it I received errors. The Windows 2K install works well when the first partition is active.

Grub is on the third partition. Will that work with windows? Do I need to leave the first partition active and install a Grub MBR?
 
Old 12-22-2009, 09:45 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
Go to sf.net and get the bootinfoscript - run it and post the RESULT.txt here. Then we can advise with some needed data.
 
Old 12-22-2009, 09:52 PM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
The standard setup for multiboot is to install grub to the mbr of the first IDE drive.
grub can then be configured to chainload other bootloaders.

If you have any other setup, it would probably explain your problems.

Do I understand you correctly that after booting W2k from the grub menu once, successive boots do not use grub at all? Whatever lives in the MBR has to be able to load bootloaders for other OSs if the multiboot is to work. Proprietary vendors do not really want you to boot anothers product so their stage1 bootloaders tend not to be good at this. This is why we like to do this with GRUB.

sudo grub-install --recheck hd0
sudo update-grub

Note: If you do a fresh install of Karmic or later, all this will be undone and grub2 used.
 
Old 12-23-2009, 06:41 AM   #6
wroseland
LQ Newbie
 
Registered: Aug 2005
Location: Dayton OH
Distribution: Debian
Posts: 5

Original Poster
Rep: Reputation: 0
When I installed Ubuntu it worked for a while but now Grub is only loaded when I make the third partition active. Originally I knew Grub was loaded from the first IDE hard drive, but I thought that it had changed. If I install grub again, should the first partition be active when I do this?
 
Old 12-23-2009, 07:19 AM   #7
wroseland
LQ Newbie
 
Registered: Aug 2005
Location: Dayton OH
Distribution: Debian
Posts: 5

Original Poster
Rep: Reputation: 0
I thought about it and realised that activating partition one first was best. Thanks that worked! I wonder how it changed?
When you refer to a fresh install and undoing this, would updates affect the Grub set-up? I looked at upgrading to 9.10 (I guess this is Karmic, all of the different terms seems to be distracting) but it was going to uninstall a bunch of packages and I could not copy the list to do research so I aborted.
 
Old 12-26-2009, 08:31 PM   #8
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
When you refer to a fresh install and undoing this, would updates affect the Grub set-up?
No. A fresh install will do this. Please refer to the Ubuntu 9.10 release notes for more details.
Quote:
I looked at upgrading to 9.10 (I guess this is Karmic, all of the different terms seems to be distracting)
Can you tell the difference between longhorn and vista? It is the same: "Karmic Koala" is the in-development version and "Ubuntu 9.10" is the release version - the number is the date of the release).
Quote:
but it was going to uninstall a bunch of packages and I could not copy the list to do research so I aborted.
There are a whole lot of packages which are no longer needed as they have been reorganised or replaced. For instance, grub is replaced by grub2.

Personally I upgraded an aspire 4315 without a hitch. Your mileage will vary and I'd suggest that you do a fresh install instead ... though you may prefer to wait until 9.04 goes out of support first - then install Ubuntu 10.04 LTS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with grub dual booting windows xp and ubuntu 7.04 Frozen.past Linux - Newbie 36 01-31-2008 08:49 AM
Booting win2k off a second drive with grub salmo Linux - Software 1 08-29-2004 05:38 PM
GRUB not booting Win2k eqxro Linux - Software 2 08-10-2004 05:40 AM
Booting Win2k from Grub SATA issue davnetuk Fedora 2 08-01-2004 08:25 AM
dual booting Win2k & RH Linux using ntldr->GRUB has problems whitepine Linux - General 3 01-28-2003 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration