
Move a swap partition to the end of the disk But if you have only one partition in the fdisk output or it is at the end of the disk (look at the end sectors), you can go directly to the Debian 11 extend partition. Therefore, you first need to move it to the end of the disk (where the added sectors are located), and only then expand sda1 itself. And what do we see? That we can’t just extend the /dev/sda1 partition, because immediately followed by sda5. I specifically installed Debian partitioned as the installer suggested, meaning that many would do so.

I increased the disk to 25 gigabytes, start the machine and check: # fdisk -lĭisk /dev/sda: 25 GiB, 26843545600 bytes, 52428800 sectorsĪttention! Before proceeding with further work on expanding the system partition, be sure to make a backup copy of your data!Īfter increasing the size of the disk, you must enlarge the partition itself. If it is not possible to increase the disk without turning off the virtual machine, then turn off and resize. If your virtualization environment allows you to do this without shutting down the machine, then resize the disk and run: # echo 1 > /sys/block/sda/device/rescan In the virtualization environment we increase the size of the hard disk of our virtual machine. As you remember, we are interested in the /dev/sda1 with the Linux type. In this example, we have 1 disk /dev/sda with a size of 20 gigabytes, which is divided into 3 partitions: /dev/sda1, /dev/sda2 and /dev/sda5. I/O size (minimum/optimal): 4096 bytes / 4096 bytesĭevice Boot Start End Sectors Size Id Type Sector size (logical/physical): 512 bytes / 4096 bytes

Our system partition /dev/sda1, mounted on / and has a size of 19 GB.

Now let’s see the size of the filesystem by running df -h: # df -hįilesystem Size Used Avail Use% Mounted on In the future, we need to perform actions as the root user, connect under this user: $ su. First, let’s check the version: $ cat /etc/debian_version
