problem with MBR / dual boot
I had two hard disks in my pc:
Master: 5GB Slave: 20GB Until yesterday only Windows was installed on it. Now, because all my disks were full I decided to buy a new one (250GB). My master didn't contain any useful information (I thought) only documents, Windows was installed on my slave. What I forgot was that my MBR was written on my Master. So when I formatted my 5GB disk, Windows couldn't start anymore. Now one of the reasons I bought a new disk was to install Linux. So I installed Mandrake 10.0 and thought that I could configure lilo so that he could "find" Windows again. So for the moment my situation is the following. I have two disks: Master: 250GB Slave: 20GB On my master Mandrake Linux 10.0 is installed, on my slave Windows XP is (still) installed. When I start my pc, lilo shows his options: starting Mandrake is no problem, but when I select Windows I get an "non system disk,..." or something like that. What I want is to configure lilo in such a way that I can start Windows again without losing any of my data (and programs) on my 20GB disk. Of course, since the Mandrake installation is only one day old, I can easily reinstall (another version of) Linux. Thanks in advance for those willing to help! |
This isn't exactly answering your question, but I fear you windows partition isn't coming back. Meaning best case senario is that you copy all your files to the linux partition, reinstall windows and then copy all those files back.
Here are the instructions for that though I understand it's not ideal. First step, boot into Linux. For the following instructions we will assume your username on your linux machine is Admiral You may have to open a terminal if it auto-boots into X. Then from the command line type: Admiral@localhost$ cd /mnt/ Admiral@localhost$ ls <-- at this point you should see a directory called windows (or something vaguely familiar like that) If so, carry on with the steps below. If not, post again. Admiral@localhost$ mkdir /home/Admiral/Windows_Files Admiral@localhost$ cp -r /mnt/windows/whatever_files /home/Admiral/Windows_Files During your windows install be sure to create a small partition (~2G) that is FAT32 so that you can read&write files to and from both OSes. HTH -S |
Your data is not lost - merely your ability to directly access it.
Windows needs to boot from the primary drive. As such you need to convince it that it is on the "master" disk, not the "slave". I believe that LILO achieves this via "map-to=" and "to=" directives. Basically you need to logically swap hd0 and hd1 so Windows will boot. Do some searching and you should find references online. |
Thanks for your answer!
That sounds a little bit more encouraging than sinnermans answer. I'm a bit confused. You say: . As such you need to convince it that it is on the "master" disk, not the "slave". But my disk IS on the slave so it isn't it the other way around. And if I do this (what I will try in 1 minute) will LILO find something there since my old MBR was on my old hard disk that isn't in my pc anymore. |
The MBR is *always* on the primary (master) disk. Each disk may have a boot record in the first sector, but only ONE is given control by the BIOS. For that boot, it is *the* MBR.
In your case the code in the MBR launches LILO - the drive swapping directives are merely logical, and for the benefit of brain-dead software that is unable to discern that other (non primary) drives exist on your system. Namely Windows. After you update the lilo config, you'll have to rerun the lilo command I believe. If you were using grub I could easily give you the updates for the config, but it's been too many years since I used lilo - I refuse to allow any distro to install it on my systems. |
I read some information about LILO and I'm alot wiser but my problem isn't solved (yet).
Apparently my lilo.conf is right (I'm already using the map-drive an to 's). But when I run fdisk -l my second hard drive isn't bootable (there isn't a * next to it). I have had a dual boot in the past so I'm assuming I have to do something extra, maybe adjusting jumpers? Can I fix this? |
I tried it once with grub
Without changing anything, restarting and selecting windows I get: Code:
Booting Windows |
I think your lilo.conf should contain something like this (as syg00 already mentioned):
Quote:
EDIT just read your last post. With grub try: Code:
title windows |
Hey,
Thanks for your suggestion, but I keep getting the same error. I managed to setting the bootflag on the hdb. Thanks for that! |
Try making the root command
Code:
rootnoverify (hd1,0) |
maybe im way off base but couldnt you just use delpart utility the new GUI version wipe out the old MBR and use a windows recovery console to rebiuld your mbrand then go from there idk i had a similier problem with dual oot and thats how i fixed it
|
Bob,
Thanks for the suggestion. I did that and now it's kinda solved. I tried fixmbr (and fixboot) many times with no luck. But after reading some information I found that I had to copy two files from the Windows XP rescue cd. The main problem I think was that Windows just couldn't boot from a slave and when I tried fixmbr and fixboot nothing changed. When I swapped my two drives from master to slave everything worked. So now everything is restored. I have just repartitioned my new drive. Copied some old files on it. I have just downloaded Fedora. Now writing to a dvd and then I can install everything Thanks for all your help! |
All times are GMT -5. The time now is 07:20 AM. |