Fix issues with documentation, add control server setup script and automatically create baas partition#49
Open
ValentijnvdBeek wants to merge 11 commits into
Open
Fix issues with documentation, add control server setup script and automatically create baas partition#49ValentijnvdBeek wants to merge 11 commits into
ValentijnvdBeek wants to merge 11 commits into
Conversation
There is a bug in the go-diskfs library that makes it impossible
to create EXT4 partitions. It might be nicer to switch to this on
the long term. The code snippet for that is:
```go
log.Warn("Create new machine partition and disk label")
theDisk, err := diskfs.Open(image.DeviceFile[:len(image.DeviceFile)-1],
diskfs.WithOpenMode(diskfs.ReadWrite))
if err != nil {
log.Fatalf("Failed to open disk: %v", err)
}
// Create a GPT table with one partition to store the meta data for BAAS
table := &gpt.Table{
LogicalSectorSize: 512,
PhysicalSectorSize: 512,
ProtectiveMBR: false,
Partitions: []*gpt.Partition{
{
Type: gpt.LinuxFilesystem,
Start: 2 * 1024 * 1024, // 2MB
Size: 20 * 1024 * 1024, // 20MB
Name: "BAASPartition",
},
},
}
err = theDisk.Partition(table)
if err != nil {
log.Fatalf("Failed to create partition: %v", err)
}
_, err = theDisk.CreateFilesystem(disk.FilesystemSpec{
Partition: 1,
FSType: filesystem.TypeExt4,
VolumeLabel: "BAAS-fs",
})
if err != nil {
log.Fatalf("Failed to create filesystem: %v", err)
}
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A collection of fixes for 2025.
hostnamecall with the standardip