rocky-tools icon indicating copy to clipboard operation
rocky-tools copied to clipboard

Suggestions for Post-Reboot actions of migrate2rocky.sh

Open ESIC-DA opened this issue 3 years ago • 2 comments

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

ESIC-DA avatar Nov 25 '21 10:11 ESIC-DA

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

pajamian avatar Nov 25 '21 11:11 pajamian

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!

ESIC-DA avatar Nov 25 '21 11:11 ESIC-DA