4

I'm trying to resize my Ubuntu partition but there seems to be a problem. I'm trying to do it from a live USB. I have unallocated space but when I try to resize my Ubuntu partition, gparted just lets me shrink it and doesn't lets me expand it. It's like he doesn't detect there's space.

gparted

Any idea on how to do it?

slava
  • 3,887
Wylex
  • 143
  • Looks like you are trying to create an ext3 partition. Use ext4. Moving, changing partitions always has some risk. Be sure you have good backups. Any interruption will totally corrupt all data. You could also shrink your sda5 NTFS partition and make new partition include that & all the space at end of drive. Then move some of your data from /home to new partition. – oldfred Feb 12 '19 at 14:38
  • Before giving any instructions, you need to answer some questions for me... you've got a 1TB disk that's about 70% unused. /dev/sda3 and /dev/sda5 are empty, and depending on their intended use, should be resized down. You have a strange ext3 partition which should probably be removed. /dev/sda6 can't be resized until it has adjacent unallocated space. Please describe how/why this disk structure looks the way it does. – heynnema Feb 12 '19 at 14:52
  • @oldfred this OP doesn't appear to have a separate /home... and I don't recommend creating one either. What they DO have is kind of a partitioning mess... hopefully we can help them straighten it out. – heynnema Feb 12 '19 at 15:05
  • @heynnema to be honest I have no idea why my partitioning is so messy. I did create the strange ext3 partition because I was trying to allocate some space for ubuntu and I changed the format partition to ext4 and then to ext3 just to see if that worked. I already deleted it. – Wylex Feb 12 '19 at 15:32
  • You didn't answer my questions about sda3 and sda5. Please update your gparted screenshot. Report back. – heynnema Feb 12 '19 at 15:51
  • @heynnema When I first installed Linux, they recommended to create a data partition that would be accessible from windows and linux. That's sd5. About sd3 I have no idea what was supposed to be – Wylex Feb 12 '19 at 16:00
  • That's reasonable. But you have no Windows now, and you really should have Windows to do things like firmware/BIOS/etc updates that can't be done in Ubuntu. So am I clear, that I can give instructions to delete sda3 and sda5? – heynnema Feb 12 '19 at 16:02
  • @heynnema I do have windows. Sd3 is empty so i guess is alright to delete it. Sd5 is not however – Wylex Feb 12 '19 at 16:06
  • DO NOT delete sda3, that is your Windows. It is only showing empty as you see the red ! icon meaning gparted cannot read it. Usually means you left Windows fast start up on, but it could need chkdsk or have other errors. See: http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions – oldfred Feb 12 '19 at 16:09
  • Where is Windows? sda3? It's probably not showing used space because the partition needs repair from Windows. Can you boot to Windows and do a chkdsk? sda5 contains shared data now, yes? Please update your screenshot... I have to work with current data. – heynnema Feb 12 '19 at 16:10
  • @oldfred good point. We both figured that out at about the same time :-) – heynnema Feb 12 '19 at 16:50

2 Answers2

2

Note: This answer represents the minimum effort to resolve the problem, based on the current available information. More effort can always be applied at a later time to modify specific partition sizes.

Make sure that you have a good backup of your important files in /dev/sda5, as this procedure can corrupt or loose data.

Keep these things in mind:

  • always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

  • a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

  • a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

  • if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

  • you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

  • boot into Windows are run a chkdsk on the C: drive (this will require a reboot into Windows to accomplish)
  • boot to a Ubuntu Live DVD/USB
  • start gparted
  • delete "New Partition #1", the ext3 partition # already done
  • move /dev/sda5 all the way to the right
  • move /dev/sda4 all the way to the right
  • move /dev/sda7 all the way to the right
  • resize /dev/sda6 to the right as far as you can
  • click the Apply button
  • reboot
heynnema
  • 70,711
0

Partitions are stored on the disk in a very specific order. You can't grow a partition to the "right" until there is free space directly to the right of it - you first have to move the other partitions to the right.

In this case it doesn't look like too much copying will be needed, but in some circumstances moving a few partitions a "small" amount can result in a long copy operation since all the data must be physically copied from one area of the disk to another.

You may also want to be aware that moving the partitions may change their ordered number. While Linux uses unique identifiers (UUID) most of the time, some operating systems (Windows, and some Linux systems) reference the disk using it's indexed number such as (hd0, 2) and moving the partitions around may change this number. In your case it doesn't appear it will happen, but you should take care not to change the order or introduce new partitions that disturb the ordering.