From 11894ca067981b44a1c17612b8d85144d71f30a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 11 Jan 2026 17:19:21 +0100 Subject: Detach original read-write root filesystem from /run/old_root --- src/main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index f609cfa..b543d8e 100644 --- a/src/main.c +++ b/src/main.c @@ -177,6 +177,13 @@ int erebos_tester_isolate_fs( const char * rwdir ) return -1; } + ret = umount2( "/run/old_root", MNT_DETACH ); + if( ret < 0 ){ + fprintf( stderr, "failed to detach /run/old_root: %s\n", strerror( errno )); + free( cwd ); + return -1; + } + ret = chdir( cwd ); if( ret < 0 ){ fprintf( stderr, "failed to chdir to %s: %s\n", cwd, strerror( errno )); -- cgit v1.2.3