-
Notifications
You must be signed in to change notification settings - Fork 660
[Ubuntu on M1] Lima VM will not start (EFI stub: ERROR: FIRMWARE BUG: kernel image not aligned on 64k boundary
)
#712
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
Comments
kex_exchange_identification: read: Connection reset by peer\r\nConnection reset by 127.0.0.1 port 52070\r\n
)
Do you see any error in ~/.lima/test/serial.log ? |
I am only seeing is:
Here is full log: |
kex_exchange_identification: read: Connection reset by peer\r\nConnection reset by 127.0.0.1 port 52070\r\n
)EFI stub: ERROR: FIRMWARE BUG: kernel image not aligned on 64k boundary
)
Could you provide Lima version, QEMU version, and |
Both are installed from brew:
|
Thanks
|
For the clear Ubuntu test, I have used default settings. Still, it is not working:
Fedora seems working:
|
This might be a regression in https://cloud-images.ubuntu.com/impish/20220309/ ? |
EFI stub: ERROR: FIRMWARE BUG: kernel image not aligned on 64k boundary
)EFI stub: ERROR: FIRMWARE BUG: kernel image not aligned on 64k boundary
)
Here is lima.yaml.txt with https://cloud-images.ubuntu.com/impish/20220201/. It is working! |
I have the same error as mateka but
My Thanks in advance |
I'm facing exactly the same issue, and fixed by using Additional Experiments:
Note: focal = Ubuntu 20.04 LTS The diff
Then we obtain: manifest.diff--- focal-server-cloudimg-arm64.manifest.20220307 2022-03-11 04:49:32.000000000 +0900
+++ focal-server-cloudimg-arm64.manifest.20220308 2022-03-11 04:49:34.000000000 +0900
@@ -364,14 +364,14 @@
libyaml-0-2:arm64 0.2.2-1
libzstd1:arm64 1.4.4+dfsg-3ubuntu0.1
linux-base 4.5ubuntu3.7
-linux-headers-5.4.0-100 5.4.0-100.113
-linux-headers-5.4.0-100-generic 5.4.0-100.113
-linux-headers-generic 5.4.0.100.104
-linux-headers-virtual 5.4.0.100.104
-linux-image-5.4.0-100-generic 5.4.0-100.113
-linux-image-virtual 5.4.0.100.104
-linux-modules-5.4.0-100-generic 5.4.0-100.113
-linux-virtual 5.4.0.100.104
+linux-headers-5.4.0-104 5.4.0-104.118
+linux-headers-5.4.0-104-generic 5.4.0-104.118
+linux-headers-generic 5.4.0.104.108
+linux-headers-virtual 5.4.0.104.108
+linux-image-5.4.0-104-generic 5.4.0-104.118
+linux-image-virtual 5.4.0.104.108
+linux-modules-5.4.0-104-generic 5.4.0-104.118
+linux-virtual 5.4.0.104.108
locales 2.31-0ubuntu9.7
login 1:4.8.1-1ubuntu5.20.04.1
logrotate 3.14.0-4ubuntu3
@@ -509,7 +509,7 @@
python3.8 3.8.10-0ubuntu1~20.04.2
python3.8-minimal 3.8.10-0ubuntu1~20.04.2
readline-common 8.0-4
-rsync 3.1.3-8ubuntu0.1
+rsync 3.1.3-8ubuntu0.2
rsyslog 8.2001.0-1ubuntu1.1
run-one 1.17-0ubuntu1
screen 4.8.0-1ubuntu0.1 You will find that the Linux kernel has been updated from @huysal Maybe we should remove ( |
@mateka @huysal @fuzmish Thank you for testing and analysis. Obviously, this is a regression on Ubuntu side. Reported to https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1947046 |
Released v0.9.0: https://github.com/lima-vm/lima/releases/tag/v0.9.0 This release uses https://cloud-images.ubuntu.com/releases/21.10/release-20220201 by default, and print a warning message to recommend |
Is there a way to reuse VM broken by |
|
Great! Now it shows a login prompt. Is there a default login? |
No, please use |
Ok. Now it works! Thank You very much! |
I'm facing exactly the same issue, there are some important projects files in this VM, and no backup anywhere else, so I could not rm this VM. And with output qemu display to cocoa and try to enter GRUB way, I am also failed. Keeping press ESC will lead me into UEFI menu. After I press continue inside UEFI menu, and then keeping press ESC, I could not enter GRUB menu ... Just get 4 EFI related information, including "EFI stub: ERROR: FIRMWARE BUG: kernel image not alligned on 64k boundary", and stuck there ... Did I do anything wrong in enterring GRUB menu? Thanks for any help. Update, thanks to response from @mateka, I have tried many times more, but still could not enter GRUB menu, and here is my workaround to save today's work: Idea
Implementation
|
I have restarted VM multiple times before configuring GRUB. Once it was stuck and was not accepting Esc. Other times it has not needed Esc to go into the GRUB menu. |
Can anybody confirm that this patch works with https://cloud-images.ubuntu.com/releases/21.10/release-20220309/ ? AkihiroSuda/homebrew-core@177d583 (Download |
@AkihiroSuda I have tested several Ubuntu image-based VMs with patched QEMU installed with qemu.rb. The results are summarized in the table below:
This patch seems to be working fine. verbose logs*1: $ brew info qemu $ qemu-system-aarch64 --version $ brew uninstall --ignore-dependencies qemu $ brew info qemu $ qemu-system-aarch64 --version $ limactl start ./docker-impish-20220309.yaml |
Thank you @fuzmish , opened PR Homebrew/homebrew-core#96743 |
Update (Mar 14, 2022)
|
Uh oh!
There was an error while loading. Please reload this page.
EDIT by @AkihiroSuda
Update (Mar 14, 2022)
Run
brew upgrade
to upgrade QEMU.Intel macOS users are NOT affected by this issue.
For the further information, see #734 and Homebrew/homebrew-core#96743 .
Old information
Ubuntu kernel 5.13.0-35.40 (5.4.0-103.117 for 20.04 LTS) released in March 2022 is not bootable on ARM hosts:
Until the issue gets resolved, it is HIGHLY RECOMMENDED to run the following command inside the Ubuntu shell to avoid upgrading the kernel:
sudo apt-mark hold linux-image-$(uname -r)
(Make sure to unhold it when we get the fix)
If your kernel was already upgraded and the VM does not boot, try running Lima with the following environment variable to show the video display:
After the display is shown, press the Esc key several times to show the GRUB prompt for choosing an older kernel.
You can also mount the disk image from another instance to modify the GRUB config or rescue the data inside the image.
#712 (comment)
See also https://gitlab.com/qemu-project/qemu/-/issues/899
🙏 Help wanted for testing
This QEMU patch may fix the issue: AkihiroSuda/homebrew-core@177d583
(from https://gitlab.com/qemu-project/qemu/-/issues/899)
Download
qemu.rb
and runbrew install --build-from-source ./qemu.rb
to apply the patch.Below is the original post by @mateka
Description
Today I was working in lima VM (Ubuntu 20.04; Mac M1). After a while, it has lost connection (as it often does), so I had tried to restart it. Old VM and even brand new will not start and return an error after:
limactl --debug start VM-name
prints:Rancher Desktop seems to work.
The text was updated successfully, but these errors were encountered: