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

Allow Legacy Boot #8

Open
elibosley opened this issue Feb 9, 2024 · 6 comments
Open

Allow Legacy Boot #8

elibosley opened this issue Feb 9, 2024 · 6 comments

Comments

@elibosley
Copy link
Member

This may not be possible w/ the Raspberry PI Creator, but if it is possible, add an option in the settings menu for this called "Enable Legacy Boot"

If Legacy Boot is selected, rename "EFI" to "EFI-" (depending on the version of Unraid, this may already be done) and run the make_bootable.bat|make_bootable_linux|make_bootable_mac script

@elibosley elibosley converted this from a draft issue Feb 9, 2024
@jlre249
Copy link
Collaborator

jlre249 commented Apr 5, 2024

just to make sure i understand - it looks like, in the current usb creator, there is a checkbox called "allow uefi boot", and if that checkbox is checked, we rename "EFI-" to "EFI". but it sounds like, in conjunction with #7, we want to default to UEFI boot, and only keep "EFI-" if this new legacy boot checkbox is checked. does that sound right?

@elibosley
Copy link
Member Author

Not quite.

On new Releases of Unraid the folder EFI- is named EFI by default, so we'd want to keep that folder unless the "Allow Legacy Boot" is checked.

Here are the rules:

  1. legacy boot unchecked (default)
    a. if EFI exists on Zip file, do nothing
    b. if -EFI exists on Zip file, rename to EFI

  2. legacy boot checked
    a. If EFI exists on Zip file, rename to -EFI
    b. if -EFI exists, do not change it
    c. ensure raspberry pi can create a legacy bootable drive in the first place, as it requires some weird partition trickery
    d. Run make bootable script after flashing (as in description above)

We also need to make sure that the raspberry pi formatter even formats properly for legacy boot, I'm not sure if it does what is necessary to allow a legacy boot to work.

@elibosley
Copy link
Member Author

elibosley commented Apr 9, 2024

Just a follow up from this, we chatted today and I'm going to make the part 2c -> 2d. Optional for delivery as it may introduce a lot of additional variables.

@elibosley
Copy link
Member Author

Here's some more context if you look at this again:

In looking at the three make_bootable scripts:

For make_bootable.bat (windows):
if neither EFI nor EFI- directories exist then the script jumps directly to running the 'syslinux' command. In this case USB Creator can rename EFI to EFI-save (for example), run 'make_bootable.bat' then rename EFI-save to whatever is should be.

For make_bootable_linux unfortunately it's going to prompt no matter what. I don't know how QT is invoking external scripts. i know if 'bash' is used then a construct like this would work to feed the 'N' to the script:
make_bootable <<< "N"
or 'Y'
make_bootable <<< "Y"
(the triple '<' chars are a bash'ism)

For make_bootable_mac - same thing, it's going to prompt and not sure what shell MacOS uses.

@elibosley
Copy link
Member Author

Our dev tested this working :)

@elibosley elibosley moved this from Backlog to Done in Unraid USB Creator Rewrite Board May 23, 2024
@jlre249 jlre249 mentioned this issue May 24, 2024
@elibosley elibosley reopened this May 24, 2024
@elibosley
Copy link
Member Author

This has been reopened due to escalation issues with the script on Linux / Mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants