LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
Search this Thread
Old 09-27-2006, 12:52 PM   #1
callum85
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Rep: Reputation: 0
Windows won't boot since I installed Linux


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.
 
Old 09-27-2006, 01:01 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
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?
 
Old 09-27-2006, 05:28 PM   #3
callum85
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Please clarify

Quote:
Originally Posted by pljvaldez
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?)
 
Old 09-27-2006, 06:14 PM   #4
callum85
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
OK, I just found the command line.

Here's the output of cat /boot/grub/menu.lst

Code:
# Modified by YaST2. Last modification on Wed Sep 27 15:55:46 BST 2006
color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd1,5)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux Enterprise Desktop 10
    root (hd1,5)
    kernel /boot/vmlinuz root=/dev/hdb6 vga=0x31a    resume=/dev/hdb5  splash=si lent showopts
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    chainloader (hd0,2)+1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
    chainloader (fd0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux Enterprise Desktop 10
    root (hd1,5)
    kernel /boot/vmlinuz root=/dev/hdb6 vga=normal showopts ide=nodma apm=off ac pi=off noresume nosmp noapic maxcpus=0 edd=off 3
    initrd /boot/initrd
And here's the results of fdisk -l

Code:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda2            3825        7011    25599577+   f  W95 Ext'd (LBA)
/dev/hda3            7012        9729    21832335    c  W95 FAT32 (LBA)
/dev/hda5            3825        7011    25599546    b  W95 FAT32

Disk /dev/hdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1            6180       19147   104165460    c  W95 FAT32 (LBA)
/dev/hdb2               1         510     4096543+   7  HPFS/NTFS
/dev/hdb3             511        6179    45536242+   7  HPFS/NTFS
/dev/hdb4   *       19148       30401    90397755    f  W95 Ext'd (LBA)
/dev/hdb5           19148       19409     2104483+  82  Linux swap / Solaris
/dev/hdb6           20716       22021    10490413+  83  Linux
/dev/hdb7           22022       30401    67312318+  83  Linux

Partition table entries are not in disk order
 
Old 09-27-2006, 07:18 PM   #5
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 09-27-2006, 08:49 PM   #6
callum85
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
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?
 
Old 09-27-2006, 09:47 PM   #7
klinux89
LQ Newbie
 
Registered: Sep 2006
Distribution: Suse Linux 10
Posts: 11

Rep: Reputation: 0
no offense but you don't need windows, linux is so much better and it does everything windows can plus more
 
Old 09-28-2006, 12:35 AM   #8
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
@klinux89:
that really helps callum85 to sort out his problems
 
Old 09-28-2006, 05:14 AM   #9
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
And besides there are still somethings that can't be done as well using Linux that he might want to do.

What happens if you change chainloader (hd0,2)+1 to chainloader (hd0,4)?
 
Old 09-28-2006, 06:39 AM   #10
callum85
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Jongi
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.

Last edited by callum85; 09-28-2006 at 06:42 AM.
 
Old 09-28-2006, 06:51 AM   #11
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
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.
 
Old 09-28-2006, 07:06 AM   #12
callum85
LQ Newbie
 
Registered: Mar 2006
Posts: 14

Original Poster
Rep: Reputation: 0
OK, thanks, that sounds good.

I'll post another reply when I'm back online...
 
Old 01-08-2011, 05:24 PM   #13
carrt7
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
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!

Hope this helps.
 
Old 01-13-2011, 05:13 PM   #14
carrt7
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
Oh dear - there was a quicker way!

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.

Tony
www.godornot.org
 
  


Reply

Tags
boot, ntldr, windows, xp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux/ windows dual boot. Windows XP is in portable HDD (already installed) izquierdista Linux - General 1 02-03-2006 10:23 AM
Re-installed windows cannot boot linux ginda Suse/Novell 6 06-13-2005 04:47 AM
Cannot boot Linux though already installed with the Windows XP. malik Linux - Hardware 4 04-28-2004 10:06 AM
Installed Windows and Linux, but can't configure Dual Boot albert106 Linux - Newbie 19 07-31-2003 12:10 AM
Dual-boot with Windows, installed Linux first trusted_content Linux - General 10 06-06-2003 01:38 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration