LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2005, 02:46 AM   #1
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Rep: Reputation: 30
GRUB can't load Windows XP... Ubuntu for AMD K8 can't boot up


I have WIndows XP residing on /dev/sda1 (SATA) and I have just installed Ubuntu Linux 5.04 on dev/hda1.

GRUB shows an option of WIndows XP but it can't load it. I have restored WIndows MBR and installed Ubuntu for a second time. The same thing happened.

How can I load make GRUB load Windows XP?

And on the same system, I have downloaded the kernel for specifically AMD K8 through Synaptic for my AMD Athlon 64. after choosing that option in GRUB, it says:

"kernel panic - not syncing: UFS: Unable to mount root fs on unknown-block"

The generic kernel for 64 bit processor works fine though. What should I do to make it work?

Thanks for reading.
 
Old 07-24-2005, 03:05 AM   #2
[|RoA|]RoadRunner
Member
 
Registered: Jul 2005
Distribution: LFS
Posts: 43

Rep: Reputation: 15
Please post Your " boot/grub/menu.lst " which is actual at the boot-failure.
 
Old 07-24-2005, 04:32 AM   #3
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
I shall not post the whole chunk here but will do so if you need, This is the WIndows portion.

title Microsoft Windows XP Professional
root (hd2,0)
savedefault
makeactive
chainloader +1

Will get back to you regarding the error message as I can't reboot now.
 
Old 07-24-2005, 04:47 AM   #4
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Something weird happened.

I was downloading some packages with synaptic and I rebooted to check out the error message, and as usual, there isn't any, it just show me a grub command line after choosing Windows XP option. And here is the weird thing, after pressing ctrl alt del, GRUB didn't show up, and I was brought to Windows straight.
 
Old 07-24-2005, 04:40 PM   #5
bp12345
Member
 
Registered: Jun 2005
Distribution: Debian testing, Kubuntu 5.04
Posts: 104

Rep: Reputation: 15
What partition is Windows on? hd(0,2) would mean it is on the 3rd (I think - someone correct me if I am wrong) primary partiton on the first hard disk. If it is elsewhere, you need to change ' root hd(0,2) ' to another partition. Mine is on the first partition, ' root(0,0) ' I think.
 
Old 07-25-2005, 12:24 AM   #6
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
The Windows is on the third harddisk (I suppose, it's a SATA drive) first partition.

I can start GRUB and Linux when I disable the SATA drive. And I can start Windows when I disable the first harddisk (the Linux drive). When I enable both of them, things get unpredictable, depending on which I boot last.

Last edited by Navyblue; 07-25-2005 at 12:25 AM.
 
Old 07-25-2005, 01:02 PM   #7
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
The kernel for AMD K8 now works, I guess the download isn't complete the last time.

Anyone can help me out with the Windows booting through GRUB? It just give me a GRUB command prompt after choosing that option, no error message at all.

boot/grub/menu.lst is as follows:

title Microsoft Windows XP Professional
root (hd2,0)
savedefault
makeactive
chainloader +1

My set up is as follows:

Primary master (HD, Linux on first partition)
Primary slave (HD, no OS)
Secondary master (optical drive)
Ssecondary slave (optical drive)
SATA 1 (HD, Windows on first partition)
SATA 2 (nothing)
 
Old 07-26-2005, 10:19 AM   #8
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Anyone?
 
Old 07-26-2005, 12:47 PM   #9
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Your problem is in the menu.lst file. Grub is looking for Window$ on (hd2,0), which is the 1st partition of the 3rd hard drive, something that doesn't even exist according to what you have told us. You have to get grub pointed at windows correctly, try things and see what works. I would guess (offhandedly) that where you currently have root (hd2,0) should say:

Code:
rootnoverify (sda1,0)
chainloader +1

All of the savedefault and makeactive is not usually of any value that I have found. It is important to have rootnoverify instead of root, because grub will try to find a *nix kernel unless it gets the "noverify" part of the command. If that doesn't work, just shift the numbers around, might be sda0, sda2 or something like that. Grub numbers from 0, whereas linux itself numbers from 1.

Peace,
JimBass
 
Old 07-27-2005, 12:42 PM   #10
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Thanks Jim for your input.

As far as I know, GRUB does not use the same nomenclature for harddrive. I have tried (sda0), (sda1), (sda,0), (sd0,0), (sd3,0) and etc, they all give the same error message "error 23: error in parsing number" as long as I don't stick with the format (hdx,x).

I have also tried (hd1,0) (a valid drive with no OS) for fun and the reponse turned out to be the same as in its default, which is (hd2,0). (btw it is what the installer generated, and not made up by me). Would it be possible if it got to do with the boot flag attribute?

I have also tried (hd4,0) and (hd5,0) and the error message says "selected disk does not exist". So I suppose GRUB does recognise the default (hd2,0) as a valid drive.

Anyone has any clues?

Last edited by Navyblue; 07-27-2005 at 12:48 PM.
 
Old 07-27-2005, 03:42 PM   #11
juanjavier_xxx
Member
 
Registered: Aug 2004
Location: Madrid, Spain
Distribution: Debian stable.
Posts: 186

Rep: Reputation: 31
Quote:
Originally posted by Navyblue
Thanks Jim for your input. As far as I know, GRUB does not use the same nomenclature for harddrive....Anyone has any clues?
----Well, I hope I could in a way be useful. Here is my sources.lst minus the commented lines so as not to make a very long post.:
Code:
  
default		0
timeout		5
color cyan/blue white/blue

title		Debian GNU/Linux, kernel 2.6.8-2-k7 
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.8-2-k7 root=/dev/hda2 ro 
initrd		/boot/initrd.img-2.6.8-2-k7
savedefault
boot

title		Debian GNU/Linux, kernel 2.6.8-2-k7 (recovery mode)
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.8-2-k7 root=/dev/hda2 ro single
initrd		/boot/initrd.img-2.6.8-2-k7
savedefault
boot

title		Debian GNU/Linux, kernel 2.4.27-2-386 
root		(hd0,1)
kernel		/boot/vmlinuz-2.4.27-2-386 root=/dev/hda2 ro 
initrd		/boot/initrd.img-2.4.27-2-386
savedefault
boot

title		Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)
root		(hd0,1)
kernel		/boot/vmlinuz-2.4.27-2-386 root=/dev/hda2 ro single
initrd		/boot/initrd.img-2.4.27-2-386
savedefault
boot

title		Other operating systems:
root

title		Microsoft Windows XP Professional
root		(hd0,0)
savedefault
makeactive
chainloader	+1
Now as for the behaviour of this:

If I do nothing, in five seconds (see timeout value) kernel 2.6.8-k7 boots automatically. To boot win$XP I have to select it in less than five seconds. Otherwise refer to last phrase.

So this brings out the following: win$XP is on (hd0,0). However is not the default option. Kernel 2.6.8-k7 is; which lies in (hd0,1).

I hope you can extract something worthly from this. Pity I did not follow an intensive training on GRUB which, on the other side, I find a wonderful boot manager; and a very proficient one.

Please keep telling which your progresses are....

Hope this helps...

Greetz
JuanJavier
 
Old 07-27-2005, 04:47 PM   #12
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I have SATA drives on my home machine with no IDE drives. This is how my menu.lst looks for the first entry:

title Debian GNU/Linux, kernel 2.6.8-11-amd64-generic Default
root (hd0,0)
kernel /vmlinuz root=/dev/sda7 ro console=tty0
initrd /initrd.img
savedefault
boot

That suggests that you should allow grub to point at something like this -

title worthless OS that causes problems (or Win XP)
rootnoverify (hd0,0)
kernel root=/dev/sda
savedefault
chainloader +1

I am not sure if that will work. I had dual booting working about a year ago, but don't use MS anymore, and I didn't have a SATA system when I did that.

Peace,
JimBass

Last edited by JimBass; 07-27-2005 at 04:48 PM.
 
Old 07-27-2005, 08:36 PM   #13
JediDB
Member
 
Registered: Jul 2005
Location: USA - IL
Distribution: Mepis
Posts: 131

Rep: Reputation: 16
How do you restore your MBR for Windows?
 
Old 07-27-2005, 10:59 PM   #14
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by JediDB
How do you restore your MBR for Windows?
Boot up with the installation CD, and enter "recovery mode". Type "fixmbr" at the command prompt, that should clean off any existing stuffs in the MBR and replace it with the Windows stuffs.
 
Old 07-27-2005, 11:16 PM   #15
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Ok guys, thanks again for giving me hope to carry on.

Not sure if it helps if I were to tell my whole story.

I used to have only one SATA drive. Windows on (hd0,0), FC4 on (hd0,7), And Ubuntu 5.04 on (hd0,9). AND GRUB did work nicely. Everything is straight forward, they are all on hd0

Since then I have added two more parallel ATA drives, thinking of moving the Linuxes there. Since then, the system can't boot any of them. Before knowing the fixmbr thingie, The ignorant me installed another copy of Windows just to get the Windows to boot up. And I tinkered with the boot.ini to set the default booting option as my older Windows and the waiting time as 0 second, so that effectively make the system boot up like there is only one OS. I know this is dum and and later I disabled the 2 IDE drives and execute the fixmbr thingie when I am a little wiser. The Windows now work perfect.

And then I proceed on installing Linux, since then, I have to enable and disable harddrives from BIOS to get the correct boot loader working. Linux installation automatically points the Windows to (hd2,0). After choosing that option there is no error message, just a GRUB command prompt. Interestingly, the response is the same when I point the link to (hd1,0) which I know it is an empty drive, so my guess is there is a chance that GRUB actually sees the Windows partition as empty.
 
  


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
How to Change Windows without affecting GRUB or Ubuntu?? crash_override_me Ubuntu 5 10-19-2005 11:17 AM
GRUB doesn't load Windows XP Vladk1000 Linux - Newbie 4 09-17-2005 03:08 AM
GRUB won't load Windows Norab Linux - Hardware 1 08-19-2005 01:33 PM
GRUB config for FC3/Ubuntu/Windows AndrewZorn Linux - General 3 04-06-2005 11:14 PM
Grub will not load Windows XP with Ubuntu dual boot Alex4R Linux - Software 1 03-26-2005 11:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:51 AM.

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