[CentOS] Upgrading to CentOS-7 on a new partition

Timothy Murphy gayleard at eircom.it
Sun Oct 26 13:24:26 UTC 2014


Ted Miller wrote:

>> I would like to upgrade a CentOS-6.5 home server
>> to CentOS-7 on a new partition.
>> What is the simplest way to achieve this?

> 1. It requires a custom disk layout, but is not particularly hard.
> 2. AFAIK, you can share your SWAP partition between the two installations.
> 3. Centos 7 uses grub2 as its boot loader.  It is significantly different
> from "legacy grub" used in Centos 6 and before.
>    a. It uses a configuration file that is auto-generated, and not
>    supposed
> to be edited.
>    b. It is capable of finding other installations (including legacy grub
> and windows), and creating links to them.
>    c. 'b' only seems to work IF the other boot partitions are mounted
> somewhere in your file tree.  What I have done is mount the other
> partitions (the /boot partition, if it is on a separate partition,
> otherwise /) under /mnt (e.g. /mnt/C6) when you are doing your custom disk
> layout.  As long as they are mounted somewhere in the file system, grub2
> seems to find them OK, and add them to your boot menu.  It is apparently
> incapable of looking on unmounted partitions and finding Operating Systems
> lurking there.
>    d. grub2 is (theoretically) capable of booting off of LVM (and I have
> done so successfully), BUT that capability is disabled and unsupported in
> RHEL/Centos 7.  You still have to put /boot on a non-LVM partition.

Thanks very much for your response.
A couple of comments:

3. Curiously, I see I already have a file /boot/grub2/grub.cfg
on my CentOS-6.5 system, 
though /etc/grub.conf points to /boot/grub/grub.conf .
Did I create the grub2 file while experimenting with the system,
or is it provided by CentOS-6.5 to simplify upgrading?

3b. When I upgraded another server to CentOS-7
it did not seem to find the old CentOS-6.5,
although it found a Windows system OK.

However, I was using the old /boot partition for the new system.
I'll try mounting the old boot as /mnt/C6 in the custom setup
during the new installation, as you suggest.
I shall not give a separate partition for the new /boot -
hopefully I shall be able to move /boot to a new partition later.

I had thought, as an alternative method, of cloning the old system
to a new partition, and trying the new CentOSUpgradeTool on this.
(I'm running a CentOS-6 KDE system, and note that the documentation
for the new tool says it will probably not work with KDE or Gnome -
which I would have thought would rule out 95% of systems -
but it wouldn't matter too much if I still had the old system.)


-- 
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland





More information about the CentOS mailing list