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:
parent
bff341cb0b
commit
4fa198c18d
1 changed files with 8 additions and 0 deletions
|
|
@ -53,6 +53,14 @@ func EnsureEnvironment() error {
|
||||||
if err := util.RunCmdSync("mount", "--bind", destPath, osbuildPath); err != nil {
|
if err := util.RunCmdSync("mount", "--bind", destPath, osbuildPath); err != nil {
|
||||||
return err
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue