From 02fcbd9792f35b9edf9aa635779ae79fa6cc9345 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Aug 2022 18:10:10 +0200 Subject: [PATCH] bullseye migration: add a check that there's at least 70MB available in /boot ... --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index e8f664675..9b11f8084 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -373,6 +373,9 @@ class MyMigration(Migration): if free_space_in_directory("/var/") / (1024**3) < 1.0: raise YunohostError("migration_0021_not_enough_free_space") + if free_space_in_directory("/boot/") / (70**3) < 1.0: + raise YunohostError("/boot/ has less than 70MB available. This will probably trigger a crash during the upgrade because a new kernel needs to be installed. Please look for advice on the forum on how to remove old unused kernels to free some space in /boot/.", raw_msg=True) + # Check system is up to date # (but we don't if 'bullseye' is already in the sources.list ... # which means maybe a previous upgrade crashed and we're re-running it)