How to remove windows from dual boot by cloning.

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
michaelltaylor
Level 1
Level 1
Posts: 13
Joined: Tue Feb 19, 2013 5:24 am

How to remove windows from dual boot by cloning.

Post by michaelltaylor »

I had a dual boot system that ran both Windows 7 and Linux Mint 14. I got to the point that I no longer needed Windows, so I decided to remove the Windows partition and recover the drive space. The problem was that Windows was on the first partition and Linux was on the second partition. I didn't want a second partition, so I decided to move Linux to the first partition, then expand it to use the entire disk. This procedure involves some risk, so it was a little frightening. This tutorial assumes you are using a recent version of Mint, the Grub2 boot loader, and have enough free hard drive space to replicate your existing partition. Please read the entire tutorial before you start. Software varies and I'm doing this from memory, so the options in Gparted may vary, but it should be intuitive and easy to follow along anyway.

Before you do anything, back up your data. I cannot stress this enough. When you remove your windows partition, you will lose everything on that partition, so make sure you save anything you don't want to lose. This method should prevent you from losing anything from your Linux partition, but accidents happen, not all hardware is the same, etc.

There are two methods. The scary method; and the safe method, which is more complicated and takes longer, but ensures you don't lose data.

The scary method:

1. Boot with a live CD or thumb drive using the same version of Linux you are going to clone.
2. Start Gparted. Right click your Windows NTFS partition, choose delete, and apply your changes. Windows is now gone and cannot be recovered.
3. Create a new partition of the same type and same size or larger than the one you want to clone in the new empty space. Apply changes.
4. Right click on the existing Linux partition and choose copy.
5. Right click on the new partition and choose clone (or paste). Apply changes, sit back, and wait. This may take several hours to complete.
6. Delete the old partition and apply changes.
7. Right click on the new partition and select expand.
8. Drag the indicator to cover the empty space. Apply changes. This can take some time, but not as long as the cloning.
9. Note the new mount point of your new partition. (ex.: /dev/sda1/)
10. Open a terminal and enter the command: sudo mount <mount point>
11. Enter the command: sudo gedit <mount point>/boot/grub/grub.cfg
12. Change the existing drive maps to match your new mount point. (example: 'HD0 msdos3' = sda3) Save and close the file.
13. Reboot your computer. Your computer should load to Linux on your new partition.
13. Open a terminal and enter the command: sudo update-grub
14. Enjoy Linux on your new partition.

The safe method:

1. Boot with a live CD or thumb drive using the same version of Linux you are going to clone.
2. Start Gparted. Right click your Windows NTFS partition, choose delete, and apply your changes. Windows is now gone and cannot be recovered.
3. Create a new partition of the same type and same size or larger than the one you want to clone in the empty space. Apply changes.
4. Right click on the existing Linux partition and choose copy.
5. Right click on the new partition and choose clone (or paste). Apply changes, sit back, and wait. This may take several hours to complete.
6. Close Gparted and open a terminal. Enter the command: blkid
7. Note the mount points and UUIDs of all the partitions.
8. Enter the command: tune2fs <mount point of new partition> -U random
9. Wait a few minutes and enter blkid again to ensure the new partition has a different UUID than the original.
10. Reboot your computer without the live CD to ensure the old partition still works properly.
11. Reboot back to the live CD.
12. Open a terminal and enter: tune2fs <mount point of new partition> -U "<UUID of old partition>"
13. Enter the command: tune2fs <mount point of old partition> -U "<UUID of new partition>"
10. Enter the command: sudo mount <mount point of new partition>
11. Enter the command: sudo gedit <mount point of new partition>/boot/grub/grub.cfg
12. Change the drive maps to match the mount point of your new partition. (example: 'HD0 msdos3' = sda3) Save and close the file.
13. Reboot your computer without the live CD. Your computer should load to Linux on your new partition.
14. Reboot to the live CD.
15. Open Gparted, delete the old partition, and apply changes.
16. Right click on the new partition and select expand.
17. Drag the indicator to cover the empty space. Apply changes. This can take some time, but not as long as the cloning.
18. Reboot your computer without the live CD. Your computer should load to Linux on your new partition.
19. Open a terminal and enter the command: sudo update-grub
20. Enjoy Linux on your new partition.
Last edited by michaelltaylor on Fri Oct 25, 2013 2:39 pm, edited 3 times in total.
anandrkris

Re: How to remove windows from dual boot by cloning.

Post by anandrkris »

Thanks for the detailed post. I just shared your post here.
Suggestion - You can post this as a tutorial here with screenshots. Will be helpful for newcomers.

Have a doubt - Is it necessary to have GRUB installed to MBR? Will this work if Windows boot loader is booting both Windows and Mint?
michaelltaylor
Level 1
Level 1
Posts: 13
Joined: Tue Feb 19, 2013 5:24 am

Re: How to remove windows from dual boot by cloning.

Post by michaelltaylor »

You are correct. As I stated, this tutorial assumes you are using the Grub 2 boot loader. If you're using something else, this tutotial will not work. Screenshots are a good idea. I will try to gather them.
michaelltaylor
Level 1
Level 1
Posts: 13
Joined: Tue Feb 19, 2013 5:24 am

Re: How to remove windows from dual boot by cloning.

Post by michaelltaylor »

I should probably emphasize that this method is not necessary if Linux is on your first partition. If that's the case, you simply need to remove the Windows partition, expand your Linux partition, and run update-grub as root. But you should still back up your data before trying.
anandrkris

Re: How to remove windows from dual boot by cloning.

Post by anandrkris »

Okies. Even windows bootloader is used by MBR and GRUB instyalled to another partition, windows will trigger GRub 2 loader which in turn will load Linux. Am i right here? Sorry, if the question is trivial.
michaelltaylor
Level 1
Level 1
Posts: 13
Joined: Tue Feb 19, 2013 5:24 am

Re: How to remove windows from dual boot by cloning.

Post by michaelltaylor »

Yes, if Windows boot loader is installed, it will act as primary. If you choose Linux, it sends you to Grub, which then takes over. But if you are going to be removing Windows, you will want to remove the Windows boot loader anyway. If the Windows boot loader cant find Windows, it will just give you an error, without giving you the option of loading Linux. You will have to install Grub, Grub2, Lilo, or some other boot loader if you remove Windows. That's a different process than this tutorial, so you have to be careful when you start out. This tutorial only works if you are already using Grub2 as the only boot loader.
usbtux

Re: How to remove windows from dual boot by cloning.

Post by usbtux »

wouldn't it be easier to
delete the doze partition
expand the nix partition
reinstall grub
?
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to remove windows from dual boot by cloning.

Post by catweazel »

usbtux wrote:wouldn't it be easier to
delete the doze partition
expand the nix partition
reinstall grub
?
The question you now need to answer is, does gparted support that operation?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
michaelltaylor
Level 1
Level 1
Posts: 13
Joined: Tue Feb 19, 2013 5:24 am

Re: How to remove windows from dual boot by cloning.

Post by michaelltaylor »

usbtux wrote:wouldn't it be easier to
delete the doze partition
expand the nix partition
reinstall grub
?

No - and try English.
tonyamiller

Re: How to remove windows from dual boot by cloning.

Post by tonyamiller »

This is not really much of a reply but more of a question. I am in a similar situation but i have 3 OS (Windows XP , 7, and 8) is it possible to delete one of these without messing up my PC or would i have to do the same? Also i installed them in order of oldest (xp) to newest(8). I don't know if that helps or not

Earn money by blogging [url]http://www.empowernetwork.com/martinateamincome/[/url]
michaelltaylor
Level 1
Level 1
Posts: 13
Joined: Tue Feb 19, 2013 5:24 am

Re: How to remove windows from dual boot by cloning.

Post by michaelltaylor »

It's possible to delete just one of them, but the process will not be the same as described here.
Post Reply

Return to “Tutorials”