We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 57b3948 + e9fcba5 commit f226880Copy full SHA for f226880
1 file changed
main.go
@@ -57,6 +57,11 @@ func mountBind(src, dst string) {
57
must("bind "+src, unix.Mount(src, dst, "", unix.MS_BIND, ""))
58
}
59
60
+func mountBindRecursive(src, dst string) {
61
+ os.MkdirAll(dst, 0o755)
62
+ must("bind recursive "+src, unix.Mount(src, dst, "", unix.MS_BIND|unix.MS_REC, ""))
63
+}
64
+
65
func overrideCmdline(root, content string) {
66
tmp := filepath.Join(root, "tmp", "cmdline")
67
os.MkdirAll(filepath.Dir(tmp), 0o755)
@@ -402,7 +407,7 @@ func main() {
402
407
}()
403
408
404
409
mountBind("/proc", filepath.Join(instDir, "proc"))
405
- mountBind("/sys", filepath.Join(instDir, "sys"))
410
+ mountBindRecursive("/sys", filepath.Join(instDir, "sys"))
406
411
mountBind("/dev", filepath.Join(instDir, "dev"))
412
overrideCmdline(instDir, "talos.platform=metal "+strings.Join(extra, " "))
413
0 commit comments