Merge pull request #1737 from mwhudson/leave-rp-mounted

mount rp at predictable path and leave it mounted
This commit is contained in:
Michael Hudson-Doyle 2023-07-26 10:23:55 +12:00 committed by GitHub
commit 7b90b67a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 7 deletions

View File

@ -395,13 +395,14 @@ class InstallController(SubiquityController):
rp = fs_controller.reset_partition
if rp is not None:
mounter = Mounter(self.app)
async with mounter.mounted(rp.path) as mp:
await run_curtin_step(
name="populate recovery",
stages=["extract"],
step_config=self.rp_config(logs_dir, mp.p()),
source="cp:///cdrom",
)
rp_target = os.path.join(self.app.root, "factory-reset")
mp = await mounter.mount(rp.path, mountpoint=rp_target)
await run_curtin_step(
name="populate recovery",
stages=["extract"],
step_config=self.rp_config(logs_dir, mp.p()),
source="cp:///cdrom",
)
await self.create_rp_boot_entry(context=context, rp=rp)
@with_context(description="creating boot entry for reset partition")