Skip to content

Installer shows incorrect partition sizes, cannot install due to perceived ESP partition size #620

Closed

Description

@itaiferber

What Happened?

Attempting to install elementary OS 6 fails on my 2019 MacBook Pro, seemingly due to not being able to correctly read partition sizes on the disk. Attempting to install on this machine via the default "Erase Disk and Install" option fails with a "Installing elementary OS 6 Odin failed, possibly due to a hardware error." message, and attempting a "Custom Install" does not allow me to continue.

Steps to Reproduce

  1. Boot into macOS Recovery to disable Secure Boot, booting from external partitions, etc.; delete existing partitions from disk
  2. Boot into elementary OS 6 installer and attempt to "Erase Disk and Install"
    1. Select the internal 1 TB NVME drive ("Apple SSD AP1024M, /dev/nvme0n1 1.0 TB")
    2. Choose "Don't Encrypt" when prompted (though it doesn't matter — I've tried encrypting before and the failure is the same)
    3. Hit "Could Not Install" error
      Screenshot
      I'm not sure whether the "pointer in FFI is null" error is unrelated, correlated, or causative, but the last error produced is related to ESP partition being too small
  3. Go back with "Try Installing Again", this time selecting a "Custom Install"
    1. "Modify Partitions" to create a 512 MB EFI partition, 16 GB swap partition, 64 GB root partition, and remaining home partition
      Screenshot
    2. See that installer is incorrectly picking up on partition sizes (67.1 MB for EFI, 2.1 GB for swap, 8.6 GB for root, 114.3 GB for home, 875.5 GB unused)
      Screenshot
    3. Attempt to select the partitions anyway (installation can't begin because EFI partition is too small)
      Screenshot

I've confirmed that booting into Demo Mode on the same drive shows the right partition sizes in GParted, as does booting into a GParted live USB.

Expected Behavior

  • "Erase and Install" should have succeeded at blowing away anything on disk and installing the OS
  • The partition selector should also show the same partition sizes as "Modify Partitions"

OS Version

6.x (Odin) [elementaryos-6.0-stable.20211005]

Software Version

Latest release (I have run all updates)

Log Output

I re-ran the above steps as-is (including recreating all partitions) this morning (the day after submission) and grabbed journalctl output from demo mode: journal.log

Hardware Info

This is on a 2019 MBP with a 1 TB internal drive and SIP and Secure Boot previously disabled.

Activity

  1. vjr commented on Oct 7, 2021

    @vjr
    Member

    67 MB is about 1/8th of 512 MB which leads me to believe this is an issue in the installer/distinst not recognising 4k sector sizes?

  2. itaiferber commented on Oct 8, 2021

    @itaiferber
    Author

    I re-ran the above steps this morning and added log output from journalctl to the report.

  3. itaiferber commented on Oct 8, 2021

    @itaiferber
    Author

    @vjr Interesting. I didn't make the connection, but all of the perceived sizes are about 1/8th, + some offset. I'm assuming there's likely no way for me to work around this in the meantime by somehow explicitly telling the installer about the sector size?

  4. vjr commented on Oct 8, 2021

    @vjr
    Member

    I had tried working on a PR to support sector sizes a while back but could not test. The code might have changed a but...

    Maybe if I have time this weekend I can revisit to see if I'm able to make any progress

  5. itaiferber commented on Oct 8, 2021

    @itaiferber
    Author

    @vjr Thanks! I'll keep my machine in this state for now — if you (or someone else) do have time to look into this, I'd be happy to provide any more info, or test out changes.

  6. vjr commented on Oct 8, 2021

    @vjr
    Member

    @itaiferber I've created a draft PR here: #621

    I'll try to test (I dont have a 4k disk) maybe in a VM, but you are free to try my branch if you can.

    I plan to boot an elementary 6 live ISO, install git and other tools/libraries as mentioned in the branch README notes and build and install the installer executable io.elementary.installer and try to run it.

  7. vjr commented on Oct 9, 2021

    @vjr
    Member

    @itaiferber I've been able to reproduce the problem with a qemu virtual disk with 4k sector size and also able to successfully install using these two branches:

    https://github.com/vjr/installer/tree/fix-sector-size
    https://github.com/vjr/distinst/tree/fix-sector-size

    I had to also patch the distinst tool/library from the pop-os repos to work around the issue.

    If you would try it, here are the (convoluted) steps I followed which I've typed from memory, so may not be completely accurate, you'll have to figure out any issues here:

    1. Boot the elementary OS live ISO and pick the Try Demo mode to get to the desktop.
    2. Open terminal and run the following commands:
    • sudo apt update
    • sudo apt install git elementary-sdk libgnomekbd-dev libpwquality-dev libdistinst-dev
    • sudo apt build-dep distinst
    • git clone https://github.com/vjr/installer.git
    • git clone https://github.com/vjr/distinst.git
    • cd distinst
    • git checkout fix-sector-size
    • make
    • sudo make install prefix=/usr
    • cd ../installer
    • git checkout fix-sector-size
    • meson build --prefix=/usr
    • cd build
    • ninja
    • sudo ninja install
    • sudo killall io.elementary.installer-daemon
    • sudo io.elementary.installer-daemon
    1. Now run the installer by clicking the icon in the applications menu (dont run the executable from the terminal) and choose the "custom install" flow.

    The "erase and install" option is failing, probably need to further patch for the LVM/default case, will do that later.

    Looking forward to hearing back about your results!

  8. itaiferber commented on Oct 9, 2021

    @itaiferber
    Author

    @vjr Wow, thanks for such quick turnaround on this! I'll give those instructions a shot and let you know what I get.

  9. itaiferber commented on Oct 9, 2021

    @itaiferber
    Author

    @vjr I followed your instructions, and everything appears to have compiled and installed! Issues I ran into:

    • I hadn't checked out fix-vector-size in the installer directory, so initial attempts failed because the installer still didn't show the right info
    • Installation "failed" at the very end because efibootmgr could not set up the new installation in EFI (it appears that only macOS is able to set boot partitions, which is something I'll need to figure out and work around...)

    But, I can confirm that I was able to boot up into elementary using rEFInd and am now setting up a user account. Thanks so much for the help!

  10. vjr commented on Oct 10, 2021

    @vjr
    Member

    @itaiferber so you have elementary OS installed and working on your mac now??? that's good to hear!

    i missed the step about switching to the right git branch so edited that comment and also made a mention to not run the installer from the terminal but to run it by clicking the icon in the applications menu which causes a logout and launch of the installer - which perhaps also uses the right permissions which may or may not fix the efibootmgr failure - although i have not been able to verify this myself.

    i'll continue to look into the failure i am seeing with the default "erase and install" flow (some error about not being able to create LVM partition/volume) maybe its some similar fix to the custom installation flow.

  11. itaiferber commented on Oct 10, 2021

    @itaiferber
    Author

    @vjr

    so you have elementary OS installed and working on your mac now??? that's good to hear!

    Yes! There's still a good amount of hardware support I need to figure out, but it is up and running. Thanks again 😄

    which perhaps also uses the right permissions which may or may not fix the efibootmgr failure - although i have not been able to verify this myself.

    Ah, should've been clearer about this — this isn't an elementary/installer failure. I haven't found efibootmgr to be able to write to this machine's NVRAM from any live USB or installation; the only tool I've gotten to work is macOS's own built-in bless tool. I think it's just missing hardware/firmware support, understandably.

    i'll continue to look into the failure i am seeing with the default "erase and install" flow (some error about not being able to create LVM partition/volume) maybe its some similar fix to the custom installation flow.

    For what it's worth, before managing the custom install, but with your branches, I did initially hit "Erase and Install" (just to see if it would fail in the usual way) and the installation did appear to actually begin. I didn't actually let it go through because I wanted to test the partitioning scheme, so I'm not sure whether it would have failed somewhere along the way, but at least I didn't immediately hit "Could not Install"...

  12. vjr commented on Dec 2, 2021

    @vjr
    Member

    I've now filed PR pop-os/distinst#278 to go along with the installer PR #621 if anyone wants to try them out and comment?

  13. dinered commented on Apr 6, 2022

    @dinered

    I've now filed PR pop-os/distinst#278 to go along with the installer PR #621 if anyone wants to try them out and comment?

    Hello, @vjr !
    I have Macbook and same problem.
    Trying this #620 (comment)
    but can't find fix-sector-size ...
    test@MacBookPro0934d76e:~/distinst$ git checkout fix-sector-size error: pathspec 'fix-sector-size' did not match any file(s) known to git
    I am not familiar with git at all, so could you be so kind and tell me what I am doing wrong?

  14. vjr commented on Apr 7, 2022

    @vjr
    Member

    Hello @dinered my bad I deleted the branch after my pr got merged but luckily github has a restore button!

    Can you do a git pull in your distinst folder then retry the git checkout command and see if the rest of the steps still work?

  15. dinered commented on Apr 7, 2022

    @dinered

    Dear @vjr, first of all, thank you for your blazing fast answer!
    I started with booting to Demo mode and find that space it is not enough to compile the new version.
    After this I tried installing Elementary on a second 16Gb USB flash with the same result :)
    The next one was 64Gb, I have installed Elementary (but there was no standard Installer in the system).
    I did successfully every step from your list, except last two

    1. sudo killall io.elementary.installer-daemon
      Daemon wasn't found.
    2. sudo io.elementary.installer-daemon
      The command was not ended, cursor continued blink

    Now installer starting, but doesn't show partitions at all.
    I suppose, it is necessary to have the standard installer before compiling the new one, but can't check this right now, because Elementary boot looped to installer, and I don't know how to escape :)
    Will try tomorrow, starting from scratch, if you don't tell me the easier way.

  16. 4 remaining items

  17. dinered commented on Apr 14, 2022

    @dinered

    @vjr , it was already basic ext4 partition. I have to create backup my macos partition to basic install, but i will try.

  18. dinered commented on Apr 15, 2022

    @dinered

    @vjr this is standard erase and install

    INFO: getting device at /dev/nvmeon1
    INFO: obtaining disk information from /dev/nvme0n1
    INFO: obtaining serial model from /dev/nvme0n1
    INFO: opening disk at /dev/nvmeOn1
    INFO: obtaining partition information from /dev/nvme0n1p1
    INFO: obtaining partition information from /dev/nvme0n1p2
    INFO: specifying to write new table on /dev/nvme0n1
    INFO: unmount all partitions on /dev/nvme0n1
    DEBUG: get block size for
    "/sys/class/block/nvme0n1"
    DEBUG: get block size for
    "/sys/class/block/nvme0n1"
    DEBUG: get block size for
    "/sys/class/block/nvmeOn1"
    INFO: checking if 512:67870 overlaps
    DEBUG: get block size for
    "/sys/class/block/nvme0n1"
    DEBUG: get block size for
    "/sys/class/block/nvme0n1"
    DEBUG: get block size for
    "/sys/class/block/nvme0n1"
    INFO: checking if 67871:61278831 overlaps
    DEBUG: get block size for "/sys/class/block/nvmeOn1"
    DEBUG: get block size for
    "/sys/class/block/nvmeon1"
    INFO: getting logical device named 'data_hugts'
    DEBUG: get block size for
    "/sys/class/block/data_huots"
    DEBUG: get block size for
    "/sys/class/block/data_husts"
    DEBUG: get block size for
    "/sys/class/block/data_husts"
    DEBUG: get block size for
    "/sys/class/block/data_hugts"
    DEBUG: get block size for
    "/sys/class/block/data_hugts"
    DEBUG: get block size for
    "/sys/class/block/data_hugts"
    DEBUG: get block size for
    "/sys/class/block/data_husts"
    DEBUG: get block size for "/sys/class/block/data_hugts"
    ERROR: libdistinst: pointer in FFI is null
    
  19. jerano commented on Aug 30, 2022

    @jerano

    Still an issue and can't try #620 (comment) because cannot install elementary-sdk due to unresolved dependencies - depends on libgala-dev, depends on libmutter-6-dev, depends on etc etc etc....

    Trying to install "elementary OS 6.1 Jólnir"

  20. PalGria commented on Dec 1, 2022

    @PalGria

    Just happened to me in a 12' inch retina 2015 macbook https://support.apple.com/kb/SP712

  21. adamd9 commented on Dec 19, 2022

    @adamd9

    Hey @vjr,

    Thanks for all your work on this issue! I have a 2020 MBP and this was a blocker for me trying out PopOS, I went through your original instructions, but came up against a couple of issues along the way so I thought I'd call out where I had trouble and provide updated instructions in case anybody else gives it a go.
    Basically the two issues I found were:

    • The elementary repo wasn't available on the live USB to install the sdk, so I had to add it
    • Your installer fork was way behind the current popOS master fork (and I think you forked from elementaryOS anyway) - not surprising as I'm sure you've moved onto better things! I created a new fork based on the current popOS master.
    • While it appears they have merged your changes into the distinst popOS master, the logic appears to be broken and I still go the error about the EFS volume being smaller than 256MB. To get around this I just forked the latest master and removed this check completely (lazy I know, but I just wanted to get it working).

    In the end, here's what my steps looked like to get things going (with links to my updated forks):

    • sudo add-apt-repository ppa:elementary-os/daily
    • sudo apt update
    • sudo apt install git elementary-sdk libgnomekbd-dev libpwquality-dev libdistinst-dev
    • sudo apt build-dep distinst
    • git clone https://github.com/adamd9/installer.git
    • git clone https://github.com/adamd9/distinst.git
    • cd distinst
    • make
    • sudo make install prefix=/usr
    • cd ../installer
    • git checkout sector-size-fix
    • meson build --prefix=/usr
    • cd build
    • ninja
    • sudo ninja install
    • sudo killall io.elementary.installer-daemon
    • sudo io.elementary.installer-daemon &

    Per other earlier comments, the eftbootbgr fails to update at the end, but it doesn't really matter and you can still boot it (in the case of my Macbook Pro, by holding down the option key on restart and selecting "EFI manager" rather than the Mac startup disk

    Hope that helps someone!

  22. vjr commented on Dec 19, 2022

    @vjr
    Member

    @adamd9 this is good stuff, thanks for the updates!

  23. AdityaGarg8 commented on Dec 26, 2022

    @AdityaGarg8
    • Installation "failed" at the very end because efibootmgr could not set up the new installation in EFI (it appears that only macOS is able to set boot partitions, which is something I'll need to figure out and work around...)

    But, I can confirm that I was able to boot up into elementary using rEFInd and am now setting up a user account. Thanks so much for the help!

    If you boot the ISO with efi=noruntime, the issue should be fixed.

    This bug although has been fixed in newer kernels and Linux can now set boot partitions.

  24. onefieryfern commented on Mar 6, 2023

    @onefieryfern

    Hey @vjr,

    Thanks for all your work on this issue! I have a 2020 MBP and this was a blocker for me trying out PopOS, I went through your original instructions, but came up against a couple of issues along the way so I thought I'd call out where I had trouble and provide updated instructions in case anybody else gives it a go. Basically the two issues I found were:

    * The elementary repo wasn't available on the live USB to install the sdk, so I had to add it
    
    * Your **installer** fork was way behind the current popOS master fork (and I think you forked from elementaryOS anyway) - not surprising as I'm sure you've moved onto better things! I created a new fork based on the current popOS master.
    
    * While it appears they have merged your changes into the **distinst** popOS master, the logic appears to be broken and I still go the error about the EFS volume being smaller than 256MB. To get around this I just forked the latest master and removed this check completely (lazy I know, but I just wanted to get it working).
    

    In the end, here's what my steps looked like to get things going (with links to my updated forks):

    * sudo add-apt-repository ppa:elementary-os/daily
    
    * sudo apt update
    
    * sudo apt install git elementary-sdk libgnomekbd-dev libpwquality-dev libdistinst-dev
    
    * sudo apt build-dep distinst
    
    * git clone https://github.com/adamd9/installer.git
    
    * git clone https://github.com/adamd9/distinst.git
    
    * cd distinst
    
    * make
    
    * sudo make install prefix=/usr
    
    * cd ../installer
    
    * git checkout sector-size-fix
    
    * meson build --prefix=/usr
    
    * cd build
    
    * ninja
    
    * sudo ninja install
    
    * sudo killall io.elementary.installer-daemon
    
    * sudo io.elementary.installer-daemon &
    

    Per other earlier comments, the eftbootbgr fails to update at the end, but it doesn't really matter and you can still boot it (in the case of my Macbook Pro, by holding down the option key on restart and selecting "EFI manager" rather than the Mac startup disk

    Hope that helps someone!

    Hello there! I recently attempted to install Pop!_OS and had to use your guide to fix the installer, and I'd like to leave the list of commands which worked for me here, which is a bit different from yours.

    • sudo add-apt-repository ppa:elementary-os/daily
    • sudo apt update
    • sudo apt install git elementary-sdk libgnomekbd-dev libpwquality-dev libdistinst-dev
    • sudo apt build-dep distinst
    • git clone https://github.com/adamd9/installer.git
    • git clone https://github.com/adamd9/distinst.git
    • cd distinst
    • git checkout sector-size-fix
    • make
    • sudo make install prefix=/usr
    • cd ../installer
    • git checkout sector-size-fix
    • meson build --prefix=/usr
    • cd build
    • ninja
    • sudo ninja install
    • sudo killall io.elementary.installer-daemon
    • sudo io.elementary.installer &
  25. derzahla commented on May 21, 2023

    @derzahla

    This is STILL a problem with the latest image nearly 2 years later? I take it elementaryOS project is dead..?

  26. vasc0x commented on May 11, 2025

    @vasc0x

    I found a workaround: do a custom install, make the first partition the efi partition, but don't use it, leave it unchecked. Only select the remaining partitions for/, /home, swap, etc.

  27. added theissue type on Jun 30, 2025
  28. DamianAntonowicz commented on Oct 4, 2025

    @DamianAntonowicz

    During installation I was receiving warning that EFI partition is too small. I continued with installation, but process has failed eventually.

    Finally I ended with following partition sizes, which allowed me to install and run elementary OS on my Mac Mini (late 2014):

    Image

  29. odoublewen commented on Jun 4, 2026

    @odoublewen

    Also having this same issue, on an early 2015 MacBook A1534. I made a comment in this other issue, which to me seems like a duplicate or at least highly related: #602 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions