rocky-tools
rocky-tools copied to clipboard
Suggestions for Post-Reboot actions of migrate2rocky.sh
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:
- 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
- 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
a bit better version:
dnf --exclude="kernel*-$(uname -r)" remove kernel\*
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!