Showing posts with label partition. Show all posts
Showing posts with label partition. Show all posts

Removing Partition, Grub, & Fixing MBR

0 comments

Unfortunately had to remove Linux from a dual boot machine today due to compatibility issues (shame on you hardware manufacturers). I wanted to reassign the Linux partition space back into the Windows partition. No problem, right?  Maybe if you do this type of thing regularly and already have the tools at hand. This is the first time I have actually had to remove Linux, a sad day for sure, but a new set of tools for the future. Following is a brief walkthrough. (note: this was complicated by being a Eee PC meaning no CDs, USB memory devices only.)

In Brief:

  • Parted Magic Live USB
    • remove Linux partition
    • wipe MBR from terminal
      dd if=/dev/zero of=/dev/sda bs=446 count=1
  • Windows/Dos Bootable USB
    • xfdisk /MBR


Details of My Steps:


Alternatively:
You should also be able to do roughly the same using the Windows Recovery Console to issue a fixmbr, fixboot, fdisk /MBR, fixboot c:, or bootcfg /rebuild.  In my case I did the above steps while waiting for files to copy to USB so I could access the recovery console. Instructions for getting a USB bootable recovery console can be found at http://www.msfn.org/board/USB-Boot-Recovery-Console-t111986.html although I never completed the steps and cannot confirm their functionality.

Partitions

0 comments

I had used the standard DOS fdisk to partition my harddrive. It's a meager drive at only 80 gig, but serves its purpose, that being, partitioned into many small partitions (most about 5 gig) so that I can install and check out some of the different Linux distributions that are available (I'm still looking for that perfect distro).

I'm guessing that I was tired/rushed/careless (maybe all three) or perhaps the installer decided it could do a better job than myself, but while installing Ubuntu, my partition structure was wiped out. No big loss, this is primarily a test machine anyhow, no serious data loss, but once finished looking at Ubuntu, I did need to recreate the partitions. I'm thinking, no problem, I'll just boot up my trusty Knoppix CD and use QParted (which is related to or the same at QTParted) which in theory would let me resize the existing and create new partitions.

No luck, the drive seemed to be getting locked, saying it was mounted although it wasn't, and other odd things. Keep in mind this is probably due to my not knowing exactly what I was doing (this was my first outing with QParted). I decided to wipe out all of the partitions and completely start from scratch, still having difficulty deleting the partitions with QParted. That's when I came across a project on sourceforge.net called Ultimate Boot CD that is bootable CD loaded with tools for setting up and manipulating your motherboard, processor, disks, partitions, and a variety of other things.

Using one of the tools on this CD, within the F3 option from the main menu (I don't remember the tools name), I was able to erase all of the partition information on the harddrive. Then I rebooted back into Knoppix and was able to recreate my partition structure using QParted. Exactly what my problem was before, I'm still not positive, but the steps/tools above got me back into a happy place again.