bib: mount devtmpfs inside the container too

This ensures that the new `partscan` feature in osbuild works. By
default the containers only have a static snapshot of /dev on a
tmpfs. This means that anything later added by losetup will be
missing inside the container.

It also means that https://github.com/osbuild/osbuild/pull/1468
can be reverted.
This commit is contained in:
Michael Vogt 2024-03-06 14:54:24 +01:00 committed by Simon de Vlieger
parent bff341cb0b
commit 4fa198c18d

View file

@ -53,6 +53,14 @@ func EnsureEnvironment() error {
if err := util.RunCmdSync("mount", "--bind", destPath, osbuildPath); err != nil {
return err
}
// Ensure we have devfs inside the container to get dynamic loop
// loop devices inside the container.
devMnt := "/dev/"
if err := util.RunCmdSync("mount", "-t", "devtmpfs", "devtmpfs", devMnt); err != nil {
return err
}
return nil
}