Skip to content

Handle disk sector size#266

Merged
jackpot51 merged 2 commits intopop-os:masterfrom
vjr:fix-sector-size
Oct 23, 2021
Merged

Handle disk sector size#266
jackpot51 merged 2 commits intopop-os:masterfrom
vjr:fix-sector-size

Conversation

@vjr
Copy link
Copy Markdown
Contributor

@vjr vjr commented Oct 9, 2021

@jackpot51 jackpot51 requested a review from a team October 9, 2021 22:10
@jackpot51 jackpot51 marked this pull request as ready for review October 22, 2021 15:06
@13r0ck
Copy link
Copy Markdown
Contributor

13r0ck commented Oct 22, 2021

Tested and there are no regressions in 20.04 nor 21.04 nor 21.10.

I was unable to reproduce the issue like @vjr did here, I couldn't figure out how to make a virtual disk with a sector size of 4096. Anyway, no new issues in this PR.

Copy link
Copy Markdown
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved per Brock's testing

@vjr
Copy link
Copy Markdown
Contributor Author

vjr commented Oct 23, 2021

Folks, thanks for reviewing this PR. If you would, please go ahead and merge and I'll move the elementary PR out of draft state.

I can post the qemu commands and options that I am using to reproduce and test later today when I'm back at my computer.

Just FYI I'm less than a novice at Rust and have been trying to more fully fix 4k sector support and will open a new draft PR for your comments if I can make progress, or if one of you would more easily accomplish this and be able to test in qemu that would be great too.

Thanks!

@vjr
Copy link
Copy Markdown
Contributor Author

vjr commented Oct 23, 2021

Here is the command I used to launch the elementary OS live ISO and test the installer, after creating a raw format qemu disk image with qemu-img create -f raw odin.raw 20G :

qemu-system-x86_64 -machine q35,accel=kvm -m 16384 -smp 8 -cpu host -boot d -cdrom /home/vishal/Downloads/elementaryos-6.0-stable.20211005.iso -drive file=/home/vishal/Documents/QEMU/odin.raw,format=raw,id=odin,if=none -device virtio-scsi,id=scsi -device scsi-hd,bus=scsi.0,drive=odin,logical_block_size=4096,physical_block_size=4096 -bios /usr/share/qemu/OVMF.fd

I just installed the gnome-boxes deb package from the ubuntu archives which got me the required QEMU, KVM and OVMF bits.

After running the installer IIRC I just changed the -boot d option to -boot c to reboot into the installed system to see if it really worked.

Of course, you could modify the qemu command params based on the docs for your own testing of distinst in case you're doing it with a PopOS build.

@jackpot51 jackpot51 merged commit 404fc73 into pop-os:master Oct 23, 2021
@vjr vjr deleted the fix-sector-size branch October 24, 2021 11:26
@13r0ck 13r0ck mentioned this pull request Dec 2, 2021
@vjr vjr restored the fix-sector-size branch April 7, 2022 04:21
@AKmatiAK
Copy link
Copy Markdown

Doesn't work on 22.04 installer, partition sizes are calculated 8 times smaller on my 4Kn drive

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.

5 participants