-2

My root partition is 90% full because, when I installed Ubuntu, I thought that my /home partition needed more space. So right now I have a 20 GB root partition, 150 GB for my /home partition, and 40 GB of unallocated space that I would like to give to my root partition! Note that I am dual booting Ubuntu with Windows 11.

I tried using GParted, and the disk manager from Ubuntu, but it was unsuccessful. Using lsblk does not show where my partition starts, so I cannot use fdisk to delete my partition and extend it to where it starts.

screenshot of GParted

Fed_
  • 3
  • 1
  • 3
  • 3
    The minimum requirements for Ubuntu Desktop are 25GB. 20GB is insufficient. It would be wise to allocate more space than the bare minimum. If you want to expand the root partition to unpartitioned space, that unpartitioned space must be adjacent to the root partition. Your question lacks sufficient detail to understand your partition layout. If I were you, I'd just reinstall the system. Do you even really need a separate home partition? – Nmath Jan 31 '22 at 19:18
  • See https://askubuntu.com/questions/404361/extending-my-root-paritition?rq=1 – pLumo Jan 31 '22 at 19:18
  • Edit your question and show me a screenshot of gparted. Start comments to me with @heynnema or I'll miss them. – heynnema Jan 31 '22 at 19:22
  • @Nmath idk if i need a separate home partition.. I thought that it would be where all my file and apps would be installed.. – Fed_ Jan 31 '22 at 19:45
  • @heynnema ok now the post is edited with the screenshot! – Fed_ Jan 31 '22 at 19:48
  • @heynnema do i need to move the partition before the unallocated space, or even before the partition where win is installed? Thx!! – Fed_ Jan 31 '22 at 19:58
  • @Fed_ Moving the /dev/nvme0n1p5 partition left moves it to the beginning of the unallocated space. Just follow my instructions :-) – heynnema Jan 31 '22 at 20:00
  • @heynnema ok! i'm setting up my Ubuntu Live usb!! i'll let u know! – Fed_ Jan 31 '22 at 20:02
  • @Fed_ Good luck! Report back. – heynnema Jan 31 '22 at 20:02
  • @Fed_ MAKE GOOD BACKUPS FIRST! – heynnema Jan 31 '22 at 20:03
  • No, apps won't be installed there. Some configs will go there but the space used by configs is insignificant. A separate home is not very useful except in some niche situations. If you don't have a clear need for one I'd use the default options which installs the whole system to a single partition. Then you won't encounter these kinds of roadblocks due to rigid partitioning – Nmath Jan 31 '22 at 20:18
  • @Nmath True. Exactly as I stated in my answer :-) – heynnema Jan 31 '22 at 20:30
  • @heynnema thx! it worked!! – Fed_ Jan 31 '22 at 21:08
  • @Fed_ Great news! – heynnema Jan 31 '22 at 21:09
  • Does this answer your question? How to resize partitions? – Pilot6 Feb 03 '22 at 08:49

1 Answers1

4

IMPORTANT... Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Note: Manual multi-partitioning during install (example: a separate / and /home), especially on smallish disks, usually causes partition sizing problems later.

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 to a Ubuntu Live DVD/USB, in “Try Ubuntu” mode
  • start gparted
  • move the entire /dev/nvme0n1p5 partition all the way left
  • resize the right side of /dev/nvme0n1p5 all the way right
  • click the Apply icon
heynnema
  • 70,711
  • "Move all way to the left" - depending on the type of disk that's not possible, a lot of times moving / is a risk and you will need to reconfigure something there to boot. – Satoshi Nakamoto Jan 31 '22 at 21:34
  • @Tyþë-Ø Good news is that my procedure worked, without any drama. Please clarify "type of disk" and "reconfigure something". – heynnema Jan 31 '22 at 21:35
  • I tested it on 300 machines. In my experience, some disks failed that task not allowing them to move further and if did it completely broke the system. I believe that's not the case with SSD disks anymore, mostly I've tested was HHD – Satoshi Nakamoto Jan 31 '22 at 21:39
  • 1
    @Tyþë-Ø I think the difference is that I MOVE the entire partition, and then RESIZE it. Some would just RESIZE the left/beginning part of the partition, and although I don't know for sure, I think that can cause a problem. On your 300 machines, which way did you do it? SSD vs HDD shouldn't make any difference. – heynnema Jan 31 '22 at 21:41
  • You're right you made me remember something about moving and resizing they are very different, one can cause a loss of data. It's related to block sizes and I wouldn't remember now as I'm more focused on programming, blocks of data in SSD vs HDD are not the same! I tested few SDDs without the fuzz it was compared to HDD, old BIOS, old H20 vs. new H20, Intel Itanium, which all resulted in different ways to boot the system. Old gparted vs. new GParted, little details matter. – Satoshi Nakamoto Jan 31 '22 at 21:54
  • @Tyþë-Ø I think what might break is GRUB, but that can be fixed. – heynnema Jan 31 '22 at 22:07
  • Your answer is pretty much valid for today's computers. If I remember I could resize and move many times as I wanted an SSD partition before it corrupts. While in HHD it easily breaks. GRUB was one of the problems, mistake formatting, and block size limits. – Satoshi Nakamoto Jan 31 '22 at 22:15