Merge pull request #2369 from calamares/fix-umount

[umount] Also unmount the root filesystem
This commit is contained in:
Adriaan de Groot 2024-09-08 06:02:44 -04:00 committed by GitHub
commit bfe2f7993f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();