It is risky, Sometimes I take an extra precaution (depending on how bad I want to keep the OS).
1.) In ubuntu, comment out your swap line in /etc/fstab
....or if youre already in the live disk, mount the ubuntu partition and go into /etc/fstab and comment swap.
In a live disk - unmount any mounted partitions
2.) I delete swap.
3.) Right click, shrink the ubuntu partition to the new size
4.) my extra precaution... if i have enough space on some other partition or maybe before starting the machine insert another drive, to make a backup of the partition as an .iso... dd if=/dev/nv**p6 of=/sparedisklocation/mypartition.iso bs=4m status=progress
5.) Decide how much swap you want to re-create
6.) Right click, Move "most" the unallocated space (minus swap size) next to the partition to be increased and grow the partition. (Your partitions in your example are fairly close to each other, other people may have to step through this process with each partition in between the source and target partitions)
7.) make a new partition for swap with your leftover unallocated space.
8.) Try it out
9.) Add your new swap location/UUID to your /etc/fstab... delete the old entry\
if all went to hell... and I can't boot into ubuntu:
FIRST - I would try to shrink a partition down to create a small 10g space or so !!!TO THE RIGHT OF THE PARTITION!!!!. Create a small 10g partition and install a minimal installation (don't create swap) on that partition and reboot. (on one occasion, the new small install found the other ubuntu and fixed whatever broke and made it available in the new boot menu) Then I booted into my original ubuntu, deleted the small ubuntu partition and reclaimed the space by growing my current partition... i think the gnome-disks application did that pretty easy. Then update-grub so that you can remove the entry for the small-ubuntu you created. This applies if you created the little "emergency ubuntu" from space that came from a linux partition, I dont know the procedure to reclaim inside of windows. You could always grow it back easily with gparted...
Another note, this is also a surprisingly fast repair and may be easier than trying to use/follow the mount/bind/chroot/install-grub/update-grub method with a live disk if you're not experienced with it.
If that was not an option I go to the backup, boot back into the live disk:
- re-create the same-sized partition in old ubuntu partition (i do this out of fear, probably unnecessary)
- then
dd if=/sparedisklocation/mypartition.iso of=/dev/nv**p6(in your case) bs=4M status=progress
. This copies your backed-up partition back into the partition space.
- Try to boot again ..... the comfort in this for me, is no matter what is going wrong, you have a copy of your partition... I have made copies of desktop computers like this and taken them on travel with me on my laptop for use, so it is usually pretty portable and will be found by other linux systems(via update-grub) if worst comes to worst