PDA

View Full Version : [ubuntu] Partitioning between Ubuntu 16.04 and Windows 7



AlyssaVS
June 18th, 2018, 07:47 PM
Hi,

I am currently running a dual boot Ubuntu 16.04 and Windows 7. I'd like to reallocate additional space to the Ubuntu side. I know that I need to use Windows disk management to make any changes to the Windows partition (like shrinking it). My question is, will I need to do anything on the Ubuntu side once I've shrunk it?

Thanks in advance.

Alyssa

TheFu
June 18th, 2018, 08:07 PM
We need to see all sorts of detailed boot and partition information to answer the question asked.
boot-info is the normal way to gather the necessary information. The boot-repair tool can gather the information too, but if you use it, do not tell it/allow it to attempt to repair anything. Google will find either of those tools. Post just the URL they create.

Impavidus
June 18th, 2018, 08:10 PM
After shrinking the Windows partition, you first give Windows an opportunity to run some filesystem checks. Rebooting it a couple of times should do it, I think. But I'm no Windows expert. Then you have to expand the Ubuntu partition. You can't expand a partition that's mounted, so you have to run Ubuntu from a live disk, like the one you used to install Ubuntu, then run gparted. Note that the unallocated space created when shrinking the Windows partition must be adjacent to the Ubuntu partition you want to expand. Also pay attention to the extended partition that may exist. It's a container for other partitions.

If anything is unclear, show us the exact layout of the partitions, so we can give more detailed help. And of course, changing partitions is always a bit risky, so make sure you have backups of your important files – but you should have those anyway.

AlyssaVS
June 18th, 2018, 09:26 PM
I still have my live usb thumb drive. I'm not sure how to capture the partition information and post it here to show you. Googling how to do it is frustrating me as all I find is information on how to dual boot, install etc. and how to create a live disk or usb. Which I've already done. This is the first time I've wanted to change the sizes later, so a little guidance on how to get the tools to work for this purpose would be helpful. It's probably simple and I just need the first few steps.

TheFu
June 18th, 2018, 10:09 PM
Boot from the flash drive, choose "try ubuntu", connect to the local network as normal, install boot-repair or boot-info.
Run which ever you choose. Post the URL generated by either 1 of those tools. Partition data isn't sufficient to provide a good answer to the questions.

oldfred
June 18th, 2018, 11:00 PM
Detail instructions on installing Boot-Repair into Ubuntu live installer in live mode using terminal and adding ppa to download it.
Post the link to the Create BootInfo summary report. Is part of Boot-Repair:
https://help.ubuntu.com/community/Boot-Info and:
https://sourceforge.net/p/boot-repair/home/Home/

AlyssaVS
June 21st, 2018, 11:08 AM
Hi,

Here is the url. Thank you for the additional help and patience with my questions.
http://paste.ubuntu.com/p/Szhq7pkyTc/

AlyssaVS
June 21st, 2018, 11:10 AM
Hi again,

Disregard the url. I just tested it and it doesn't work. I double checked and this is what I was given. Perhaps I'll try the boot-repair option instead.

AlyssaVS
June 21st, 2018, 11:36 AM
Here is the working url. Thank you!
http://paste.ubuntu.com/p/fT6FxGwy7J/

oldfred
June 21st, 2018, 03:24 PM
You will have to use Windows to shrink sda2, your main Windows install. Windows NTFS likes 30% free and gets slower at 20% free, so do not shrink too much if you want to use it. And immediately reboot, so it can run chkdsk.

You will have to move start of extended partition left to include the unallocated space. Then you can move sda5 left and expand right.

But make sure you have good backups of everything.

A move left will require copy of part of partition and then release of that space, repeatedly. During process, if stopped by power failure or any other reason, partition then will not recoverable.

The other alternative is just to use space as a data partition. I normally use 25GB for each / (root) I have, but mount same data partition in all of them. Even with one install you could do that.

Splitting home directory discussion and details:
http://ubuntuforums.org/showthread.php?t=1811198
http://ubuntuforums.org/showthread.php?t=1901437
http://ubuntuforums.org/showthread.php?t=1734233&highlight=%2Fdata

TheFu
June 21st, 2018, 04:34 PM
Some easy "wins" to have more space.

First, I'd clean up the 35 old kernels on your Linux install. Keep 2 or 3. That should free up 500MB-2.5G of storage. Keeping old kernels around can become a huge problem on many installs with a limited /boot/ partition. You don't have that issue, this time. sudo apt autoremove should handle it. If it doesn't come back. That command will clean up hundreds of old packages too which don't need to be retained.

Second, if you don't hibernate, I'd make a 4.1GB swap, deleting the 16GB swap first. If you make the new swap at the far end of the partition, that will let you extend the Linux partition just under 12G more. Swap sizing over 4GB really isn't all that useful if you don't hibernate.

I'll leave the how-to shift partitions around to Oldfred. Best not to provide slightly different suggestions which can be confusing.

But it appears that maintaining your Ubuntu isn't happening properly. http://blog.jdpfu.com/2011/06/24/system-maintenance-for-linux-pcs is my take (republished in Lifehacker) for doing just that. I'll review it and make some updates today.

AlyssaVS
June 23rd, 2018, 10:55 AM
Thank you so much! I will work on this and report back if successful marking it solved (crossing fingers).

AlyssaVS
June 23rd, 2018, 10:57 AM
You will have to use Windows to shrink sda2, your main Windows install. Windows NTFS likes 30% free and gets slower at 20% free, so do not shrink too much if you want to use it. And immediately reboot, so it can run chkdsk.

You will have to move start of extended partition left to include the unallocated space. Then you can move sda5 left and expand right.

But make sure you have good backups of everything.

A move left will require copy of part of partition and then release of that space, repeatedly. During process, if stopped by power failure or any other reason, partition then will not recoverable.

The other alternative is just to use space as a data partition. I normally use 25GB for each / (root) I have, but mount same data partition in all of them. Even with one install you could do that.

Splitting home directory discussion and details:
http://ubuntuforums.org/showthread.php?t=1811198
http://ubuntuforums.org/showthread.php?t=1901437
http://ubuntuforums.org/showthread.php?t=1734233&highlight=%2Fdata

Thank you so much! I will work on this and report back if successful marking it solved (crossing fingers).

AlyssaVS
June 25th, 2018, 10:52 AM
Hi Guys,

I really appreciate the help but this is too complicated for me and a bit of a gamble that I cannot take. I can't risk messing up my partitions and it seems that even if I was successful I still wouldn't be able to free up the space I need. I am using it to keep backups of all my movies and TV shows and as a PLEX server. It looks like my only choice is to clone both sides and once I have the money, purchase a whole new hard drive with A LOT more space and replace the current one.

I have done this with my laptop twice with no problems and hopefully it won't be too much trouble in my desk top. Again, thank you very much for your help!

TheFu
June 25th, 2018, 01:33 PM
It is complicated to write, but easy to understand from inside gparted. The real complexity comes from the use of extended and logical partitions, which are a hack required due to MSDOS partitioning (also called MBR) from the 1980s. Using GPT partitioning simplifies most of that, but Windows has some strict rules about GPT. Linux does not. To switch from MBR to GPT requires reinstall from scratch for both Windows and Linux, so that is a huge downside for most people. Windows also requires UEFI booting, no legacy BIOS booting. Linux will boot from GPT partitions with either BIOS or UEFI.

Also, the stuff I suggested has minor risks. Run
sudo apt autoremove
sudo apt autoclean
These are safe to run weekly, if you like.

But you are correct to be worried about changing partitions around without total, complete, know-you-can-recover backups.

Many people find that switching from dual boot to single-boot with virtualization is an option. It reduces lots of risks, but has a few drawbacks for graphics performance.