AlmaLinux/almalinux-deploy

Add "--allowerasing" to a downgrade "-d" option in almalinux-deploy.sh

pjwelsh opened this issue · 2 comments

Going from CentOS 8-Stream to AlmaLinux using just the "-d" is not enough based on my testing. I suggest adding the "--allowerasing" at least.
Also, the failure notice given from a failed distro-sync attempt says to issue the command "dnf distro-sync -y" alone. This will break a system. Additional notice should be provided to also re-run the almalinux-deploy.sh. The pattern for this part of the issue looks like this:

  1. run almalinux-deploy.sh -d
  2. fails with command "Run dnf distro-sync -y'
  3. manually run "dnf distro-sync -y" = fail
  4. manually run "dnf distro-sync -y --allowerasing" = works
  5. reboot -> fail

I've done something like this:

  1. run almalinux-deploy.sh -d
  2. fails with command "Run dnf distro-sync -y'
  3. manually run "dnf distro-sync -y --nobest" = failed with package grub2-efi
  4. Noticed that in my instalation had a customized repo, so I renamed it to customrepo.old, and 'yum clean metadata' and 'yum check-update'
  5. 'yum remove grub2-efi'
  6. 'yum install grub2-efi' (now it installs with almalinux repo)
  7. run almalinux-deploy.sh -d (again)
  8. reboot -> works!

'# cat /etc/redhat-release'
AlmaLinux release 8.6 (Sky Tiger)
'# uname -r'
4.18.0-372.26.1.el8_6.x86_64

So, I tested again, but I get rid of the custom repo before, and the process completed suscessfuly, not need to manually run "dnf distro-sync" and the deploy script again.