-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error creating EXT4 filesystem #274
Comments
Failure appears to be here when writing the group descriptor table for superblock backup 0 (or any other). The reason is that the data for the GDT is an empty slice, i.e. 0 bytes. It should be set [here[(https://github.com/diskfs/go-diskfs/blob/master/filesystem/ext4/ext4.go#L548): g := gdt.toBytes(gdtChecksumType, sb.checksumSeed) With the descriptor table set a few lines above: gdt := groupDescriptors{} Why is there nothing in it? I do not know. I looked at the original commit and it has it, so it isn't like it got removed at some point. Is it possible the GDT never was created properly? I guess it is. I wonder if we look back on the notes we would find some "TODO" that says, "don't forget to complete creating the Group Descriptor Tables!" Interested in trying your hand at it? |
Debugging this, it seems like the go-diskfs/filesystem/ext4/ext4.go Line 541 in 31082f1
go-diskfs/filesystem/ext4/groupdescriptors.go Lines 110 to 119 in 31082f1
However, since this is empty, |
Yeah, pretty much. It needs to use correct logic to fill in the desired group descriptors. Once those are there, it should do the right thing with them. |
Yeah, I have no clue what goes into the descriptors, or what information they should be based on. I am guessing that there should be go-diskfs/filesystem/ext4/ext4.go Line 554 in 31082f1
... and that the entries will maybe be fairly formulaic based on this: go-diskfs/filesystem/ext4/ext4.go Lines 181 to 184 in 31082f1
The only place I see creating a go-diskfs/filesystem/ext4/groupdescriptors.go Line 137 in 31082f1
|
If it were a quick and easy job, I would have done it. 😃 Check out the file ext4.md, which links to much of it |
I am playing around with trying to construct an extremely simple and contrived disk with an EFI System Partition (FAT32) and a root partition (EXT4).
In the example below, I consistently see the following error:
If I change the root partition to FAT32 things work fine, but it's FAT32... 😉
Here's the full example I'm playing with:
Note that some of the values were chosen for parity with a manually crafted example I was playing with using
fdisk
and friends.The text was updated successfully, but these errors were encountered: