Skip to content
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

Fix for devices with a non-512-byte sector size #181

Closed
wants to merge 1 commit into from
Closed

Conversation

mmstick
Copy link
Member

@mmstick mmstick commented Apr 23, 2019

This will require testing with disks with non-512 byte sector sizes. I don't think we sell any of these.
There will be an accompanying installer PR to test this within a few minutes.

Closes #177

@jackpot51
Copy link
Member

Is it possible to emulate a 4096 byte sector device, in QEMU for example?

@mmstick
Copy link
Member Author

mmstick commented Apr 23, 2019

That does seem to be possible. After creating a VM with virt-manager, and changing the disk from IDE to VirtIO, then opening the VM XML config for editing with virsh edit ${vm_name}, adding <blockio logical_block_size='4096' physical_block_size='4096'/> to the <disk> section will set the disk to emulate 4K logical sector sizes.

@jackpot51
Copy link
Member

Ok, please get @brs17 up and going with that setup

@brs17 brs17 requested review from brs17 and jackpot51 April 24, 2019 15:31
@mmstick
Copy link
Member Author

mmstick commented Apr 24, 2019

Found some issues. Will notify when this is ready for testing.

@mmstick mmstick changed the title Fix for devices with a non-512-byte sector size WIP: Fix for devices with a non-512-byte sector size Apr 24, 2019
@mmstick
Copy link
Member Author

mmstick commented Apr 24, 2019

It seems to be working with 512 and 4096 byte logical block sizes. The installs succeed and the partitions report the correct sizes during configuration and after install. However, I have yet to figure out how to get the VM to boot from a 4096-sized VirtIO device. The EFI doesn't seem to be detecting systemd-boot.

@mmstick mmstick changed the title WIP: Fix for devices with a non-512-byte sector size Fix for devices with a non-512-byte sector size Apr 24, 2019
@mmstick mmstick force-pushed the master branch 2 times, most recently from a7bd5d6 to 8862eae Compare February 20, 2020 18:18
@mmstick mmstick closed this Jul 16, 2020
@mmstick mmstick deleted the sector-size branch July 16, 2020 19:35
@vjr vjr mentioned this pull request Dec 1, 2021
@vjr
Copy link
Contributor

vjr commented Dec 2, 2021

@mmstick what was the reason this PR was closed without review/merge? I've mostly taken this code into my PR #278 which I've marked ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix any assumptions about sector sizes always being 512 bytes
3 participants