Upgrading CentOS 6 to 7
Re: Upgrading CentOS 6 to 7
I've just upgraded Centos 6.10 (without GUI) to Centos7 (and finally to Centos 8.2), so it is still possible:
Just try yourself:
1. add repo in /etc/yum.repos.d/upg.repo;
[upg]
name=CentOS-$releasever - Upgrade Tool
baseurl=http://buildlogs.centos.org/centos/6/upg/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
2. Then:
yum -y install openscap-1.0.8 preupgrade-assistant-contents preupgrade-assistant redhat-upgrade-tool
3. and give it a try (it will only inform you about potential problems):
preupg -s CentOS6_7
4. If there are too many errors in point 3 that you dont understand then GIVE UP HERE!
or else just finally do:
centos-upgrade-tool-cli --network 7 --cleanup-post --instrepo=http://vault.centos.org/centos/7.2.1511/os/x86_64/ --addrepo=CentOS7=http://mirror.centos.org/centos/7/os/x86_64/ (<=here you can use preferred repo)
5. Upgrade grub:
yum remove grub
yum install grub2 grub2-tools grubby
grub2-mkconfig -o /boot/grub2/grub.cfg
6. enable services
systemctl enable network
systemctl enable sshd
systemctl enable rsyslog
Just try yourself:
1. add repo in /etc/yum.repos.d/upg.repo;
[upg]
name=CentOS-$releasever - Upgrade Tool
baseurl=http://buildlogs.centos.org/centos/6/upg/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
2. Then:
yum -y install openscap-1.0.8 preupgrade-assistant-contents preupgrade-assistant redhat-upgrade-tool
3. and give it a try (it will only inform you about potential problems):
preupg -s CentOS6_7
4. If there are too many errors in point 3 that you dont understand then GIVE UP HERE!
or else just finally do:
centos-upgrade-tool-cli --network 7 --cleanup-post --instrepo=http://vault.centos.org/centos/7.2.1511/os/x86_64/ --addrepo=CentOS7=http://mirror.centos.org/centos/7/os/x86_64/ (<=here you can use preferred repo)
5. Upgrade grub:
yum remove grub
yum install grub2 grub2-tools grubby
grub2-mkconfig -o /boot/grub2/grub.cfg
6. enable services
systemctl enable network
systemctl enable sshd
systemctl enable rsyslog
Re: Upgrading CentOS 6 to 7
Which one looks like less effort and less risk:
- Install new system and learn to use it properly
- Use something that has low chance of success, no guarantee whatsoever, and then learn to use the new system properly even though your system might have silent corruption
-
- Posts: 1
- Joined: 2020/10/10 17:50:47
Re: Upgrading CentOS 6 to 7
Hrm Having issues finding the pre-upgrade elements. Gonna have to check my repo settings.
Thanks for the walkthru. I've got a VM needing updating for an updated service requirement, and I appreciate somebody relating their experience to make a tool work rather than having to rebuild it from scratch.
Re: Upgrading CentOS 6 to 7
At risk of repeating myself:
There is NO UPGRADE from one CentOS version to the next. None. The official position is that you backup your data and configs, reinstall the system, restore the data and adjust configs.
Please note this tool DOES NOT WORK. It bricks systems on a regular basis, possibly beyond recovery. It is dangerous to use and you cannot ever rely on the results if by some remote possibility that it does work (which it does not in 99% of all cases).
There is NO UPGRADE from one CentOS version to the next. None. The official position is that you backup your data and configs, reinstall the system, restore the data and adjust configs.
Please note this tool DOES NOT WORK. It bricks systems on a regular basis, possibly beyond recovery. It is dangerous to use and you cannot ever rely on the results if by some remote possibility that it does work (which it does not in 99% of all cases).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Upgrading CentOS 6 to 7
Rebuilding a VM from scratch is infinitely safer, and probably quicker and easier if you know what you are doing.
If you don't know what you are doing, then the last thing you should attempt is duct tape on duct tape of undefined behaviour, of which you by definition can't tell whether it just sold your kidney.
-
- Posts: 1
- Joined: 2020/10/11 09:44:34
Re: Upgrading CentOS 6 to 7
on centos 6.10 running on a VM
all was fine until the step:
the command:
grub2-mkconfig -o /boot/grub2/grub.cfg doesn't work apparently
# grub2-mkconfig -o /boot/grub2/grub.cfg
-bash: grub2-mkconfig: command not found
all was fine until the step:
the command:
grub2-mkconfig -o /boot/grub2/grub.cfg doesn't work apparently
# grub2-mkconfig -o /boot/grub2/grub.cfg
-bash: grub2-mkconfig: command not found
Re: Upgrading CentOS 6 to 7
It. Is. Unsuppoorted. Please. Do. Not. Use. It.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Upgrading CentOS 6 to 7
Another reason to NOT use the unsupported tool is that, during a reinstall of a new system, you can take the opportunity to clean up the cruft and tighten up the security of the new machine. I know that this should ideally not be necessary, but here in the real world .....
Re: Upgrading CentOS 6 to 7
You should have grub2-mkconfig as earlier was command "yum install grub2 ..." without successful installation of grub2 you will end up with unbootable system.mikadamsterdam wrote: ↑2020/10/11 10:13:19on centos 6.10 running on a VM
all was fine until the step:
the command:
grub2-mkconfig -o /boot/grub2/grub.cfg doesn't work apparently
# grub2-mkconfig -o /boot/grub2/grub.cfg
-bash: grub2-mkconfig: command not found
ps. On Centos 6.10 it was good to downgrade "grep" from 2.20-6 to 2.6.3 from earlier centos 6.x distro, because centos 7.x has version 2.20-2 and upgrade is not performed automatically.