Ubuntu: How do I change from dual-boot Windows/Ubuntu to single-boot Ubuntu?



Question:

I have an old Vista laptop that I partitioned and installed Ubuntu on, with dual-boot. I've now decided to switch entirely to Ubuntu. What's the best way to achieve this?

My current partitions:

+-------+--------------------+---------------+------------------------------+  | WinRE | C: (dual bootable) | D:            | Extended                     |  |       |                    |               +-----------+------------------+  |       |                    |               + Ubuntu    | Swap             |  +-------+--------------------+---------------+-----------+------------------+  

I'd like to change this to:

+-------+-------------------------------------------------------------------+  | WinRE | Extended                                                          |  |       +------------------------------------------------+------------------+  |       | Ubuntu (bootable)                              | Swap             |  +-------+------------------------------------------------+------------------+  

(I'd like to keep the Windows Recovery partition in case I ever want to sell the laptop).

I'm not sure whether the Ubuntu partition currently has a boot-loader on it. I also don't want to lose my Ubuntu installation/data. (I'm happy to trash the Windows partitions completely - I have backed everything up from those).

Update: Having checked my bootloader, I've deleted the Windows partitions and I now have free space. Unfortunately it looks like I can't resize the existing / (root) partition because it's mounted. Can I get around this, or do I have to re-install?


Solution:1

In standard installations GRUB is probably not located in Windows partitions but it would be wise to check this first by running the BootInfo script before you end up with an unbootable machine after having deleted a partition.

Once you have backuped all your important data you can then boot from a LiveCD and start GParted as mentioned already. Note that deleting or resizing partitions is possible for unmounted partitions only.


Solution:2

If you need to expand the current partitions, the new free space after deleting the old Windows partitions should be right next to them. Also this has to be done with a lot of care, otherwise you may screw up the whole system. My advice is to delete the Windows partitions and turn them into EXT4 partitions which you can use from Ubuntu to store stuff, like movies, etc.

For this you need to use the utility called GParted. Install it from the Software Center if you haven't installed already. When you start GParted, it lists the partitions in your hard disk. They will be denoted in \dev\sda1 etc. You may be able to easily distinguish the Windows partitions from their file systems and mount points.

Delete the Windows partitions using the menu which appears when you right click.

The partition will now be marked as an unallocated space. Right click again and choose New. Choose the format you want to partition it into and click on the Apply All Operations tool button.

Read this tutorial if you're new to GParted.


Solution:3

Your bootloader (GRUB2) is really not in C: but in /dev/sda. So you can go ahead and delete windows partitions in gparted, booted from Live-CD. Check that Ubuntu will boot. After that, boot LiveCD again and grow your Ubuntu / partition via mouse in gparted.


Solution:4

Whichever method you use to accomplish this, you run a risk of losing some or all of your data. I think the least risky option is firstly to do a backup (eg rsync), followed by some sort of verification. Then perform a fresh install, creating whichever partitions you require. Then restore your backed-up data. Lastly reinstall your full complement of packages (perhaps using aptoncd; it should be available in the repositories).


Solution:5

Regarding backups: If you have some extra space available on another external disk, the most robust option would be to make a full disk image using CloneZilla before you start tweaking anything. After that, you can reformat the NTFS partition as ext4/reiserfs/whatever and either a) mount that as part of the filesystem by editing your fstab (for automatically mounting) or b) use gparted to expand your existing installation into the empty space. Having a disk image will give you peace of mind; but it takes up a lot of space and time to make one. If you move any partitions around you'll have to reinstall GRUB (the disk sector it needs to jump to in order to boot will have moved.) To do that, as mentioned above, use sudo install-grub /dev/<disk name>. It should update grub automatically, if I recall correctly... If you don't move any partitions, just reboot into your Ubuntu install, and run sudo update-grub to have grub re-scan your disk for bootable partitions (removing the Windows option).


Solution:6

Don't make it too complicated. It's very simple...pop in the Ubuntu CD and restart. When you go through the install process, select the option to erase and use all space from your hard drive. It will delete all partitions, reformat and install. It does everything for you. When everything is said and done, it should work like new minus any extra configuration you choose to do.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »