LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Master Boot Record Problem (https://www.linuxquestions.org/questions/linux-hardware-18/master-boot-record-problem-454770/)

sdb124 06-14-2006 03:04 PM

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)

pljvaldez 06-14-2006 03:10 PM

Download a copy of the "Ultimate Boot CD" and use it to restore the MBR.

sdb124 06-14-2006 03:22 PM

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.

sdb124 06-14-2006 04:19 PM

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.

pljvaldez 06-14-2006 05:53 PM

Sorry, I mean http://www.ubcd4win.com/contents.htm and use the mbrfix tool to "fixmbr".

sdb124 06-14-2006 07:44 PM

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.

pljvaldez 06-14-2006 08:08 PM

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...

syg00 06-14-2006 09:03 PM

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

kflorek 06-16-2006 02:34 PM

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.

sdb124 06-16-2006 03:37 PM

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.

syg00 06-16-2006 09:52 PM

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.


All times are GMT -5. The time now is 04:54 PM.