LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB can't load Windows XP... Ubuntu for AMD K8 can't boot up (https://www.linuxquestions.org/questions/linux-newbie-8/grub-cant-load-windows-xp-ubuntu-for-amd-k8-cant-boot-up-346164/)

Navyblue 07-24-2005 02:46 AM

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.

[|RoA|]RoadRunner 07-24-2005 03:05 AM

Please post Your " boot/grub/menu.lst " which is actual at the boot-failure.

Navyblue 07-24-2005 04:32 AM

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.

Navyblue 07-24-2005 04:47 AM

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.

bp12345 07-24-2005 04:40 PM

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.

Navyblue 07-25-2005 12:24 AM

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.

Navyblue 07-25-2005 01:02 PM

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)

Navyblue 07-26-2005 10:19 AM

Anyone?

JimBass 07-26-2005 12:47 PM

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

Navyblue 07-27-2005 12:42 PM

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?

juanjavier_xxx 07-27-2005 03:42 PM

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

JimBass 07-27-2005 04:47 PM

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

JediDB 07-27-2005 08:36 PM

How do you restore your MBR for Windows?

Navyblue 07-27-2005 10:59 PM

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.

Navyblue 07-27-2005 11:16 PM

Ok guys, thanks again for giving me hope to carry on. :D

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.

gruven 07-28-2005 01:52 AM

If Windows resides on a seperate hard drive (in this case being a SATA drive) than grub, then you must use the "map" option to make it think it is on the first hard drive.

Code:

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

That will allow Windows to work with grub, if on a different hard drive. That is what my entry looks like. I have Gentoo on hda and Windows on sda (SATA drive). Grub reads each hard drive as hdx (x being your hard drive number, 0-whatever). IDE hard drives will almost always be before SATA drives.

Navyblue 07-28-2005 04:34 AM

Gruven,

Cool, that does it. :)

Also thanks to all who has responded for your time and effort.

juanjavier_xxx 07-28-2005 12:16 PM

Quote:

Originally posted by Navyblue
Gruven, Cool, that does it. :)

Also thanks to all who has responded for your time and effort.

---Glad you got it. As you see there are very proficient guys out there in LQuestions....

Have fun!!!!:D :D

Navyblue 07-28-2005 01:50 PM

juanjavier_xxx,

Thanks, for the encouragement. Also thanks for your help. :)

I will keep pumping questions to you guys till I got my system right. :D

wölf 07-29-2005 07:41 AM

Thanks again Gruven,
it helped me also !

juanjavier_xxx 07-31-2005 10:19 AM

ENJOY..!!!!!!

Best wishes...

Juanja.


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