1

For Virtual Machine I'm using with VMware, and for OS the Ubuntu 20.04. I create the 500Mb for /boot, 30GB for root /, 8192MB for /swap and others for /home partition.
When I installed the Ubuntu, I create the partitions disks. It was like:

/boot = 500MB
/     = 30GB
/swap = 8192MB
/home = 15GB

enter image description here


The output after installation by using parted command it likes:

dev@ops:~$ sudo parted -l
Model: VMware Virtual NVMe Disk (nvme)
Disk /dev/nvme0n1: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  500MB   499MB   primary   ext2            boot
 2      501MB   53.7GB  53.2GB  extended
 5      501MB   30.5GB  30.0GB  logical   ext4
 6      30.5GB  38.7GB  8191MB  logical   linux-swap(v1)
 7      38.7GB  53.7GB  15.0GB  logical   ext4


Now I want to resize the partitions of 15GB and 30GB.
I want to take the 5GB from partition Number 7: and move it to the partition Number 5 (30GB) and merge it with a 30GB. After the process, it would be shows:
Number  Start   End     Size    Type      File system     Flags
 1      1049kB  500MB   499MB   primary   ext2            boot
 2      501MB   53.7GB  53.2GB  extended
 5      501MB   30.5GB  35.0GB  logical   ext4
 6      30.5GB  38.7GB  8191MB  logical   linux-swap(v1)
 7      38.7GB  53.7GB  10.0GB  logical   ext4

I don't use with the LVM methodologies, simple partitioning only.

Thank you in advance!
morris
  • 13
  • 4
  • Use gparted livecd to move,resize your partitions as you want https://gparted.org/ shrink 7, shift 6,7 to the end, grow 5, apply – gapsf Oct 06 '22 at 05:07
  • I can't use with classic way - `fdisk`, `cfdisk`, `sfdisk` or `parted` to do this? Thanks – morris Oct 06 '22 at 21:56
  • You need to shift (move} partitions with filesystems inside it. These tools cant do this – gapsf Oct 07 '22 at 04:12
  • Why you cant boot your vm from gparted iso? – gapsf Oct 07 '22 at 04:15
  • That's it, it works. I had to change something in VM. This option exists only in the _VMware workstation pro_, in the normal version (Player) it does not exist. I change the _"Firmware type"_ from **BIOS** to **UEFI**. This option exist in _"Edit virtual machine settings"_ ⇾ _"Options"_ ⇾ _"Advanced"_. After that, the system loaded to the _gparted-live-cd_, and I can to change the partition size. Thank you, @gapsf! – morris Oct 07 '22 at 21:44

0 Answers0