LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 06-14-2006, 04:04 PM   #1
sdb124
LQ Newbie
 
Registered: Jun 2006
Location: Florida
Distribution: Mandriva 2006
Posts: 10

Rep: Reputation: 0
Master Boot Record Problem


I've been using GRUB as my boot loader for a while andits great, but since this computer has no floppydisk drive, I had to install it on my hard drive's MBR. Recently though, I found a tutorial on how to use Windows's boot loader to load grub and then a linux system. However, I cannot restore NTLDR. If I had used Lilo instead of GRUB, I could have easily just gone into a root console and typed in
Code:
lilo -u /dev/hda/
However, that's out of the question. Seeing as my computer came with Windows XP Media Center Edition from the factory, I don't have the Windows XP Install disk for it, and cant use the Recovery Console. I also cannot afford to buy a program to restore it.

I had a floppy disk utility that could restore the bootloader, but since they've started making computers without floppydisks, that option is ruled out. My question is this: Is there any way to resotre NTLDR without using the Gateway Restore disk and losing everything? (I've already tried backing up the whole disk, but my antivirus interfered, and I have to do it all over with Norton Off)

Last edited by sdb124; 06-14-2006 at 05:20 PM.
 
Old 06-14-2006, 04:10 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Download a copy of the "Ultimate Boot CD" and use it to restore the MBR.
 
Old 06-14-2006, 04:22 PM   #3
sdb124
LQ Newbie
 
Registered: Jun 2006
Location: Florida
Distribution: Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
I tired that once, but I was a total n00b to these sort of things.

I'm gunna download it, but I might need some more help, so bear with me for a little while if you can.

Last edited by sdb124; 06-14-2006 at 04:29 PM.
 
Old 06-14-2006, 05:19 PM   #4
sdb124
LQ Newbie
 
Registered: Jun 2006
Location: Florida
Distribution: Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
strange boot loader

I used the UBC Disk and opened a tool called "MRB TOOL" using it, I set it to "compact" and the default hd to "Hard disk 1".

However, It is not the default windows Bootloader, which I need for the configuration I want.
 
Old 06-14-2006, 06:53 PM   #5
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Sorry, I mean http://www.ubcd4win.com/contents.htm and use the mbrfix tool to "fixmbr".
 
Old 06-14-2006, 08:44 PM   #6
sdb124
LQ Newbie
 
Registered: Jun 2006
Location: Florida
Distribution: Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
I think i found the tool you were talking about, but how can I make sure? Is there any way for me to see what bootloader I'm using. I need to be sure its NTLDER.
 
Old 06-14-2006, 09:08 PM   #7
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Not sure how to see if NTLDR is up or not. My gut instinct is that if you boot right into windows and don't see "lilo" or "grub" or something else when you're watching the screen, then you did it correctly... Sorry I can't be of more help.

Any particular reason why you don't just keep using grub? Grub dual boots just fine and you seem to be happy with it...
 
Old 06-14-2006, 10:03 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,497

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Should be pretty obvious which loader is in use. Do the following, and look for an appropriate eye-catcher.
Code:
dd if=/dev/hda bs=512 count=1 | hexdump -C | less
 
Old 06-16-2006, 03:34 PM   #9
kflorek
LQ Newbie
 
Registered: May 2006
Location: Michigan
Distribution: Fedora Core
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by sdb124
I think i found the tool you were talking about, but how can I make sure? Is there any way for me to see what bootloader I'm using. I need to be sure its NTLDER.
You probably have it figured out by now, but just in case...

NTLDR is a program that NT-based OSes use to boot themselves, or possibly an alternative OS. NTLDR is an ordinary file on the NT/XP partition, which linux installers do _not_ touch. NTLDR is still there.

What linux installers do is over-write the program part of the "standard" Master Boot Record (standard back to the DOS era) to intercept the loading process before it goes any further and ultimately gets to Windows or DOS.

The MBR exists outside of any file system. The MBR is even outside any partition. Besides the loader in the MBR, all partitions have a spot for a boot record, which also is outside any file system.

Before NTLDR even gets into the act two (three?) loaders have done their thing. First the BIOS loads the MBR into memory. The loader within the MBR is executed and loads a second loader located on the first partition it finds marked "active". This loader is more elaborate than the little one in the MBR. In the case of Windows NT/XP it has to be able to read a file system, and to look up a file called NTLDR (and a couple of other files.)

All you need to get yourself back to the "standard" loading system is to put a "standard" MBR back on the HD instead of one from linux. GRUB hasn't touched NTLDR or the loader on the "active" partition which loads NTLDR.

Last edited by kflorek; 06-16-2006 at 03:37 PM.
 
Old 06-16-2006, 04:37 PM   #10
sdb124
LQ Newbie
 
Registered: Jun 2006
Location: Florida
Distribution: Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Ah that explains it. Anyways, I've figured it all out. One last thing that isnt in the guide I posted was to go to System Properties, go into the Advanced Tab, down into the "Startup and Recovery" section, click settings and make sure that "Time to display list of operating systems: 30" is checked off. It wasn't on mine, and after checking it off, I could boot NTLDR before GRUB which is what I wanted.

Quote:
Any particular reason why you don't just keep using grub? Grub dual boots just fine and you seem to be happy with it...
Well, with grub if you uninstall linux, or if the partitions get deleted, it wont load. This way, though, unless I choose "Linux" from the Windows bootloader, I can still load up Windows and delete the c:\linux.bin="Linux" in my boot.ini.

Thanks for all the help, I'll post if I have any other problems.
 
Old 06-16-2006, 10:52 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,497

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Quote:
Originally Posted by sdb124
Well, with grub if you uninstall linux, or if the partitions get deleted, it wont load.
I can assure you, the same applies to the windows loader.
"Well, with ntldr if you uninstall windows, or if the partitions get deleted, it wont load."

Lilo does things a little differently, however it has it's own issues.
 
  


Reply

Tags
grub, lilo, mbr


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot Linspire & Win XP - new master boot record? jimbo5454 Linux - Newbie 5 07-23-2006 01:06 AM
master boot record help sfr7 Linux - Laptop and Netbook 10 04-25-2004 09:52 AM
Master Boot Record linuxuser05 Linux - General 3 01-11-2004 07:57 PM
master boot record alaios Linux - General 1 04-22-2003 09:41 AM
master boot record dark_light Linux - General 11 07-03-2002 06:21 AM


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

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