GRUB can't load Windows XP... Ubuntu for AMD K8 can't boot up
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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)
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.