How to remove windows from dual boot by cloning.

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How to remove windows from dual boot by cloning.

Postby michaelltaylor on Tue Feb 19, 2013 5:48 am

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.
michaelltaylor
Level 1
Level 1
 
Posts: 12
Joined: Tue Feb 19, 2013 5:24 am

Linux Mint is funded by ads and donations.
 

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

Postby anandrkris on Tue Feb 19, 2013 6:53 am

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?
Cheers,
If there is a drive, there will be a path
User avatar
anandrkris
Level 5
Level 5
 
Posts: 952
Joined: Fri Nov 16, 2012 1:13 am
Location: Chennai

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

Postby michaelltaylor on Tue Feb 19, 2013 7:54 am

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: 12
Joined: Tue Feb 19, 2013 5:24 am

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

Postby michaelltaylor on Tue Feb 19, 2013 8:00 am

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.
michaelltaylor
Level 1
Level 1
 
Posts: 12
Joined: Tue Feb 19, 2013 5:24 am

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

Postby anandrkris on Wed Feb 20, 2013 5:07 am

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.
Cheers,
If there is a drive, there will be a path
User avatar
anandrkris
Level 5
Level 5
 
Posts: 952
Joined: Fri Nov 16, 2012 1:13 am
Location: Chennai

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

Postby michaelltaylor on Sun Feb 24, 2013 4:10 am

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.
michaelltaylor
Level 1
Level 1
 
Posts: 12
Joined: Tue Feb 19, 2013 5:24 am

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

Postby usbtux on Fri Mar 01, 2013 8:04 am

wouldn't it be easier to
delete the doze partition
expand the nix partition
reinstall grub
?
http://goo.gl/DXKgM LinuxMint tutorials.
Running LinuxMint 17 Cinnamon/KDE/XFCE
http://goo.gl/WFu0u Installing Mint - the screen cast videos.
linuxcounter #368850
User avatar
usbtux
Level 5
Level 5
 
Posts: 972
Joined: Tue Dec 28, 2010 10:37 am

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

Postby catweazel on Fri Mar 01, 2013 8:55 am

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?
Mint Testing Team & Mint Donor #3606
KDE 4.12.0, custom preemptive kernel 3.12.5,
Intel i7 4770K @ 4.7GHz, 16GB 2666MHz XMP,
4 Samsung 840 PRO 512GB SSDs in RAID0,
6TB HW RAID10, dual 24" Acer X243H,
Gigabyte nVidia GTX 680 Super Overclock
User avatar
catweazel
Level 7
Level 7
 
Posts: 1655
Joined: Fri Oct 12, 2012 9:44 pm

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

Postby michaelltaylor on Sat Mar 23, 2013 8:36 pm

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



No - and try English.
michaelltaylor
Level 1
Level 1
 
Posts: 12
Joined: Tue Feb 19, 2013 5:24 am

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

Postby usbtux on Sun Mar 24, 2013 11:55 am

michaelltaylor wrote:No - and try English.


Michaell, thank you for your for your curt and frankly totally unhelpful response. It may be that your grasp of using these forums to generally provide helpful informative replies to some times stupendously ignorant and repetitious questions may be sadly lacking.
I wont wont be equally churlish and brusque, I strive to educate and empower people that may have a reasonably valid question.

As to your statement “...and try English.” I do not understand, I have used contractions and possibly a bastardisation; that most people would be able to reference in the list I posted. Despite no capitalisation and the lack of full stops/periods, it is totally readable even for some one who may not have English as a first language.

I would also point out that you need to follow your own advice -

michaelltaylor wrote: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.


Call me a pedant if you want, but tell me, how do you spell TUTORIAL in English?
http://goo.gl/DXKgM LinuxMint tutorials.
Running LinuxMint 17 Cinnamon/KDE/XFCE
http://goo.gl/WFu0u Installing Mint - the screen cast videos.
linuxcounter #368850
User avatar
usbtux
Level 5
Level 5
 
Posts: 972
Joined: Tue Dec 28, 2010 10:37 am

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

Postby tonyamiller on Fri Oct 25, 2013 2:26 pm

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 http://www.empowernetwork.com/martinateamincome/
tonyamiller
Level 1
Level 1
 
Posts: 1
Joined: Fri Oct 25, 2013 2:19 pm

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

Postby michaelltaylor on Fri Oct 25, 2013 2:56 pm

It's possible to delete just one of them, but the process will not be the same as described here.
michaelltaylor
Level 1
Level 1
 
Posts: 12
Joined: Tue Feb 19, 2013 5:24 am

Linux Mint is funded by ads and donations.
 

Return to Tutorials

Who is online

Users browsing this forum: Artichoke and 9 guests