Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Shrink Ubuntu and give it to Windows


  • Please log in to reply
26 replies to this topic

#1 POKEGAMERZ

POKEGAMERZ

  • Members
  • 227 posts
  • OFFLINE
  •  
  • Local time:03:42 AM

Posted 06 November 2016 - 11:47 PM

Around like a year ago I dual booted Windows 10 (Windows 7 at the time I dual booted it) and I realized that I gave too much space to the Ubuntu partition.

Total Hard Drive size- 1TB

Windows 10 size- 495GB

Ubuntu size- 532GB

I want to shrink Ubuntu and give it at least 110-125 GB and give the rest of it to Windows 10. I already have GParted burned on to a CD. Is there any safe way of doing this without ruining Ubuntu or Windows 10? The version of Ubuntu I have is Ubuntu 15.04.

Here are some pictures of my disk management for Windows 10 and Gparted-

 

Attached Files



BC AdBot (Login to Remove)

 


#2 pcpunk

pcpunk

  • Members
  • 5,868 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:10:42 PM

Posted 07 November 2016 - 12:37 AM

Do you know that Ubuntu 15.04 is beyond the End Of Support? it was Feb 4/2016.  From what I understand you can upgrade to 15.10 and then to 16.04.  Might as well wait until re-partitioning is done in case you mess it up.

 

Make sure you back up both systems first!  Or at least Windows, and all your personal files on Ubuntu.  Ubuntu takes far less time to install than Windows.  If you have a lot of files on Ubuntu this process will take a long time so be prepared, how long depends, I've only done it a few times with minimal files.  Effectively what you are doing is moving all the Ubuntu files over however far you choose to move that partition.

 

Looks like you have a huge swap file, so you can gain some space there also.  I'll let the Pro's guide you as I've only done this a few times.


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#3 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 7,015 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:10:42 PM

Posted 07 November 2016 - 02:44 AM

I'd say to copy all of your main Home folders in Ubuntu that has content (about 7-8 folders total) to an external of some type (USB stick if not too much is fine), and start over with Ubuntu 16.04 clean. You can copy those folders back with content, by deleting any with the same name on the new Ubuntu install. It's a drag & drop operation. When you reinstall, you can plug the external in, see what you have, and delete the folder in the OS bearing the same name, and copy yours over, one by one. No data loss. :thumbsup:

 

Windows 10 doesn't require much space either, though you should also create a Data partition for that OS to prevent against loss, by shrinking the OS partition (80-100GiB is plenty for 'C') from Disk Management within Windows, being sure to run a couple of defrag passes first. Then when booting with the new Ubuntu media, create how much you wish for Data, making it a Logical partition. Be as generous as you feel you need with Data, with a 1TiB HDD, you have tons of space. Then install Ubuntu 16.04 fresh, making sure that root or '/' is no more than 40GiB & Logical, if you're not Hibernating, then 1024MiB Swap is good, if you are, then make it the size of installed RAM. Then use the rest for /home, which should also be Logical. Unlike Windows, Linux distros runs fine on Logical partitions, but Swap will make itself your last available Primary. 

 

By chance, if your computer was sold with Windows 8 or higher (you'll have UEFI Firmware rather than BIOS), you can convert the HDD to GPT with GParted Live, or any partitioning CD, then you'll have unlimited primaries, though would have to install W10 clean, something you may not want to do, especially if running fine. Since you didn't say, just letting you know to cover the bases. Note that GPT partitioning of a boot drive won't work unless your computer has UEFI Firmware. If BIOS based (pre mid-2012 or earlier), forget it, most motherboards supports MBR partitions only. 

 

And be sure to create a backup of Windows 10, including the 100MiB System partition, before a new Ubuntu install. In fact, you can create a Data partition for Windows 10 with the Ubuntu install media, it has GParted under Administration, just make it the size you want, and make sure than you select 'ntfs' from the file system drop list before formatting & click 'Apply All Operations' (the right arrow) & then install Ubuntu 16.04 fresh from there. You should make root as noted above small, because it doesn't need nor use a lot of space, 30 to 40GiB (30960 to 40960MiB) is plenty. That'll allow you to make /home (where your data is stored) as large as you need. It's your choice where you want to install Swap on a single drive, I choose in the middle of root & /home because that portion of the HDD is faster. Some may prefer it on the end to grow or shrink as needed w/out messing with /home if an adjustment is needed, that's up to you where to place Swap. 

 

Hopefully, this is of some assistance, the point being, make Windows as large as needed, including a separate Data partition to store files. In fact, you have lots of space for Data, just remember to make it a Logical partition. Plus before installing Ubuntu 16.04 (recommended), be sure to be signed into your browsers, to keep your bookmarks & extensions as is. 

 

Good Luck & let us know if we can be of further assistance. :)

 

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#4 Al1000

Al1000

  • Global Moderator
  • 7,728 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:03:42 AM

Posted 07 November 2016 - 05:16 AM

Since Ubuntu 15.04 is no longer supported I agree it's not worth keeping, and now would be a good time to upgrade to Ubuntu 16.04 or another supported distro.

 

Moving the end of a partition is relatively straightforward, but moving the start of a partition takes considerably longer due to the amount of data within that partition that is also moved. So the easiest option would be:

 

  • Delete Linux partitions

  • Enlarge Windows partition C:

  • Install Ubuntu in the remaining space



#5 POKEGAMERZ

POKEGAMERZ
  • Topic Starter

  • Members
  • 227 posts
  • OFFLINE
  •  
  • Local time:03:42 AM

Posted 07 November 2016 - 07:44 AM

Is there a way I could do this without deleting the Linux partition-
1 Shrinking the Ubuntu partition with Gparted.
2 Using disk management in Windows 10 to expand the Windows partition.
3 Upgrade to a newer version of Ubuntu.

#6 MadmanRB

MadmanRB

    Spoon!!!!


  • Members
  • 3,073 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:No time for that when there is evil afoot!
  • Local time:10:42 PM

Posted 07 November 2016 - 09:37 AM

Is there a way I could do this without deleting the Linux partition-
1 Shrinking the Ubuntu partition with Gparted.
2 Using disk management in Windows 10 to expand the Windows partition.
3 Upgrade to a newer version of Ubuntu.

 

Yes all can be done, but yes take the suggestion of using a newer version of ubuntu.

Gparted should be able to shrink your partitions and enlarge your windows partitions


You know you want me baby!

Proud Linux user and dual booter.

Proud Vivaldi user.

 

ljxaqg-6.png


#7 POKEGAMERZ

POKEGAMERZ
  • Topic Starter

  • Members
  • 227 posts
  • OFFLINE
  •  
  • Local time:03:42 AM

Posted 07 November 2016 - 10:27 AM

Is there a way I could do this without deleting the Linux partition-
1 Shrinking the Ubuntu partition with Gparted.
2 Using disk management in Windows 10 to expand the Windows partition.
3 Upgrade to a newer version of Ubuntu.

 
Yes all can be done, but yes take the suggestion of using a newer version of ubuntu.
Gparted should be able to shrink your partitions and enlarge your windows partitions
Yes but I heard that trying to shrink/enlarge the Windows partition on Gparted will most likely cause problems that can't be fixed. For the Linux partition I would prefer to use Gparted while with the Windows partition I would prefer to use Disk Management. Also I would prefer to edit the partitions before upgrading to a newer version of Ubuntu.

#8 MadmanRB

MadmanRB

    Spoon!!!!


  • Members
  • 3,073 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:No time for that when there is evil afoot!
  • Local time:10:42 PM

Posted 07 November 2016 - 10:29 AM

I would not worry about enlarging the windows partition too much, sure issues can happen but I dont think it will be an issue.


You know you want me baby!

Proud Linux user and dual booter.

Proud Vivaldi user.

 

ljxaqg-6.png


#9 POKEGAMERZ

POKEGAMERZ
  • Topic Starter

  • Members
  • 227 posts
  • OFFLINE
  •  
  • Local time:03:42 AM

Posted 07 November 2016 - 10:42 AM

What I also want to know is in the pictures I provided above which partition is which because I don't want to accidently use the wrong partition. The first few are from Disk Management on Windows 10 while the others are from GParted.

#10 MadmanRB

MadmanRB

    Spoon!!!!


  • Members
  • 3,073 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:No time for that when there is evil afoot!
  • Local time:10:42 PM

Posted 07 November 2016 - 10:46 AM

SDA2 in gparted is your main windows partition

SDA3 seems to be your combined root/home partition that ubuntu uses.

I would ignore that logical/swap partition, focus on shrinking SDA3 


You know you want me baby!

Proud Linux user and dual booter.

Proud Vivaldi user.

 

ljxaqg-6.png


#11 Al1000

Al1000

  • Global Moderator
  • 7,728 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:03:42 AM

Posted 07 November 2016 - 10:57 AM

Is there a way I could do this without deleting the Linux partition-
1 Shrinking the Ubuntu partition with Gparted.
2 Using disk management in Windows 10 to expand the Windows partition.
3 Upgrade to a newer version of Ubuntu.


Provided your current version of Ubuntu still has an option to upgrade, yes that could be done. However as it entails moving the start of the Ubuntu partition to "the right" in GParted, it also means moving all the data on the Ubuntu partition, so expect that to take a while. Because of the amount of data being moved, the potential for errors is high, so ensure that all important data is backed up before you start.

I would advise against doing this and instead recommend doing as I previously suggested, but will go with whatever you decide.

Increasing the size of the Windows partition will be relatively safer and faster, because comparatively little has to be done.

#12 Al1000

Al1000

  • Global Moderator
  • 7,728 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:03:42 AM

Posted 07 November 2016 - 10:59 AM

I would ignore that logical/swap partition, focus on shrinking SDA3


Concur.

In Gparted, you would move the start of /dev/sda3 to "the right."

#13 POKEGAMERZ

POKEGAMERZ
  • Topic Starter

  • Members
  • 227 posts
  • OFFLINE
  •  
  • Local time:03:42 AM

Posted 07 November 2016 - 12:12 PM

Before I edit my partitions I have a concern. I was just checking how much hard drive space I have used and is still available on Ubuntu and it says I used 471.9GB and have 60.3GB available. I was confused on why until I discovered that many of my Windows files are also on Ubuntu. I know that I did not download many of this stuff on Ubuntu but did on Windows. Is there a way to fix or get around this?

#14 MadmanRB

MadmanRB

    Spoon!!!!


  • Members
  • 3,073 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:No time for that when there is evil afoot!
  • Local time:10:42 PM

Posted 07 November 2016 - 12:16 PM

Just do a back up if you have files, did you share files between the os's?


You know you want me baby!

Proud Linux user and dual booter.

Proud Vivaldi user.

 

ljxaqg-6.png


#15 POKEGAMERZ

POKEGAMERZ
  • Topic Starter

  • Members
  • 227 posts
  • OFFLINE
  •  
  • Local time:03:42 AM

Posted 07 November 2016 - 12:19 PM

Just do a back up if you have files, did you share files between the os's?


I'm not exactly sure but I'm worried that deleting the Windows files on Ubuntu will delete them on Windows and if not that then will cause other problems where I may not be able to even boot into any of the OS's.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users