DEV Community

TianZhen
TianZhen

Posted on • Originally published at youth2009.org on

2

enlarge ubuntu root partition in vmware

I have a ubuntu vmware guest with 30Gb root partition, but it's not enough after restore data from production environment, so I have to enlarge it.

  • shutdown ubuntu
  • enlarge partition on vmware guest setting
  • start ubuntu, it's better use text mode
  • sudo fdisk /dev/sda (I have only one device in ubuntu, sda)
  • delete swap partition and root partition with d command (yes, delete all partitions)
  • create root partition (primary partition) with n command, be careful the start selector must be as same as old root partition (default is good), end selector is the size what you want the partition be, e.g. +45G, is a 45Gb partiton
  • (optional) create swap partition if you need, with n command, and then change swap partition type with t command, swap type code is 82
  • write changes with w
  • reboot ubuntu
  • sudo resize2fs /dev/sda1, enlarge sda1 to default new size, e.g. 45Gb
  • (optional) sudo mkswp /dev/sda2 if you create swap partition
  • (optional) change swap partition record in /etc/fstab, new swap partition uuid or label could be found on sudo blkid

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay