You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Installer shows incorrect partition sizes, cannot install due to perceived ESP partition size #620
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
Boot into macOS Recovery to disable Secure Boot, booting from external partitions, etc.; delete existing partitions from disk
Boot into elementary OS 6 installer and attempt to "Erase Disk and Install"
Choose "Don't Encrypt" when prompted (though it doesn't matter — I've tried encrypting before and the failure is the same)
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
Go back with "Try Installing Again", this time selecting a "Custom Install"
"Modify Partitions" to create a 512 MB EFI partition, 16 GB swap partition, 64 GB root partition, and remaining home partition
Screenshot
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
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.
@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?
@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.
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.
@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:
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:
Boot the elementary OS live ISO and pick the Try Demo mode to get to the desktop.
@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!
@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.
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"...
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?
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
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.
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
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....
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):
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
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.
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):
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.
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.
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)
Activity
vjr commentedon Oct 7, 2021
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?
itaiferber commentedon Oct 8, 2021
I re-ran the above steps this morning and added log output from
journalctlto the report.itaiferber commentedon Oct 8, 2021
@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?
vjr commentedon Oct 8, 2021
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
itaiferber commentedon Oct 8, 2021
@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.
vjr commentedon Oct 8, 2021
@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.
vjr commentedon Oct 9, 2021
@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:
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!
itaiferber commentedon Oct 9, 2021
@vjr Wow, thanks for such quick turnaround on this! I'll give those instructions a shot and let you know what I get.
itaiferber commentedon Oct 9, 2021
@vjr I followed your instructions, and everything appears to have compiled and installed! Issues I ran into:
fix-vector-sizein theinstallerdirectory, so initial attempts failed because the installer still didn't show the right infoefibootmgrcould 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!
vjr commentedon Oct 10, 2021
@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.
itaiferber commentedon Oct 10, 2021
@vjr
Yes! There's still a good amount of hardware support I need to figure out, but it is up and running. Thanks again 😄
Ah, should've been clearer about this — this isn't an elementary/installer failure. I haven't found
efibootmgrto 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-inblesstool. I think it's just missing hardware/firmware support, understandably.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"...
vjr commentedon Dec 2, 2021
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?
dinered commentedon Apr 6, 2022
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 gitI am not familiar with git at all, so could you be so kind and tell me what I am doing wrong?
vjr commentedon Apr 7, 2022
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 pullin your distinst folder then retry the git checkout command and see if the rest of the steps still work?dinered commentedon Apr 7, 2022
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
Daemon wasn't found.
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.
4 remaining items
dinered commentedon Apr 14, 2022
@vjr , it was already basic ext4 partition. I have to create backup my macos partition to basic install, but i will try.
dinered commentedon Apr 15, 2022
@vjr this is standard erase and install
jerano commentedon Aug 30, 2022
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"
PalGria commentedon Dec 1, 2022
Just happened to me in a 12' inch retina 2015 macbook https://support.apple.com/kb/SP712
adamd9 commentedon Dec 19, 2022
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:
In the end, here's what my steps looked like to get things going (with links to my updated forks):
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!
vjr commentedon Dec 19, 2022
@adamd9 this is good stuff, thanks for the updates!
AdityaGarg8 commentedon Dec 26, 2022
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.
onefieryfern commentedon Mar 6, 2023
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.
derzahla commentedon May 21, 2023
This is STILL a problem with the latest image nearly 2 years later? I take it elementaryOS project is dead..?
vasc0x commentedon May 11, 2025
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.
DamianAntonowicz commentedon Oct 4, 2025
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):
odoublewen commentedon Jun 4, 2026
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)