• Delete Linux partition and fix Windows MBR, Win7

    • This topic has 15 replies, 9 voices, and was last updated 12 years ago.
    Author
    Topic
    #470533

    If, after giving Linux the good college try, you decide that it is just not for you, you decide to delete Linux from your system. Unfortunately Linux loads it’s own Boot Loader (Grub Bootloader) which, when you delete the Linux partitions, is also deleted. What do you do to get your Windows MBR back. Here is what you do to delete Linux and get back into Windows. (This works for my Win 7, I suspect it is similar in Vista, possibly in XP as well. My hope is that others will add to this thread with the steps for those OSes as well.)

    1. There are 2 ways to get to Disk Management: Type Disk Management in the search box and select Create and format hard disk partitions. This will open the disk manager.

    Or Go to the Control Panel and double click on Administrative Tools, Select Computer Management (Or just type cmpmgmt.msc in search). Select Disk Management.

    2. Delete the Linux partition and the Linux swap file partition.

    Unfortunately I did not grab a pic before I deleted the Linux partitions, sorry

    3. Insert your System Repair Disk and reboot. Choose to reboot from the DVD

    4. Choose to repair your PC. Choose the Command Prompt option and type “bootrec.exe/fixmbr” without the quotes. Press enter.

    That’s it. You can now reboot into your windows partition. Linux and the Grub Bootloader are gone. The last chore is to go back into the disk manager to recover the unused space deleting the linux partition has left.

    Viewing 8 reply threads
    Author
    Replies
    • #1235637

      Why do you have a separate swap file partition but not one for data?

      cheers, Paul

      • #1235648

        Why do you have a separate swap file partition but not one for data?

        cheers, Paul

        I just have not created a partition for data. My total data is not significant in size, and is composed mostly of family pics and some music. My financial software is backed up on both laptops and a desktop. I just have not felt the need to seperate the data onto it’s own partition. I have used this method in the past with 98 and XP, but just never bothered with Win 7.

    • #1235713

      Swap file partition because…?

      cheers, Paul

    • #1235789

      There is some difference of opinion here, but in essence, having the page file in it’s own partition will prevent page file fragmentation. If the page file is in the default location it gets fragmented similarly to the rest of the partition. Putting it in it’s own partition prevents this. The page file remains contiguous at all times. Many of us have actually increased our system performance by moving the page file to it’s own partition. There was an active discussion about this a while back but for the life of me I can’t find it.

    • #1235828

      For XP (at least), you may also wish to look at the thread FIXMBR Remove dual boot, which describes my experience with this.

      Chris

      • #1235874

        For XP (at least), you may also wish to look at the thread FIXMBR Remove dual boot, which describes my experience with this.

        Chris

        Chris,

        Thanks for the link to removing Linux in an XP environment. Seems similar to Win 7. The key is fixing the MBR so you can boot into Windows once again as the Linux Grubloader is deleted at the same time the Linux partition is and the Grubloader writes itself ahead of the Windows bootloader. As a note, if you have a triple boot, Linux, and 2 versions of Windows, then once you select Windows in the Grub loader you get to the Windows loader and have to select which version to boot to from there. Seems like it would be much easier to acquire a cheap laptop with Linux only rather than multibooting Linux and Windows.

        It’s very early here, have to get another cup of joe. Have a great day. Ted

    • #1243617

      Linux differs from Windows regarding the Swap File. In most Linux distros, by default, Linux will look for a separate Linux Swap Partition. That’s just the way Linux evolved. This default does not apply to any version of Windows.

      Even if your Windows 7 came pre-installed without an Install Disk, you will have the ability to use a Repair Environment. Windows Vista and Windows XP pre-installed do not offer this feature. So, even without your disk, you could still repair the Windows 7 mbr and boot info.

      Also consider using something like Acronis Disk Director 11, as it can undo much of the damage caused by removing Linux and GRUB.

      If you were more clever, you could have used Acronis OS Selector, and installed GRUB into the Linux Primary Partition. This keeps GRUB out of the MBR and avoids this type of conflict with Windows bootloaders altogether. The Acronis OS Selector then becomes the Boot Manager for both Windows and Linux. OS Selector is part of either True Image Home or Disk Director (I forget which). I used to use Norton Partition Magic and Boot Magic for this sort of dual-booting, but they discontinued the product, leaving it stuck without Vista or Windows 7 support.

      -- rc primak

    • #1333817

      Perhaps you could acquire a USB DVD drive and use a Win 7 DVD in this manner. You can also download the Win 7 iso file directly from Digital River, burn this iso file to a Flash Drive of suitable size and use the Flash Drive. Your bios would have to have the capability to boot to USB device in either case I would think in order to use this option.

      To burn the iso file to either DVD or Flash Driver from within Win 7 simply right click the iso file and choose Burn Disk Image.

      • #1375339

        Thanks for taking the trouble to post this answer, it has saved me from a very embarassing situation!

    • #1381422

      For those who wants to know, the Linux swap file is the equivalent of the page file in Windows. If in Windows, we tap out on physical RAM, most of us has the page file to pick up the slack, & it shouldn’t be removed.

      Same with Linux. The rule of thumb for a swap file with a Linux OS is twice the amount of physical RAM, below 2GB. Example, if one has 1GB RAM, create a 2GB swap file. If the amount of physical RAM is 2GB up to 4GB, the swap should be half of the installed RAM. For systems with over 4GB of RAM, normally 2GB will suffice, however with the size of today’s hard drives, it’s OK to give 4GB. More than 4GB is overkill, period. Even with a VM running, I’ve yet to see the swap running a GB.

      It’s no big deal, really. Many users simply gives it 4GB & says the heck with it. It’s highly unlikely to be missed, the exception being those running SSD’s. In that case, my guide above applies. If one is running 8+GB RAM & tight on space, chance it with 1GB. I doubt there’ll be problems at all. The speed of the SSD is going to help a lot.

      Cat

    • #1381774

      The swap partition is standard to ALL distros of Linux, even distros which may not use the same file system. This allows multi-boot Linux setups to avoid redundant disk swap space.

    • #1390368

      When delete Linux (Ubuntu) from my laptop, I’ll fix MBR by WinXP mini in HirenbootCD. Try Home Partition…

    Viewing 8 reply threads
    Reply To: Delete Linux partition and fix Windows MBR, Win7

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: