Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Kay, so I got Win98 installed on /dev/hda, and then installed Gentoo on /dev/hdb. Everything worked fine, and Windows was bootable after following the great instructions provided on Gentoo's site. I had to do some kernel reconfiguration, so afterwards, I ran GRUB and did this:
> root (hd1,0) // /boot partition of Gentoo
> setup (hd0,0) // first partition on hda! not MBR. oops!
One small typo in the second line is what messed it up, I think; rather than installing the bootloader into the MBR of the first disk, it installed into the first partition of the first disk. I should have typed:
> setup (hd0)
So now GRUB is installed both in the MBR (hd0) and in the first partition (hd0,0). Now, when I select "Windows" from the boot menu, it tries to boot from the boot record on (hd0,0)... which is just GRUB again, giving me the bootloader menu.
As I understand it, there's no way to remove a bootloader from a disk... is there any way, outside of reinstalling Windows (ugh) to restore the Windows boot record on (hd0,0)?
At least Gentoo is working great; I shouldn't have any problems mounting the partition in question and backing up anything important before reinstalling. Should also be easy to restore the MBR using the Live CD after Windows obliterates it...
I am liking Gentoo so far, aside from the lengthy merging/compiling process. Getting distcc installed right now to speed that up, though!
Basically you overwrote the DOS boot sector with grub.
Indeed, there are various ways to fix this.
The original DOS boot sector backup should be in /boot.
You can put it back in place using the "dd" command.
For IDE windoze drive C: try something like this:
% dd i=/boot/boot.dos o=/dev/hda1 bs=512 cnt=1
If you have a bootable DOS disk, you could try using "recover".
Hmm .. where did I get that boot.dos from?
Perhaps left over when I upgraded from lilo?
I am afraid my C: boot.dos has bad values for your HDD.
I recall the boot sectors are customized for each partition;
I once moved the MBR to floppy to boot directly from C: ...
DOS drive partitions have a boot record, two FATs, and root directory.
Sizes vary according to partition size and format (FAT-12, -16, or -32).
DOS will also refuse to repair partitions it does not recognize.
I propose the following solution, if you are williing:
- use the Linux CD to backup the "grub" MBR
- backup the C: partition header
- erase the (grub) boot sector
- run the WinCD "recover" command
- check to see if all is well with C:
- if not, save off the new boot sector
- use "dd" to replace the first Mb of C:
- use "dd" to restore the new boot sector
- use the Linux CD to restore the "grub" MBR
Sound like a good strategy to you?
Since other solutions involve using various repair toolkits,
you should use "dd" to back up the HDD partition header.
Maximum size: boot=512, FATs=2*65536*4, root=[dir_entries]*32
You should be safe if you back up the first Megabyte.
Okay, I was unable to find a 'recover' executable on the Win98 boot CD (or in my \windows\command directory). There was a 'recover.txt' which described how to recover from a previous backup, but I have no such backup.
Anyhow, after a bit more searching, it turns out that I'm not the first person to have done this. This person and this person did the same thing, and the recommended restoration process was to run "sys c:" from a boot floppy. The Win98 CDrom doesn't come with 'sys', so I just used the CD to boot. Can't run 'sys' on the current drive, so I did:
C:\WINDOWS\COMMAND> sys e:
C:\WINDOWS\COMMAND> copy sys.com e:
1 file(s) copied
E:\> sys c:
(I can't believe I ever thought that DOS was cool. What a wussy interface it is compared with *nix). Anyway, windows will now boot. It has apparently lost a bunch of driver settings and whatnot, and the video mode is wrong, but that can be easily fixed.
Thanks a bunch for your help, at any rate! The solution turned out to be much easier than I'd have expected.
Blah. That did not work, apparently. Win98 booted, but practically nothing worked; all my devices were gone, no CD-Rom drive, and I got a protection error on booting it the second time. I tried restoring the original first megabyte that I backed up per your suggestion, and then overwriting the first 512 bytes with the post-recovery version; it booted and seemed okay, but I got critical errors with just about everything I did.
Rather than putz about with it any longer and probably end up with a flaky (flakier) Windows install, I am just gonna reinstall Windows Already got the important stuff backed up (which wasn't too much, since this box just had a fresh install a couple weeks ago), so it should be fairly painless. And actually, we're about to buy a new 80GB hard drive, so maybe I'll just start over with that; the drive that's in there is quite old, and could well be the source of some of the problems.