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

Consider using a migration script to simplify the migration process #31

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

sihawken
Copy link

@sihawken sihawken commented Feb 8, 2023

Hello,

Consider adding a script like the one in this pull request to make it easier to switch to the desired image (kargs etc are set by the script)

All that would be needed is to run the following in the terminal and to answer the prompts.

bash <(curl -Ls https://raw.githubusercontent.com/ublue-os/nvidia/main/migrate.sh)

VAR=$VARIANT
fi

# Only run if on Kinoite or Silverblue
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we can generalize this a bit because more flavors will eventually be added. More importantly, we want to check that there's a booted rpm-ostree system that's capable of rebasing:

$ rpm-ostree status --booted --json | jq .deployments[].booted

@joshua-stone joshua-stone changed the base branch from main to devel February 8, 2023 21:04

echo "Migrating to \"${IMG_NAME}\". Running rpm-ostree rebase & setting the kernel arguments."

RUNSCRIPT="RET=1; until [ \${RET} -eq 0 ]; do rpm-ostree rebase --experimental ${IMG}; RET=\$?; if [[ ! \$RET = 0 ]]; then read -r -p 'Rebasing failed. Do you want to try again? [y/N]: ' retryresponse; if [[ ! \$retryresponse =~ ^[Yy]$ ]]; then exit 1; fi; fi; done; rpm-ostree kargs --append=rd.driver.blacklist=nouveau --append=modprobe.blacklist=nouveau --append=nvidia-drm.modeset=1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we try to enroll the secure boot key as well?

@castrojo
Copy link
Member

castrojo commented Feb 9, 2023

This is a great idea ... if it's generic enough we can just put it on the image and avoid the curling to bash altogether. Something like /usr/bin/imageswitcher or something.

@bhh32
Copy link

bhh32 commented Mar 13, 2023

I've created / am working on a tool that may satisfy this PR: https://github.com/bhh32/ublue-it-cli
It does the rebase and the kargs for nvidia as well as doing a rebase for any of the other images even if they don't need the nvidia driver. Just need some help testing it out.

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

Successfully merging this pull request may close these issues.

4 participants