Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rock5B - bookworm - no space left when updating (boot partition) #6206

Closed
isarrider opened this issue Mar 3, 2023 · 21 comments · Fixed by #6220
Closed

Rock5B - bookworm - no space left when updating (boot partition) #6206

isarrider opened this issue Mar 3, 2023 · 21 comments · Fixed by #6220
Labels
Bug 🐞 ROCK 5B Solution available 🥂 Definite solution has been done
Milestone

Comments

@isarrider
Copy link

isarrider commented Mar 3, 2023

trying to update linux-image-legacy-rockchip-rk3588 Result in a no space left:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  linux-image-legacy-rockchip-rk3588
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
20 not fully installed or removed.
Need to get 25.7 MB of archives.
After this operation, 36.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://imola.armbian.com/apt bullseye/main arm64 linux-image-legacy-rockchip-rk3588 arm64 23.02.2 [25.7 MB]
Fetched 25.7 MB in 27s (967 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 18390 files and directories currently installed.)
Preparing to unpack .../linux-image-legacy-rockchip-rk3588_23.02.2_arm64.deb ...
Unpacking linux-image-legacy-rockchip-rk3588 (23.02.2) over (22.11.4) ...
dpkg: error processing archive /tmp/apt/archives/linux-image-legacy-rockchip-rk3588_23.02.2_arm64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-5.10.110-rockchip-rk3588' to '/boot/vmlinuz-5.10.110-rockchip-rk3588.dpkg-new': failed to write (No space left on device)
Removing obsolete initramfs images
Removing obsolete initramfs images
Errors were encountered while processing:
 /tmp/apt/archives/linux-image-legacy-rockchip-rk3588_23.02.2_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
@Joulinar
Copy link
Collaborator

Joulinar commented Mar 3, 2023

Can you share

df -h
ls -la /boot

@MichaIng
Copy link
Owner

MichaIng commented Mar 3, 2023

Please also show:

df -Th

So we can see whether the boot partition is the old FAT one or current ext4 one.

@isarrider
Copy link
Author

isarrider commented Mar 4, 2023

I already fixed it by deleting the old image...

root@Rock5-4GB:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.7G     0  1.7G   0% /dev
tmpfs           374M  6.4M  368M   2% /run
/dev/mmcblk1p2  118G  8.7G  104G   8% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.0G     0  4.0G   0% /mnt/_RAMDisk
/dev/mmcblk1p1  104M   82M   14M  86% /boot
tmpfs           4.0G     0  4.0G   0% /mnt/dietpi_userdata/docker-data/tmp
tmpfs           1.9G   47M  1.8G   3% /tmp
tmpfs            50M     0   50M   0% /var/log
overlay         118G  8.7G  104G   8% /mnt/dietpi_userdata/docker-data/overlay2/5cd94ca8f757864c6684d8f46d2cc0cb4d276c54211e1ecc026da43dd70a5727/merged
overlay         118G  8.7G  104G   8% /mnt/dietpi_userdata/docker-data/overlay2/08ee88522451abdfc35c739a2da55673a7bfad0966287e456e7ddb284fdadcf6/merged
root@Rock5-4GB:~# ls -la /boot
total 55592
drwxr-xr-x  5 root root     4096 Mar  3 16:52 .
drwxr-xr-x 18 root root     4096 Feb 14 15:00 ..
-rw-r--r--  1 root root        0 Mar  3 16:52 .next
lrwxrwxrwx  1 root root       32 Mar  3 16:52 Image -> vmlinuz-5.10.110-rockchip-rk3588
-rw-r--r--  1 root root  7913634 Feb 18 00:59 System.map-5.10.110-rockchip-rk3588
-rw-r--r--  1 root root     2710 Feb  2 15:04 boot.cmd
-rw-r--r--  1 root root     2782 Feb  2 15:08 boot.scr
-rw-r--r--  1 root root   215982 Feb 18 00:59 config-5.10.110-rockchip-rk3588
drwxr-xr-x  4 root root     4096 Feb 15 13:33 dietpi
-rw-r--r--  1 root root    18092 Jan 21 01:03 dietpi-LICENSE.txt
-rw-r--r--  1 root root    15518 Jan 21 01:03 dietpi-README.md
-rw-------  1 root root     3950 Feb  2 15:14 dietpi-wifi.txt
-rw-r--r--  1 root root    16318 Feb  8 13:53 dietpi.txt
-rw-r--r--  1 root root      326 Feb  8 14:04 dietpiEnv.txt
lrwxrwxrwx  1 root root       28 Mar  3 16:52 dtb -> dtb-5.10.110-rockchip-rk3588
drwxr-xr-x  3 root root     4096 Mar  3 16:45 dtb-5.10.110-rockchip-rk3588
-rw-r--r--  1 root root  7246600 Mar  3 16:52 initrd.img-5.10.110-rockchip-rk3588
drwx------  2 root root    16384 Feb  2 14:57 lost+found
lrwxrwxrwx  1 root root       32 Mar  3 16:52 uInitrd -> uInitrd-5.10.110-rockchip-rk3588
-rw-r--r--  1 root root  7246664 Mar  3 16:52 uInitrd-5.10.110-rockchip-rk3588
-rw-r--r--  1 root root 34185728 Feb 18 00:59 vmlinuz-5.10.110-rockchip-rk3588
root@Rock5-4GB:~# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  1.7G     0  1.7G   0% /dev
tmpfs          tmpfs     374M  6.4M  368M   2% /run
/dev/mmcblk1p2 ext4      118G  8.7G  104G   8% /
tmpfs          tmpfs     1.9G     0  1.9G   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     4.0G     0  4.0G   0% /mnt/_RAMDisk
/dev/mmcblk1p1 ext4      104M   82M   14M  86% /boot
tmpfs          tmpfs     4.0G     0  4.0G   0% /mnt/dietpi_userdata/docker-data/tmp
tmpfs          tmpfs     1.9G   47M  1.8G   3% /tmp
tmpfs          tmpfs      50M     0   50M   0% /var/log
overlay        overlay   118G  8.7G  104G   8% /mnt/dietpi_userdata/docker-data/overlay2/5cd94ca8f757864c6684d8f46d2cc0cb4d276c54211e1ecc026da43dd70a5727/merged
overlay        overlay   118G  8.7G  104G   8% /mnt/dietpi_userdata/docker-data/overlay2/08ee88522451abdfc35c739a2da55673a7bfad0966287e456e7ddb284fdadcf6/merged

@MichaIng
Copy link
Owner

MichaIng commented Mar 4, 2023

For testing, can you try this:

echo -e '#!/bin/dash\nrm -f /boot/vmlinuz-*-rockchip-rk3588' > /etc/kernel/preinst.d/00-remove-old-img
chmod +x 00-remove-old-img
apt install --reinstall linux-image-legacy-rockchip-rk3588

Looks like we need to raise the boot partition size if ext4 is used. On FAT, old files are removed as a mandatory step, since dpkg cannot upgrade files on FAT partitions in general.

@isarrider
Copy link
Author

I remember we had this discussion in a similar way... ;)
When we need to raise the size anyway, I strongly vote for FAT32,
as it is soo much easier to edit dietpi.txt then...

@MichaIng
Copy link
Owner

MichaIng commented Mar 4, 2023

When we need to raise the size anyway, I strongly vote for FAT32,

And you remember the many arguments I mentioned to use ext4 whenever it is possible 😉. On FAT, currently, reinstalls/upgrades would fail for a bunch of other reasons, one of these being the mentioned dpkg limitation, others the generation of the initramfs. The kernel pre/post install scripts would need to be tailored for this to work (with downsides).

@isarrider
Copy link
Author

true, but still...
when btw is the idea to only have one partition?
You mentioned about the partitions being unified...

@isarrider
Copy link
Author

(together with #6125 would make it so fast to setup a new system... 😁 )

@MichaIng
Copy link
Owner

MichaIng commented Mar 4, 2023

when btw is the idea to only have one partition?
You mentioned about the partitions being unified...

With mainline Linux and U-Boot, this should be possible. Currently the Rockchip/Radxa Linux 5.10.100 and U-Boot is used, which seems to not support a single partition image.

I mean, probably no one has tested recently. I could create one without dedicated boot partition, to test.

@isarrider
Copy link
Author

Please do and Ill test...
(Even more happy to test when #6125 would be in, as then test go much faster)
Twinktwink* 😁

@skyuplam
Copy link

skyuplam commented Mar 5, 2023

I have the same issue when trying to apt upgrade but am able to workaround it with @MichaIng 's suggestion

echo -e '#!/bin/dash\nrm -f /boot/vmlinuz-*-rockchip-rk3588' > /etc/kernel/preinst.d/00-remove-old-img
chmod +x 00-remove-old-img
apt install --reinstall linux-image-legacy-rockchip-rk3588

@MichaIng
Copy link
Owner

MichaIng commented Mar 5, 2023

Build without dedicated boot partition runs: https://github.com/MichaIng/DietPi/actions/runs/4337053557
Will be available here in ~30 minutes: https://dietpi.com/downloads/images/testing/

@skyuplam
Copy link

skyuplam commented Mar 6, 2023

DDR Version V1.07 20220412
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=16 Size=4096MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=16 Size=4096MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=16 Size=4096MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=16 Size=4096MB
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-371-g07caf6d56:derrick.huang
NOTICE:  BL31: Built : 12:33:59, May 30 2022
INFO:    ext 32k is not valid
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    system boots from cpu-hwid-0
INFO:    idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO:    dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO:    dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO:    dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO:    dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO:    BL31: Initialising Exception Handling Framework
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9

Just tried the test image and it didn't boot

@MichaIng
Copy link
Owner

MichaIng commented Mar 6, 2023

Ah my fault, did not update the installer accordingly to install kernel and bootloader even without dedicated boot partition. New build is running.

@isarrider
Copy link
Author

when this works - will this become standard then?

@MichaIng
Copy link
Owner

MichaIng commented Mar 6, 2023

Jep

@skyuplam
Copy link

skyuplam commented Mar 7, 2023

FYI, this time it works :)

[DietPi_ROCK5B-ARMv8-Bullseye.7z](https://dietpi.com/downloads/images/testing/DietPi_ROCK5B-ARMv8-Bullseye.7z)	2023-03-06 13:58 	102M
root@Dietpi:~# df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  7.6G     0  7.6G   0% /dev
tmpfs          tmpfs     1.6G  9.5M  1.6G   1% /run
/dev/nvme0n1p1 ext4      1.8T  555M  1.8T   1% /
tmpfs          tmpfs     7.7G     0  7.7G   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     7.7G     0  7.7G   0% /tmp
tmpfs          tmpfs      50M   36K   50M   1% /var/log

@isarrider
Copy link
Author

awesome...
I would try a bookworm build...

@MichaIng
Copy link
Owner

MichaIng commented Mar 7, 2023

Fantastic, I'll generate a Bookworm image!

@MichaIng MichaIng added this to the v8.15 milestone Mar 7, 2023
@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed Investigating 🤔 labels Mar 7, 2023
@isarrider
Copy link
Author

isarrider commented Mar 7, 2023

Fantastic, I'll generate a Bookworm image!

boots fine...
(https://dietpi.com/downloads/images/testing/DietPi_ROCK5B-ARMv8-Bookworm.7z)

@MichaIng
Copy link
Owner

MichaIng commented Mar 7, 2023

Many thanks for testing. Looks like we should test this in other cases as well. Will do for Orange Pi 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 ROCK 5B Solution available 🥂 Definite solution has been done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants