From f38502d5ad660aa511d00186ab273cc8b35aa78b Mon Sep 17 00:00:00 2001 From: dalto Date: Sat, 7 Sep 2024 12:02:13 -0500 Subject: [PATCH] [umount] Also unmount the root filesystem --- src/modules/umount/UmountJob.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/modules/umount/UmountJob.cpp b/src/modules/umount/UmountJob.cpp index 83cf2f10e..0f150a244 100644 --- a/src/modules/umount/UmountJob.cpp +++ b/src/modules/umount/UmountJob.cpp @@ -78,6 +78,18 @@ unmountTargetMounts( const QString& rootMountPoint ) .arg( m.device, m.mountPoint ) ); } } + + // Last we unmount the root + if ( Calamares::Partition::unmount( rootMountPoint, { "-lv" } ) != 0 ) + { + return Calamares::JobResult::error( + QCoreApplication::translate( UmountJob::staticMetaObject.className(), + "Could not unmount the root of target system." ), + QCoreApplication::translate( UmountJob::staticMetaObject.className(), + "The device mounted at %1 could not be unmounted." ) + .arg( rootMountPoint ) ); + } + return Calamares::JobResult::ok(); } @@ -139,6 +151,7 @@ UmountJob::exec() return r; } } + // For ZFS systems, export the pools { auto r = exportZFSPools();