-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[SOLVED] [Generic x86-64] Same physical SSD imaged with 7.4 can boot if connected via external USB but not from internal SATA #1760
[SOLVED] [Generic x86-64] Same physical SSD imaged with 7.4 can boot if connected via external USB but not from internal SATA #1760
Comments
Hm, that is weird. If a BIOS is able to read a GPT via USB 3.0, it really should be able to also read it via S-ATA. Here some things I would check:
|
Found another user having my very same problem: https://community.home-assistant.io/t/can-boot-from-ssd-hdd-via-usb-but-not-internal-sata-on-x86-laptop/366600/5 |
Oh ok, so the system is able to read the GPT and load the boot loader from the disk. The problem is that the bootloader (which is part of Home Assistant OS) then has troubles to load the kernel, it seems. The culprit are those two messages:
Not sure what causes this, it could be still a BIOS setting or just a bug in barebox. Can you maybe try disabling CSM/legacy mode? HAOS should boot in pure UEFI mode. I am actually considering switching to Grub for all UEFI platforms, which likely would help solve this. |
It depends. From the external USB thumbdrive, that is what I see. But if I use the SSD via SATA, the BIOS doesn't even see it as a disk with a UEFI partition. The only way I found working is to plug the SSD via USB (with a SATA-to-USB converter).
If I disable it, I don't see the SSD anymore (not even as a legacy drive).
Anything else I could try? |
Oh I see that log/screenshot was with a USB thumbdrive.
Do other operating system using UEFI/GPT work on that machine? Is it maybe that S-ATA drive which cannot talk with that controller (properly) somehow?
Hm, that could be the root of the problem. I am pretty sure that CSM off should really work with GPT and Barebox. |
I've ordered a new USB3 thumbdrive and I'll do more tests today, to rule out the possibility that this may be due to a bad memory.
I used this procedure to create a bootable USB3 thumbdrive containing the Win10x64 installer. I installed it onto the SSD connected via the internal S-ATA, and at boot this was properly recognized as UEFI by the BIOS. I also installed the latest Debian 11 using a similar method, using the installer's default settings.
Yes, I feel this has to do with it, but the fact that Win10 and Debian 11 were able to boot...confuses me. |
Hm, our partition table isn't really anything special, its being created with
|
Updated with a video clip. @agners I've just flashed a brand-new USB3 stick with HAOS Generic x86-64 7.4. The USB drive is correctly recognized as having a valid UEFI entry. If I let it boot, I see a white screen with If I use the arrow keys to choose
|
Awesome news @agners Since I was able to boot the SSD only via USB, I've always (wrongly) assumed that booting from USB was the most stable and reliable way. Now I learn it's the opposite 🤭 I'll stay tuned here and will test immediately as the build is ready. |
@agners I just noticed your latest 2 commits: they should have been part of the latest dev build, right? https://os-builds.home-assistant.io/8.0.dev20220224/haos_generic-x86-64-8.0.dev20220224.img.xz |
Yes, the latest dev build should now include GRUB as boot loader. |
@agners I tried this morning with https://os-builds.home-assistant.io/8.0.dev20220224/ but I think I'm gonna wait for https://os-builds.home-assistant.io/8.0.dev20220225, because yesterday's built still had Barebox. |
No, 8.0.dev20220224.img.xz already has Grub 2 as boot loader. |
Still nothing. The SSD isn't recognized as UEFI. I suspect it's the BIOS' fault, but I wonder how other UEFI OSs manage to boot. Is there any other UEFI OS image (Linux based, hopefully) that is not HA OS, which I can use to flash the SSD and see how it behaves? |
Gentle bump @agners :-) |
Same issue here, trying to run on an ATIV Book 6 670Z5E-XD1 which supports UEFI boot. |
@luciotorelli have you tried with a dev build? |
Yes, I tried on 8.0.dev20220224.img.xz linked above as well as the production one. All sorts of combination as possible from Bios xD. The same machine already ran Linux, Debian, ChromeOS, Windows 7, 10 and 11 at some point so I am nearly certain it isn't the machine. I will try with dev20220225 and report here. |
@luciotorelli I also tried Debian and Windows 10, but I can't be certain the installer used pure UEFI or some UEFI+legacy fallback trick to maximize compatibility. Are you aware of a minimal working OS that uses pure UEFI? That would be a good test case. This doesn't mean that HA OS shouldn't use the same legacy fallback tricks to broaden its compatibility. At the end of the day, it's still a (stripped) Linux distro. |
I have the exact same problem. I use a 250 Gb m2 sata SSD in an m2-->sata converter, attached to sata port no. 1. If I use a USB stick with ubuntu, I can boot the machine with UEFI just fine, and I can also see the SSD. (Also, ubuntu recognizes the SSD as an EFI bootable OS disk). I tried to flash HAOS 7.5 image to the SSD with another machine running WIN 10 and using a USB-m2sata adapter, same result. At the end, I ran a boot-repair utility from the ubuntu live system to dump boot info os the disks. The printed result looks fine for me, but maybe somebody else can find something interesting in it: |
I fixed the issue by running a live linux distro, mounting part 1 of the haos disk and added a EFI entry:
|
@agners I confirm that @christoph00 fixes the issue. I guess that this could be added to the docs and/or in the builder. |
Hm, those are interesting findings. This means that this UEFI BIOS behaves differently depending on media type (removable e.g. USB drive vs. internal disk). Most systems just boot from a file Regular Linux distribution have an installer which creates the EFI entry at installation time. We don't have such a installer (yet). This issue we can only really resolve if we have an installer of some kind 😟 |
Hm, it seems that Barebox (used in OS 7.x and before) uses |
There is some related discussion in this Ubuntu issue: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1366546 It seems that mostly older systems affected, presumably newer systems use a UEFI bios which read from /EFI/BOOT also on internal disks. |
… the EFI entry correctly Fixes home-assistant/operating-system#1760
… the EFI entry correctly Fixes home-assistant/operating-system#1760
I still have this problem on my Futro S920. I've managed to make a workaround, by booting a Linux USB stick, starting grub. Then set root to (hd0,gpt1). Next typing chainloader /EFI/BOOT/bootx64.efi. Then typing boot. |
Hello all, I have the same issue. I bought a Fujitu S740 thin client and I'd like to install HAOS on the inner SSD (16GB). Thanks a lot for reading this message |
@Calimerorulez |
I am in the same spot as @Atti992 . |
@Atti992 @smith113311 did you execute the commands mentioned in the Note at https://www.home-assistant.io/installation/generic-x86-64#start-up-your-generic-x86-64? |
I did, but did not succeed. |
@NCO3 |
I could not solved it. If the SSD mounted to the USB -Sata adapter... it working normally, but if I put back to the original place inside the PC the bios can not find any bootable media.... |
OMG! Thank you very much!! This solved my problem with Fujitsu Q920! |
Please, how do I do this? Where to enter that command "sudo efibootmgr -c -l /EFI/BOOT/BOOTx64.EFI -L HomeAssistant"? |
Yes, prepare a bootable device (e.g. USB Stick) with the gparted live image and boot from it. Then open a terminal and execute the command. The trick is that the gparted live image has the efibootmgr included. gparted itself isn't used. I just downloaded the iso image from https://gparted.org/download.php and installe it tu the stick with rufus https://rufus.ie/de/ |
thanks, but |
thank you, now everything works |
Thanks, this worked for me on the Lenovo M82e. I already had a USB key with Ubuntu 22.04 lying around, which supports Live Boot (no install of ubuntu necessary) and it already comes with efibootmgr. Didn't have to mount my main drive or anything, just ran that efibootmgr command in terminal. Then I removed the USB key, rebooted, and HA boots without issue now |
Hi, I'm probably very thick. But I managed to flash USB with gdparted, I have small success that for the first time booted Home Assistant from SSD drive by using gdparted and selecting operating system. But how to make it to boot that as default. I can't use command sudo because it doesn't recognise the command? |
hi, having the same probs with my ESPRIMO Q920, the internal SSD w. HASSOS doesn't boot up, connected to usb it works fine, SATA none. Tried it with ubuntu AND gparted to solve it with efibootmgr with .../bootx64,efi AND .../BOOTx64.EFI none of the trials made the SSD boot. how shall I proceed??? usb-connection is not an option... maybe someone may help me out??!! regs Mike |
Hey Kes, I was having the same issue using the code they provided here (although I see some people were successful). I reset my SD bootable card and the hard driver, I followed this YouTube video. After HA was installed and I couldn't boot, I created a USB stick with Gparted as DonKracho mentioned. Logged in > when asked to login, exit or use command, I selected use command (2). but instead of issuing the code mentioned here, I used the command on the home assistant generic documentation:
After months trying I was finally able to make my old Laptop HA. Wish you best of luck! |
Hi All, |
to make a long story short: the problem was, that you have to boot the usb-stick in uefi mode, if not the changes on the boot partition wil not be made. so if you start the esprimo q920 with F12 into the boot selection menue you have to make shure, that the sitck shows up with an UEFI: remark in the list. choosing this option and executing the given efibootmgr cmdline wil result in a bootable internal SSD. maybe it helps for future installers... ;-) Regs K-E |
I'm trying to do this with GParted, but I'm just getting "EFI varibles are not supported on this system" when trying to run the commands in terminal. Any ideas? |
YES, thats worked also on my Fujitsu ESPRIMO Q956 (BIOS was updated to V.5.0.0.11 – R1.33.0 (27.01.2023) ) |
@DonKracho |
Describe the issue you are experiencing
I verified with multiple experiments that if I image an SSD with HA OS 7.4 (also tried 8.0-dev and 6.6) and connect it via the SATA port, the disk seems not imaged in a way that the BIOS recognizes its UEFI partition. So, it doesn't boot: in the best case I see a black screen.
It can boot if I disconnect the SSD from the SATA slot and connect it to the external USB3 port: in that case, the BIOS sees its UEFI partition correctly.
After a long discussion (and support: thanks folks!) in the #installation Discord channel, I decided to file an issue.
What operating system image do you use?
generic-x86-64 (Generic UEFI capable x86-64 systems)
What version of Home Assistant Operating System is installed?
7.4, 8.0-dev, 6.6
Did you upgrade the Operating System.
No
Steps to reproduce the issue
Anything in the Supervisor logs that might be useful for us?
Anything in the Host logs that might be useful for us?
System Health information
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: