Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I had a computer with Windows XP on it, and about 4 extra partitions on 2 separate hard disks. I installed SLED 10. I used the partition manger during the installation to make sure that the Windows partition was not overwritten. In fact, I set up all the Linux partitions on the second hard disk (hdb), and left the first disk untouched (I think). But Windows won't boot.
When I try to boot Windows, I just get the message "NTLDR is missing".
This is the same whether I try to boot Windows from the "GRUB" boot manager that came with SLED, or when I try to boot from "Smart boot manager" on a floppy disk.
By the way, I am completely new to Linux. So if you write a reply, please be patronising.
Can you post the output of cat /boot/grub/menu.lst and fdisk -l (that's L)? The first will show us your grub file that it's booting from, the second will show us your disk partitions.
Also, did you install grub onto the Master Boot Record of the first drive when you installed SLED?
Can you post the output of cat /boot/grub/menu.lst and fdisk -l (that's L)? The first will show us your grub file that it's booting from, the second will show us your disk partitions.
Although I'm generally very competant with computing, I am completely new to Linux. I'm guessing that you want me to type that text into the command line, but I don't know where it is.
I've looked through the Application Browser and the Control Center, but I still can't find anything saying "Console" or "Command line". In Windows, it was easy to find, but I hardly ever needed it.
Quote:
Originally Posted by pljvaldez
Also, did you install grub onto the Master Boot Record of the first drive when you installed SLED?
I don't know. How would I find out? And how would I change it? (And what exactly is the MBR, by the way?)
Looking at your output from fdisk, I would guess that XP is installed on /dev/hdb3 (which you could verify by mounting the drive and seeing if you see the typical windows folders and stuff). If that's the case, then your menu.lst file is probably incorrect. I would edit your /boot/grub/menu.lst file (as the root user) and change the section about windows to
Code:
###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
root (hd1,2)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
boot
The map statements trick windows into thinking it is the first drive.
Actually, no, Windows is installed on the first hard disk drive (the 80GB one). It is on a logical partition (hda5?) inside the extended partition (hda2?).
So, should I use that code you gave me, or change it?
What happens if you change chainloader (hd0,2)+1 to chainloader (hd0,4)?
I just tried your suggestion, but unfortunately it doesn't work. Attempting to boot Windows just gives a black screen with this text:
Error 1: Filename must be either an absolute pathname or blocklist.
Press any key to continue...
I've changed it back now. By the way, it seems that it's not just a problem with GRUB. When I use Smart boot manager (on a floppy) to boot Windows, I get exactly the same result as with GRUB ("NTLDR is missing"). Do you think this is a problem with the Windows partition itself, or just with GRUB? (Someone mentioned GRUB being installed on the MBR, but I don't really know what the MBR is -- could you explain it for me?)
Quote:
Originally Posted by klinux89
no offense but you don't need windows, linux is so much better and it does everything windows can plus more
Actually, yes, I do need Windows. I need it for my work. I know how to do things on Windows, and I don't (yet) know how to do things on Linux. Maybe one day I will be proficient on Linux, and I will start using Windows less and less until I never use it at all. But suggesting I should give it up completely, right now, just because I can't get into it since installing Linux, is unlikely to win me over. In fact, it's more likely to make me think that Linux is an esoteric OS that's not worth the bother.
For the following you will need an XP CD and a Knoppix LiveCD (I imagine most LiveCDs should do the trick).
How about you boot up with your XP CD and enter a recovery console. Once at the prompt do a fixmbr. This will wipe grub (but keep your Linux partitions intact) and should mean you are able to boot into your XP. If this doesn't work then boot with your XP CD and choose to repair the installed XP. Once your windows work, then you should be able to boot of the Knoppix LiveCD and reinstall grub.
one reason windows wont boot after installing linux
Perhaps I have discovered another reason why Windows fails to boot after installing linux?
I partitioned a new HDD in a Dell Inspiron 640m laptop, to run dual OS. I made a 100Mb boot partition, 200Gb NTFS for Windows, 20Gb for Linux, and left nearly 200Gb for a FAT32 files partition accesible to both OSs.
Then I installed Windows7 from the install DVD - and noticed that it created its own boot partition, also 100Mb, as "partition#2", and renumbered my partitions. But it worked fine.
Then I downloaded the latest Debian linux "net-install" CD (Dec. 2010, Lenny 5.0), and installed it on the 20Gb partition (now partition#4). Worked fine. But now Windows won't boot! Grub clearly shows "Windows Vista (Longhorn)" and "Linux". But when I choose Windows it says "Invalid identifier" (or similar words). Everything looks fine in fdisk.
I read this thread and try everything. Debian install-CD says everything's fine, and shows grub and vmlinuz present in partition#1. Win7 install-CD Rescue Mode also insists everything's fine - and shows Win boot in partition#2, the one Windows made. Reinstalling Grub2 achieves nothing. I am about to abandon linux FOREVER!
Then an idea hits me. Maybe it's having two different boot sectors??
So I repeat the entire sequence of operations above, except that I start with just 3 partitions: 200Gb NTFS (#1), 20Gb ext3, 200Gb unformatted. Bingo! Grub2 again finds "Windows Vista Longhorb NTFS and 20Gb for Linux. Success! Grub finds Windows "vista" and Linux, and they both work!
I am now told that "GRUB2 correctly discovers windows, but makes a stupid mistake
and puts the wrong partition entry in /boot/grub/grub.cfg. It will say
something like (hd0,0) in the stanza which refers to Windows, but it's
actually supposed to be (hd0,1). Or vice versa."
So edit the file, and it should solve the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.