After installing the image on the SD, make sure to resize
If the image from respeaker is installed, then we do it according to this option
When we put the image on the Debian SD card from here, then by default the root partition is assigned 4 GB of space, and since we put Debian on an SD card larger than 4 GB, then there is a need to increase the space
Output a list of sections
df -hT
Output a list of disks
fdisk -l
Outputs a tree-like output that includes all block devices connected to the operating system
lsblk
We find our boot partition, it looks like this. Knowing that the SD card has a capacity of 32 GB, and the system is allocated 4 GB of space, then you need to increase the space
Change the size
sudo cfdisk /dev/mmcblk0
Reloading
sudo systemctl reboot
After the reboot, the root partition should increase in size
If you have built your own assembly or use my assemblies, which are above the link
When we put our assembled image on the SD card, the way to increase the size of the file system differs from the option if we would put the images from respeaker, which are here.
- df -hT - output a list of partitions and file systems
- lsblk - output a list of block devices
- resize2fs /dev/mmcblk0p2 - increase the size of the EXT4 file system on a logical volume
df -hT - we display a list of partitions and file systems and look at the current size of the partition. In my case Debian is on the SD card and has a partition /dev/mmcblk0p2
Knowing the necessary partition, we will open the utility for working with disk space
sudo cfdisk /dev/mmcblk0
The view before we change it, we will expand the section. Initially, 3.2G is available to us, although in fact the size of the SD card is 32G
Change the size of the /dev/mmcblk0p2
partition
The size does not need to be specified, it is offered by the system itself. I selected the entire size as is and pressed enter
Save the section change by selecting Write
We confirm our intentions by typing yes
Exit fdisk by selecting Quit
We output a list of partitions to check for resizing, and as you can see, the size of /dev/mmcblk0p2 remains the same
df -hT
Now we change the size with the command
resize2fs /dev/mmcblk0p2
Now the size has changed and 30G has become available to the system
After changing the settings, reboot the system
sudo systemctl reboot