I really don't know how to do this. I was on dual boot windows/ubuntu but I want to extend ubuntu's partition, so I uninstalled windows on sda2. Now I have nothing I need on /dev/sda2 but I can't get sda3 to extend. Can someone enlighten me? Thanks a lot.
Asked
Active
Viewed 1,439 times
2
-
Do you still need/want an answer on how to do this? It can be done. What's on sda2? Is your goal to use all of sda2 and sda5 for Ubuntu? How much RAM do you have? – heynnema May 04 '17 at 00:37
-
You don't have unallocated space; sda2 is still there. – psusi May 04 '17 at 00:44
-
@psusi I know. We haven't deleted sda2 yet... – heynnema May 04 '17 at 00:45
-
@heynnema, Question says "so now I have unallocated space"... which isn't true. – psusi May 04 '17 at 00:46
-
@psusi technically correct, of course. She uninstalled Windows, so as soon as I get the go ahead, we'll delete sda2, and then we will have unallocated space :-) – heynnema May 04 '17 at 00:49
-
Note that the key symbol indicates that the extended partition you wish to resize is locked due to mounting of the partitions it contains. You can't resize a locked partition. See the duplicate question linked to here – Elder Geek May 04 '17 at 12:50
1 Answers
1
Unlike NTFS, EXT4 partitions cannot be resized while they are mounted and in use.
You will need to boot a live USB stick or DVD in order to resize the partition.
Additionally, you don't want to extend sda3
. Rather, you're going to want to extend sda5
.
Finally, you can't extend partitions backwards, only forwards. Which means you're actually going to have to do some finagling in order to do this the way you want. (Well, unless you're using LVM which is a whole other can of worms)
I would suggest just formatting sda2
and using it as extra space rather than using it to extend sda5
.

You'reAGitForNotUsingGit
- 14,809
-
Thank you for your answer. In other words, I won't be able to get sda5 to take the space of sda2? – sandi May 03 '17 at 20:58
-
@sandi - Not easily anyway. It is possible, but moving partitions takes forever and is also a risky operation in terms of data integrity. I would suggest formatting
sda2
asext4
, and mounting the newly formattedsda2
to/home
. If you need help mounting it at/home
, I'm sure there's another Q&A on this site explaining how to do that. – You'reAGitForNotUsingGit May 03 '17 at 21:01 -
ext4 sure can be resized while it is in use. No filesystem can be moved while in use though. – psusi May 04 '17 at 00:45
-
1@psusi not when it's in an extended partition, and not with a live swap. – heynnema May 04 '17 at 00:47
-
@heynnema, if another partition is in the way that's another matter entirely. As long as you have the space following it to expand it, ext4 handles it just fine. – psusi May 04 '17 at 00:56
-
@psusi even if you have available unallocated space behind an EXT4 partition, the best you can do (maybe) is to extend the right side of the EXT4 partition. You can't resize the left side, or move it. Best to be booted to a Ubuntu Live DVD/USB and not mess with a live partition. – heynnema May 04 '17 at 01:12
-
@heynnema, well yes, but that is also true of NTFS, which Android Dev claimed could be resized ( at all ) but not ext4. – psusi May 04 '17 at 01:19