Solved

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

Posted on 2010-09-11
22
715 Views
Last Modified: 2013-12-01
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
 
0
Comment
Question by:Develprog
  • 8
  • 7
  • 4
  • +1
22 Comments
 
LVL 87

Expert Comment

by:rindi
ID: 33653818
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?
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 33655322
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
0
 

Author Comment

by:Develprog
ID: 33656270

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
0
 
LVL 87

Expert Comment

by:rindi
ID: 33656303
Just confirm the Questions you get at fixboot and fixmbr with a Y, so the changes are written to the HD.
0
 

Author Comment

by:Develprog
ID: 33656457


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



0
 
LVL 87

Expert Comment

by:rindi
ID: 33656464
Yes I'm sure.
0
 

Author Comment

by:Develprog
ID: 33656572

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


0
 
LVL 87

Expert Comment

by:rindi
ID: 33656600
Make sure the windows partition is set to active.
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 33656606
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
0
 

Author Comment

by:Develprog
ID: 33658380

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

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 34

Expert Comment

by:Duncan Roe
ID: 33658400
I have no idea - are any Grub experts reading this? Please post
0
 

Author Comment

by:Develprog
ID: 33658877

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

0
 
LVL 87

Expert Comment

by:rindi
ID: 33660171
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.
0
 

Author Comment

by:Develprog
ID: 33668059

>>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 ?
0
 
LVL 87

Expert Comment

by:rindi
ID: 33669469
You can do that with any partition managment tool, I'd use gparted for this.
0
 

Author Comment

by:Develprog
ID: 33748929

>>. 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
0
 
LVL 87

Accepted Solution

by:
rindi earned 500 total points
ID: 33749429
Install grub to /dev/sda
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 33752947
Glad you said that rindi - I would have posted the same except I've ruled myself out as a complete GRUB know-nothing
0
 

Author Comment

by:Develprog
ID: 33871923
Ok,

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

Thank you  
0
 
LVL 27

Expert Comment

by:Tolomir
ID: 34118768
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.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now