AlmaLinux / almalinux-deploy

EL to AlmaLinux migration tool.
GNU General Public License v3.0
543 stars 72 forks source link

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

Open pjwelsh opened 2 years ago

pjwelsh commented 2 years ago

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
ander-san commented 2 years ago

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

ander-san commented 2 years ago

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.