1

I put an Image of Ubuntu 18.04.3 onto a 32GB SD card. It came with no desktop, so I am trying to install xubuntu. When I try to install it using sudo apt-get install xubuntu-desktop I get the following error:

You don't have enough free space in `/var/cache/apt/archives` 

I tried sudo apt-get autoclean sudo apt-get clean and different variants of sudo apt-get autoremove but nothing worked.

$ df -h
Filesystem       Size   Used   Avail  Use%    Mounted on 
/dev/root        2.1G   1.4G    513M   74%    /
devtmpfs         1.9G      0    1.9G    0%    /dev
tmpfs            1.9B      0    1.9G    0%    /dev/shm
tmpfs            1.9G   2.5M    1.9G    1%    /run
tmpfs            5.0M      0    5.0M    0%    /run/lock
tmpfs            1.9G      0    1.9G    0%    /sys/fs/cgroup
/dev/mmcblk0p1   253M    29M    224M   12%    /boot/firmware
tmpfs            381M      0    381M    0%    /run/user/1000`

I'm new to linux, but why is my root (and filesystem in general) so small if my SD card is 32GB? And is there a way to increase root through the command line(maybe fdisk)? I don't have another linux machine that I can run Gparted on. But I do have a Windows laptop that could possibly do Gparted Live. I've never done that before so if that is the best solution, tips to get started would be much appreciated.

Don't know if it matters but I'm following the instructions here Raspberry Pi 4 Ubuntu Server/ Desktop 18.04.3 Image (unofficial) to try and get Ubuntu up and running xubuntu on my Rpi 4.

EDIT:

$ sudo parted -ls
Model: SD SK32G (sd/mmc)
Disk /dev/mmcblk0: 31.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start     End     Size   Type     File System    Flags
1       1049kB   269MB   268MB   primary    fat32        boot,lba
2       269MB   31.9GB   31.6GB  primary    ext4     
$ lsblk -f
Name         Fstyle  Label     UUID                                   Mountpoint
mmcblk0
 |_mmcblk0p1 vfat  system-boot E497-1FDF                           boot/firmware
 |_mmcblk0p2 ext4  writable    bfa0733b-bdb9-4846-914a-45160bac3ed0     /  
  • It is probably possible to increase your root partition, but in order to help you, we need more information, particularly about the whole partition table and possible other partitions, that are not mounted, unallocated drive space and the location of the partitions. So please edit your original question to show the output of sudo parted -ls or the graphical output of gparted. The root partition is probably small because the image was designed for a smaller SD card (maybe 4 GB card), or because it is a live system. Seeing the whole partition table will help us answer that question too. – sudodus Sep 21 '19 at 19:19
  • just updated with the results of sudo parted -ls – Sean Aidan Herbert Sep 21 '19 at 19:31
  • 1
    The size of /dev/root does not match the size of the second partition, the ext4 partiiton. What image file name and link to where you downloaded from? Maybe there is some LVM structure. Please show also the output of sudo lsblk -f and sudo lsblk -m – sudodus Sep 21 '19 at 19:37
  • 1
    Sorry, the output of lsblk does not add more information. Most of us here at AskUbuntu run Ubuntu in PC computers, and the architecture is different from that of Raspberry Pi. Maybe you have better luck asking and getting help via the link you provided in your question. – sudodus Sep 21 '19 at 19:43
  • 1
    Ok I'll ask there as well. But here is the link to the image: https://github.com/TheRemote/Ubuntu-Server-raspi4-unofficial/releases/download/v7/ubuntu-18.04.3-preinstalled-server-arm64+raspi4.img.xz – Sean Aidan Herbert Sep 21 '19 at 19:45
  • 2

1 Answers1

0

Don't know why, but after reimaging my sd card about 10 times, it finally decided to allocate root partition 29GB