[SOLVED] Expanding file system issue

Having issues with your DietPi installation, or, found a bug? Post it here.
unixmit
Posts: 45
Joined: Wed Jun 13, 2018 7:37 pm

[SOLVED] Expanding file system issue

Post by unixmit »

I’ve just downloaded the latest Raspberry Pi image and flashed it onto and 8GB SD card
After booting the Pi and accessing over SSH it doesn’t seem to have expanded the file system so it has no free space to continue. Is there a script I can run to expand the drive and if so where can I find it?

Thanks
Last edited by unixmit on Sun Feb 03, 2019 4:09 pm, edited 1 time in total.
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Expanding file system issue

Post by MichaIng »

Please try:
systemctl enable dietpi-fs_partition_resize
reboot
unixmit
Posts: 45
Joined: Wed Jun 13, 2018 7:37 pm

Re: Expanding file system issue

Post by unixmit »

Thanks so much. That sorted it out and I no longer get issues with the initial setup.
Not sure why the expansion wouldn’t happen by default at the beginning though. Is that normal? Maybe I missed a step.
unixmit
Posts: 45
Joined: Wed Jun 13, 2018 7:37 pm

Re: Expanding file system issue

Post by unixmit »

I spoke too soon. Still having issues. I started over twice, flashing the SD card again. Part way through the initial setup I get the error:

DietPi-Update: G_AGUG
│ - Exit code: 100
│ - DietPi version: v6.17.0 (Fourdee/master) | HW_MODEL:0 | HW_ARCH:1 | DISTRO:4
│ - Image creator: DietPi Core Team
│ - Pre-image: Raspbian Lite
...
│ After this operation, 278 kB of additional disk space will be used.
│ E: You don't have enough free space in /var/cache/apt/archives/.

Any clue why I'm getting this error? Obviously it says there's not enough space. I'm using an 8GB SD card and the Raspberry Pi image with no changes. Strange
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Expanding file system issue

Post by MichaIng »

There is indeed an issue with the current RPi image not expanding the file system correctly. We will upload new images soon.

Okay so the issue now occurred before/during update. In this case you need to do the expansion manually. Please run the following:
Verify your root partition is /dev/mmcblk0p2: findmnt / -o source -n
Expand partition: sfdisk /dev/mmcblk0 -fN2 --no-reread <<< ',+,,,'
Tell the kernel/system about changed partition: partprobe /dev/mmcblk0
Expand the file system: resize2fs /dev/mmcblk0p2
unixmit
Posts: 45
Joined: Wed Jun 13, 2018 7:37 pm

Re: Expanding file system issue

Post by unixmit »

Thank you for confirming that. I thought I was going mad. That’s great I’ll give it a go.
unixmit
Posts: 45
Joined: Wed Jun 13, 2018 7:37 pm

Re: Expanding file system issue

Post by unixmit »

Still having issues. df -h shows that expanding the file system worked but now I get a new error:

Get:34 https://archive.raspberrypi.org/debian stretch/main armhf
│ raspberrypi-bootloader armhf 1.20181112-1 [3,573 kB]
│ Fetched 54.0 MB in 38s (1,385 kB/s)
│ E: Failed to fetch
https://archive.raspberrypi.org/debian/ ... berrypi-sy
│ s-mods_20181127_armhf.deb gnutls_handshake() failed: The TLS connection was
│ non-properly terminated.
│ E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?



│ Unable to continue, DietPi-Update will now terminate.

Trying the suggestions it notes now.
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Expanding file system issue

Post by MichaIng »

I remember seening this error once. Have to search the web.

However TLS errors often occur in combination with wrong system clock. As failsafe, run /DietPi/dietpi/func/run_ntpd 1 to sync the system clock.
unixmit
Posts: 45
Joined: Wed Jun 13, 2018 7:37 pm

Re: Expanding file system issue

Post by unixmit »

Now I'm getting Log file contents:
│ Reading package lists...
│ Building dependency tree...
│ Reading state information...
│ Calculating upgrade...
│ E: The package index files are corrupted. No Filename: field for package
│ libraspberrypi-bin.

Maybe I'll just wait until the new images are up.
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Expanding file system issue

Post by MichaIng »

Please try the following:
apt clean
rm -R /var/cache/apt
apt update


This is an error with the Raspberry Pi APT repository. The above cleans all local APT cache an refreshes the package list.
I just checked on my RPi and I can update the repo fine. But check the last command above for error messages.
Post Reply