Skip to content

Instantly share code, notes, and snippets.

@tsuchm
Created December 4, 2022 08:36
Show Gist options
  • Save tsuchm/97a42160c272c4dac588e60f3b252c7b to your computer and use it in GitHub Desktop.
Save tsuchm/97a42160c272c4dac588e60f3b252c7b to your computer and use it in GitHub Desktop.
--- a/internal/pkg/util/fs/mount/mount.go
+++ b/internal/pkg/util/fs/mount/mount.go
@@ -585,7 +585,10 @@
if sizelimit == 0 {
return fmt.Errorf("invalid image size, zero length")
}
- options = fmt.Sprintf("loop,offset=%d,sizelimit=%d,errors=remount-ro", offset, sizelimit)
+ options = fmt.Sprintf("loop,offset=%d,sizelimit=%d", offset, sizelimit)
+ if fstype == "ext3" {
+ options += ",errors=remount-ro"
+ }
return p.add(tag, source, dest, fstype, flags, options)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment