Skip to content

Commit

Permalink
bib: mount devtmpfs inside the container too
Browse files Browse the repository at this point in the history
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 osbuild/osbuild#1468
can be reverted.
  • Loading branch information
mvo5 committed Mar 6, 2024
1 parent 5f6ac82 commit 52fe2c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bib/internal/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 52fe2c6

Please sign in to comment.