[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Removing debian from hdd



Martin Steigerwald wrote:
> schrieb Guido Martínez:
> > I recently borrowed a hard drive and installed debian on it, alongside
> > windows. I used it for a couple of weeks.
> > 
> > Later, I tried to remove debian by deleting the partitions I had
> > installed it on, but that caused grub to fail horribly, and I had to
> > reinstall debian. How can I remove debian? Can I make grub ignore that
> > partition and then delete it?
> 
> You need to install a MBR record and set the Windows partition as 
> bootable.

Yes.  That is exactly what you need to do.

> Should be pretty straight forward, but I never had to do it.

Unfortunately it isn't simple.  And it is different depending upon
many factors.  I recently needed to go through this task and it was
not trivial.

> Otherwise you'd need some kind of Windows rescue CD/DVD and restore the 
> Windows boot loader from there.

That is what I needed to do in my case.  I *needed* to resort to
booting from rescue media.

You didn't say what version of windows you are using.  That is
unfortunate because every version is different and the answer is
dependent upon it.  XP Home does not have the 'fdisk /mbr' command but
XP Pro does.  Vista Home does not have the 'bootrec /fixmbr' command
but Vista Ultimate does.  Windows 7 is different again.  That is the
type of problem you will have trying to restore the windows main boot
record (MBR) to the machine using windows tools.  Searching the MS
answer sites at microsoft.com I found that all of the official MS
answers pointed off to third party sites.  That did not inspire any
confidence in me that it was going to be an easy solution.  Many of
the MS sites say, "If you are having MBR trouble and can't boot then
click on the Start button and then ..."  Of course if I could get to
the start button then I would be booting!

I found these following resources useful.

  http://www.supergrubdisk.org/

That Super Grub2 Disk disk there is very small at 1.44MB but allowed
me to boot the windows system.  Then after booting the windows system
I could run the Vista 'bootrec /fixmbr' (or on XP I think it would be
'fdisk /mbr').  You might try that and if it works then you can
bootstrap yourself to a repair.  If that works for you then that is
the best and simplest solution.

But if you find yourself without those commands because you have a
"Home" version then you will need to use a different process.  That
was my problem.  I was trying to repair a "Vista Home" version and it
didn't include either of those commands.  I could boot the system
using the helper disk from www.supergrubdisk.org but then the MS
"Home" system didn't include the tools needed to repair itself.

I kept digging and found that supposedly the Windows Recovery
Environment disk would fix MBR problems.  I found much documentation
refering to it.  They all say, "Insert your vista install disk and
then ..."  But of course I don't have a Vista install disk since this
Acer came with Vista preinstalled and no disks for it.  And the Acer
"create a factory restore disk" action isn't the same thing but does
something completely different.  Basically I didn't get a Windows
Recovery Environment disk with the system and it wasn't possible to
make one using it.

So then I found that many sites pointed to a neosmart.net posting
http://neosmart.net/blog/2008/download-windows-vista-x64-recovery-disc/
that provides a 120MB download ISO image to create a Windows recovery
disk.  That worked!  But I still needed to know the magic recipe to be
able to use it.  I found the recipe here at
http://www.techsupportforum.com/376-how-to-restore-the-vista-bootloader-from-grub/
which is to boot the recovery disk and first do the automated repair
using it.  That said it fixed some things but the system still didn't
boot afterward.  I think that was a necessary but not sufficient step
by itself.  Then followed it with "bootrec /fixmbr" "bootrec /fixboot"
commands and that finally worked!  The system was repaired to being
able to boot its original operating system.

Two separate downloads, info on several different sites.  But none of
them from MS.  That is so typical.

And it is very unusual for me to do anything with MS systems.  Ever!
The above terrible experience with an MS system just reinforced to me
that I shouldn't use MS systems and should stick with Debian GNU
systems where things work much more easily and helpful documentation
and helpful people are much more readily available.  Hopefully this
will be my one and only posting on the topic.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: