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

Suggestions for Post-Reboot actions of migrate2rocky.sh #131

Open
ESIC-DA opened this issue Nov 25, 2021 · 2 comments
Open

Suggestions for Post-Reboot actions of migrate2rocky.sh #131

ESIC-DA opened this issue Nov 25, 2021 · 2 comments

Comments

@ESIC-DA
Copy link

ESIC-DA commented Nov 25, 2021

Greetings glorious Rocky Linux overlords,

I would humbly suggest that some flag be added to be used to do a post reboot cleanup of some things:

  1. Fix the grub rescue entry after the user knows that the newly migrated Rocky install works aka:
rm -f /boot/vmlinuz-0-rescue-* /boot/initramfs-0-rescue-*.img;
/usr/lib/kernel/install.d/51-dracut-rescue.install add $(uname -r) "" /lib/modules/$(uname -r)/vmlinuz
  1. Potentially offer to delete all older centos/stream/*EL kernels that are not from Rocky. Presently I'm doing this very hacky thing post migration reboot:
rpm -qa | grep kernel | grep -v $(uname -r) | xargs yum erase -y

I'm sure there's probably safer and saner ways to do that but...it has the virtue of at least working in my limited tests.

Otherwise my tests from CentOS 8.5 and CentOS 8-Stream have been going very well. Thank you for the migration script and the continued efforts... migrate2rocky is really going to save a lot of people's bacon.

Thanks,
-Dave

@pajamian
Copy link
Collaborator

a bit better version:
dnf --exclude="kernel*-$(uname -r)" remove kernel\*

@ESIC-DA
Copy link
Author

ESIC-DA commented Nov 25, 2021

I concur that is significantly better and in my testing from centos 8.5 to rocky 8.5, works beautifully as a post-install cleanup of old kernels.

Thanks!

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

No branches or pull requests

2 participants