Introduction to partitioning the root directory of Ubuntu with Vmvare virtual machine

Introduction to partitioning the root directory of Ubuntu with Vmvare virtual machine

Preface

When I installed Ubuntu 18.04, I manually partitioned the system, giving 15G to the root directory / and about 50G to the home directory /home. I thought that was enough, but when I installed petlinux (a software for porting Linux) later, it needed to be installed in the /opt directory, which resulted in insufficient space in the root directory.

Therefore, the virtual machine needs to be repartitioned. After consulting relevant information, it is finally successfully achieved using Ubuntu's image cdlive and the gparted partition tool.

Rationale

Use the gparted tool to repartition the system, but you cannot partition in the installed Ubuntu because after entering the system, the disks that need to be partitioned are occupied.

Therefore, you need to use cdlive to enter the trial system, and then partition the system.

Procedure

1. Start the virtual machine from CD

As shown in the figure above, in the virtual machine settings, CD/DVD, check Connect at startup and select the image file to be used.

Then start the VM from "Enter firmware at power on"

In the interface above, use + - to move CD-ROM Drive to the first one, then F10, select yes to save and exit.

After selecting the language, click Try Ubuntu to enter the system.

2. Use GParted tool to partition

Search for the GParted tool in the application and partition it.

The picture below is my disk before partitioning.

sda1 is mounted on /boot, sda2 has a capacity of 62.09G and is divided into sda5 swap partition, sda6 is mounted on the root directory, and sd7 is mounted on the home directory. sda3 was expanded to 64G after the virtual machine was installed.

As shown in the figure above, when there is a lock on the disk, partitioning is not possible.

Select sda5, right-click and select "Disable swap space", the locks behind the disk will disappear and you can partition.

3. How to use GParted.

Select the disk you want to resize, right-click and select Change Size/Move

Move the arrow left or right to change the partition size.

My partitioning process:

1. Expand sda2 by 64G.

2. Expand sda7 and move it backwards.

3. Expand the space of sda6.

The adjusted partition is shown in the figure below, just save it.

Then shut down the virtual machine and the interface shown below will be displayed. Disconnect the CD from the settings and press "ENTER" on the keyboard to restart.

Log into the system normally.

The new disk partition is shown in the figure below, achieving the purpose of expanding the root directory.

This is the end of this article about how to partition the root directory of Ubuntu with the Vmvare virtual machine. For more information about how to partition Ubuntu with Vmvare, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Introduction to the process of extending the boot partition in Kylin 4.0.2 (Ubuntu)
  • How to add a swap partition in Ubuntu

<<:  Solve the problem of OpenLayers 3 loading vector map source

>>:  Summary of relevant knowledge points on how adaptive web design is achieved

Recommend

Nginx restricts IP access to certain pages

1. To prohibit all IP addresses from accessing th...

Vue large screen data display example

In order to efficiently meet requirements and avo...

Let's talk about the Vue life cycle in detail

Table of contents Preface 1. Life cycle in Vue2 I...

Web page comments cause text overflow in IE

The experimental code is as follows: </head>...

Vue implements scrollable pop-up window effect

This article shares the specific code of Vue to a...

Summary of Mysql common benchmark commands

mysqlslap Common parameter description –auto-gene...

TypeScript decorator definition

Table of contents 1. Concept 1.1 Definition 1.2 D...

js implements custom drop-down box

This article example shares the specific code of ...

Example of implementing grouping and deduplication in MySQL table join query

Table of contents Business Logic Data table struc...

Configure Mysql master-slave service implementation example

Configure Mysql master-slave service implementati...

A brief discussion on the correct posture of Tomcat memory configuration

1. Background Although I have read many blogs or ...

mysql update case update field value is not fixed operation

When processing batch updates of certain data, if...

In-depth analysis of Flex layout in CSS3

The Flexbox layout module aims to provide a more ...

Steps to deploy Docker project in IDEA

Now most projects have begun to be deployed on Do...