Skip to content

Commit

Permalink
fix: initramfs creation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-jacques committed Dec 19, 2024
1 parent 0360fbe commit 7b9e79b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runtime/vm/initrd.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ func (b *Builder) writeInitrd(file *os.File, instance *instance.Instance, image
return fmt.Errorf("failed to marshal init config: %w", err)
}

// initInfos, err := init.Stat()
// if err != nil {
// return fmt.Errorf("failed to get init stat: %w", err)
// }
initInfos, err := init.Stat()
if err != nil {
return fmt.Errorf("failed to get init stat: %w", err)
}

configRecord := cpio.StaticFile("/ravel/run.json", string(configJSON), 0644)

initRecord := cpio.Record{
ReaderAt: init,
Info: cpio.Info{
FileSize: uint64(len(b.initBin)),
FileSize: uint64(initInfos.Size()),
Name: "ravel-init",
Mode: unix.S_IFREG | 0755,
},
Expand Down

0 comments on commit 7b9e79b

Please sign in to comment.