Skip to content
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

Support USB booting #1575

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Conversation

tjhorner
Copy link
Contributor

@tjhorner tjhorner commented Oct 6, 2021

USB drives are mounted as /dev/usbdiskXX, so I changed the glob to match. I don't know if this still matches normal drives, and I don't really have the ability to test that.

@homeassistant
Copy link

Hi @tjhorner,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@agners agners added board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) run-dev-build Execute development build on a PR labels Oct 7, 2021
@agners agners temporarily deployed to dev_build October 7, 2021 08:08 Inactive
@agners
Copy link
Member

agners commented Oct 7, 2021

I don't know if this still matches normal drives, and I don't really have the ability to test that.

I triggered a development build with this change, I can try it on a Intel NUC booting from a S-ATA drive. I assume you tested USB boot then?

Copy link
Member

@agners agners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to boot fine on my Intel NUC booting from a S-ATA hard drive.

@tjhorner
Copy link
Contributor Author

tjhorner commented Oct 7, 2021

Yep, USB boot works. I tested it by running the commands manually in the boot shell. I'll try copying the boot partition from the dev build over to my NUC to see if it works too.

As I was falling asleep last night, I thought of something: why not just make the glob /dev/*.hassos-kernel0? That way anything with the label will get mounted, not just anything considered a "disk".

@agners
Copy link
Member

agners commented Oct 7, 2021

why not just make the glob /dev/*.hassos-kernel0? That way anything with the label will get mounted, not just anything considered a "disk".

What else would be able to store hassos-kernel0 then a disk? 🤷‍♂️

Let's tackle that when there is an use case.

@agners agners merged commit f012f09 into home-assistant:dev Oct 7, 2021
@tjhorner tjhorner deleted the support-usb-booting branch October 7, 2021 22:37
@tjhorner
Copy link
Contributor Author

tjhorner commented Oct 7, 2021

Well, sure, a physical disk is the only thing that could store it, but I'm mostly wondering what other identifiers (besides "usbdisk" and "disk") barebox can store at /dev. I looked through the docs but couldn't find anything useful. Basically, as a user, I expect anything that Barebox can detect should be able to boot into Home Assistant OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) cla-signed run-dev-build Execute development build on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants