Link to home
Start Free TrialLog in
Avatar of Develprog
Develprog

asked on

Multiboot, nothing starts after boot after installing Debian on a Xp disk

Hi,

I have a problem after installing a Debian etch (net install) on my hard disk which
contains Windows XP.

In my disk (500 GB) Windows XP, I have a 4 partitions:

-  first one a boot partition, the  C:parititon   (190 GB)
- second one a data partition D: (270 GB)
- third a small data partition (24 GB)
- fourth another partiton of 1 GB
- fifth another partition of 12 GB

So I decided to install on my third   partition the  / of Debian
and on the fourth partition the swap partition.

SO I use GParted to format partition third with ext3 file system
And partition four with swap partition.

After that I insert the Debian net inst CD to launch installation.


I had a problem when installing Grub because I tried first to let first partition with boot flag
and by this way during installation I accepted that Grub modyfi the first partition table . and after that
I had an error of installing grub in first partition so what I tried this time to keep boot flag on
third partition but this time the installation of Grub ask where to install and propose to frist partition by default
so manually I set to /dev/sda7  but it seems that the third partition was this sda when I launched GParted.

So there was not good and error again.

So now when I start my pc I have this error :

"REBOOT AND SELECT PROPER BOOT DEVICE
OR INSERT BOOT MEDIA IN SELECTED BOOT DEVICE AND PRESS A KEY"

So the problem I think is  maybe if I erase or write on first partition MBR of Windows, I hope that I can restore My xp OS because I don't format the first partition.

How must I retrieve my existing Windows XP and reinstall correctly Debian with Grub ?

How do that I think there is 2 ways to do that (but I'm not sure!!!) :

1°  booting on the Linux partition (third) and grub will propose the XP partition on boot

2° booting on the XP partition (first)  by changing the bootloader of Windows so that Grub can manage it

My first need is to restore my existing XP os, how do that ?

Thank you
 
Avatar of rindi
rindi
Flag of Switzerland image

Boot your PC with the XP CD, and press "R" for repair when that option is displayed. You should then get into the recovery console, from where you can issue fixboot and fixmbr. After that you should be able to boot into XP again.

How exactly is the system partitioned (Primary, Extended, logical drives)? I ask because you can only have 4 primary partitions per drive, and an extended partition counts as a primary partition.

Normally the installer of Debian should have an option to partition your HD, and also, if I remember correctly, it should also offer to automatically install itself side by side with your other OS's, and then when you get to the GRUB part of the setup install it to the mbr. That should give you the option to boot from whatever OS you choose. Usually this should work without problems. Why it didn't work in your case I don't know. Perhaps there is already some other 3rd party app installed that affects your bootup?
It looks to me like Grub did not install in the Master Boot Record (MBR) so you get the above Windows boot error. Windows boot  loader looks for bootmgr or ntldr in the partition which is marked as bootable (i.e. it looks for one or the other depending which version it is - Win7 may be different again). Since you still have a Windows MBR, it may be adequate to mark C: as the bootable partition again - but you will have no boot to Linux
Avatar of Develprog
Develprog

ASKER


I begin first to restore my Xp by booting in the XP cd installation and press R for repairing.

1 C:\WINDOWS

with command fixboot, I receive this message:
 "the destination partition is G:"
would you line really write a boot secor on partition g: ?"


with command fixmbr, I receive this message:

 "the main boot sector  of your computer seems not standard or damaged.
FIXMBR can damage your table partitions.
Would you like really write a new boot sector (MBR) ?"

So I don't know what to do ?

>>have a Windows MBR, it may be adequate to mark C: as the bootable partition again - but you will have no boot to Linux
Ok so it seems this situation so maybe to use GPARTED to set BOOT flag on first partition (Windows) to check if XP is ok ?

And than how fix grub or boot on linux after that ?  


Thank you
Just confirm the Questions you get at fixboot and fixmbr with a Y, so the changes are written to the HD.


The result of GParted gives me this result:

 /dev/sda1 (Windows)  don't show a boot flag
/dev/sda7    show a boot flag

>>Just confirm the Questions you get at fixboot and fixmbr with a Y, so the changes are written to the HD.

Are you sure that it will not do someting wrong because of the message "FIXMBR can damage your table partitions.
" abd after that how must I proceed to restore my installed Debian (or maybe I must reinstall)?

Thank you



Yes I'm sure.

Ok I did what you said fixboot (yes) and fixmbr (yes)

But when I reboot on my disk I have still this message:

"Reboot and select Proper boot device
or insert Boot Media in selected Boot device and press a key"


how fix that by knowing that I must install Debian too?

Thank you


Make sure the windows partition is set to active.
If you want to boot into Debian, you will have to replace the Windows MBR. For some reason, the initial install didn't do that. I never use Grub: I could give you the instructions to do it with LILO if you are interested

>>you will have to replace the Windows MBR.

how do that by choosung to install Grub on first partition or in first partition (Windows) or in the partition where
there is Linux?

I must use Grub.

Thank you

I have no idea - are any Grub experts reading this? Please post

Ok I just see that Grub is sensitive to LBA must I set all my partitin to LBA mode or something like that ?

Thank you

Delete the partition with Linux on it, then try the fixmbr and fixboot stuff again, that should put back the bootmanager and MBR of windows, so you get a cleaner slate to start with again. Below is a Link which gives you some idea on the XP Recovery Console:

http://support.microsoft.com/kb/314058/en-us

Once you have XP booting again, you make sure you don0t have any 3rd party tools installed that may interfere with GRUB or similar. Symantec Goback is an example of such a tool.

After that try installing Debian again, but this time use the debian installer to create the debian partition. Don't do that first with gparted. When it gets to GRUB, select mbr, and hopefully this time it'll work.

>>Delete the partition with Linux on it, then try the fixmbr and fixboot stuff again, that should put back the bootmanager and >>MBR of windows

How do that with Debian installation cd directly or first with Gparted cd to delete Linux partition ?
You can do that with any partition managment tool, I'd use gparted for this.

>>. When it gets to GRUB, select mbr, and hopefully this time it'll work.
Selecting mbr is that mean where the boot partition is ?

Ok for resume, I must first set boot flag on windows partition /dev/sda1 and during installation of Debian I must install Grub in /dev/sda1. Is that the resume ?

Thank you
ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad you said that rindi - I would have posted the same except I've ruled myself out as a complete GRUB know-nothing
Ok,

It was successfull with install on first partition where there is windows with boot flag enable.

Thank you  
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.