Convert mbr,boot,root <--> disk.img #160
-
👋, I was wondering what's the best way to convert (in Go) from/to different disk parts (mbr,boot,root) from/to a disk.img and vice versa. I had a quick look at the packer logic but I couldn't clearly isolate the logic to do that. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Can you describe what you need this for? Maybe that allows for an even better recommendation. The partitioning logic is exposed as https://pkg.go.dev/github.com/gokrazy/tools/packer#Pack.Partition (for rtr7-recovery-init, which installs gokrazy via PXE boot). That should get you most of the way there, though perhaps we need another function to conveniently work with the offsets of each partition. |
Beta Was this translation helpful? Give feedback.
Can you describe what you need this for? Maybe that allows for an even better recommendation.
The partitioning logic is exposed as https://pkg.go.dev/github.com/gokrazy/tools/packer#Pack.Partition (for rtr7-recovery-init, which installs gokrazy via PXE boot). That should get you most of the way there, though perhaps we need another function to conveniently work with the offsets of each partition.