pavel-demin / red-pitaya-notes

Notes on the Red Pitaya Open Source Instrument
http://pavel-demin.github.io/red-pitaya-notes/
MIT License
337 stars 209 forks source link

debian.sh partition alignment #474

Closed strobo5 closed 7 years ago

strobo5 commented 7 years ago

Hi,

I noticed the scripts to create debian images create unaligned partitions because in GNU Parted, 1MB means 1000*1000 bytes but we want 1MiB = 1024*1024 bytes. Partition 1 now starts at sector 7812.

-parted -s $device mkpart primary fat16 4MB 32MB -parted -s $device mkpart primary ext4 32MB 100% +parted -s $device mkpart primary fat16 4MiB 32MiB +parted -s $device mkpart primary ext4 32MiB 100%

pavel-demin commented 7 years ago

Thanks for spotting this problem. I've replaced MB with MiB in all the scripts: https://github.com/pavel-demin/red-pitaya-notes/commit/a42f0766caad3d3a145ebf74b797c22480860699.