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

Check for enough space on /boot volume (check #209) #210

Merged
merged 1 commit into from
Feb 15, 2020

Conversation

mxklb
Copy link

@mxklb mxklb commented Feb 14, 2020

Implements part one of #209

  • check that enough space is left on the /boot partition, otherwise skip installation

This prevents the install.sh script to brick the OS (leaving it in read-only mode) if the free /boot space on an OS isn't enough for downgrading the kernel. There must be at least 25M free /boot space to perform the driver installation, otherwise the installation is skipped.

@mxklb
Copy link
Author

mxklb commented Feb 14, 2020

I choose 25M due to the output

Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|93.93.130.214|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24898072 (24M) [application/x-debian-package]
Saving to: ‘/tmp/raspberrypi-kernel-headers_1.20190925+1-1_armhf.deb’

/tmp/raspberrypi-kernel-headers_1.20 100%[======================================================================>]  23.74M  2.62MB/s    in 9.3s    

2020-02-14 14:14:05 (2.57 MB/s) - ‘/tmp/raspberrypi-kernel-headers_1.20190925+1-1_armhf.deb’ saved [24898072/24898072]

dpkg: warning: downgrading raspberrypi-kernel-headers from 1.20200212-1 to 1.20190925+1-1
(Reading database ... 86007 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1.20190925+1-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1.20190925+1-1) over (1.20200212-1) ...
Setting up raspberrypi-kernel-headers (1.20190925+1-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.75+
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.75-v7+
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.75-v7l+
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.75-v8+
grep: /boot/kernel.img: No such file or directory
dd: failed to open '/boot/kernel.img': No such file or directory

gzip: stdin: unexpected end of file
 !!! Your kernel version is 
     Not found *** coressponding *** kernel headers with apt-get.
     This may occur if you have ran 'rpi-update'.
 Choose  *** y *** will revert the kernel to version 4.19.75+ then continue.
 Choose  *** N *** will exit without this driver support, by default.
Would you like to proceed? (y/N)

I don't know if this is enough - the right threshold. Actually I'm unable to test how much free /boot space is really needed to perform the kernel downgrade successfully. So I took 25M as a best guess because of this output. This threshold may get changed in future.

But finally it prevents the install.sh script to brick the OS for low /boot space < 25M conditions.

@Pillar1989 Pillar1989 merged commit 2da704e into respeaker:master Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants