Installing CentOS-7 But Keeping CentOS-6.5

Home » CentOS » Installing CentOS-7 But Keeping CentOS-6.5
CentOS 4 Comments

I’m having trouble installing CentOS-7 on my HP MicroServer. I’ve tried with KDE LiveCD and Netinstall (both on USB sticks), and now I’m going to try with the DVD ISO.

But I want to be quite sure I can return to CentOS-6.5
if things go wrong, so I’m wondering what precisely I need to copy
(eg the MBR and a bit more) so that I could get back to things as they were. Is this documented anywhere?

Actually, both failed installations did give a boot menu including the old 6.5 system, but I’m afraid sometime this might not work, and I will be cut off from the world.

Incidentally, the “Repair” option on the netinstall system was not as useful as I expected, or perhaps I don’t know how to use it properly. It entered the new CentOS-7 system OK on chroot-ing, even mounting other partitions listed in /etc/fstab . And I was able to bring up the interfaces with “service network restart”. But although I ran grub2-install , this did not help matters.

Is there anything else one can do after chrooting into a system?
Eg, can one boot the system in any way?

Any advice or suggestions gratefully received.

4 thoughts on - Installing CentOS-7 But Keeping CentOS-6.5

  • You asked what to keep to be able to boot C6. From your narrative, it seems that the legacy grub boot for C6 is already gone (blown away) by your C7 install. I haven’t figured out enough about grub2 to be able to tell you how to preserve your current grub2 configuration, but here are some possible ways to keep C6 accessible:

    1. The Super Grub2 Disk from http://www.supergrubdisk.org seems to be pretty good at finding any and all possibilities for booting using new and old versions of grub.

    2. If you are reinstalling into exactly the same location as your previous C7 attempts (same devices for boot and root), just don’t let the installer update the boot information. Since you know it boots both versions now, it should still boot both versions after the install.

    Not knowing what your installation problem is, I can’t tell (and you may not be able to tell either) if anything is wrong with your boot information, or if that is OK.

    3. From C3, install legacy grub onto a USB stick, which would allow you to boot directly to C6, without any requirement for anything to be on a hard drive.

    4. It is also possible to set up a CD that will boot your computer, but I
    don’t remember the details of that.

    Hope one of these, or something someone else chimes in, will help you. Also hope you get the C7 install figured out. So far I have only done it from DVD, and those went well for me.

    Ted Miller Elkhart, IN, USA

  • Ted Miller wrote:

    Thanks very much for your comprehensive reply.

    I’ve downloaded this and will try it if necessary.

    Yes, I’ll try that – though I don’t remember being asked if I wanted to update the bootloader – I probably missed it.

    I’m pretty sure it gets through the code in the boot, since it says
    [OK] Reached target Initrd Default Target

    I’m not sure what you mean by C3?
    I see that my CentOS-6.5 system has entries in grub/grub.conf which don’t seem very old (January this year).

    I did wonder if one can in fact use grub with CentOS-7, since it seems to create an empty (almost) /boot/grub/ folder?

    Not quite sure what you mean by this?

    I’ve found a second hard disk (from an old server) and put that in, so I’ll be able to experiment with that, without worrying about what it does to my current CentOS-6.5 system.

    Also I used to use the old grub interactively –
    I’ll see if it is still possible to do this with grub2.

    And I’ll try a couple of your suggestions first, like not installing the boot-loader.

  • Now that you mention it, I don’t remember seeing it in C7 either. Maybe on the page where you do disk partitioning?

    Should have been C6.

    It is possible to burn a CD with grub or grub2 files on it, which will allow you to get to one (or both) of your installs. Like a live CD, but all it does is direct the boot process to your hard disk. (Don’t ask me the details — did it once with a floppy, but never with a CD).

    Yes it is, but you have to use the new syntax.

    Hope it works, Ted Miller

  • If you don’t overwrite your old partitions, you should be able to boot from a 6.x install iso in ‘rescue’ mode. But, I’d recommend an emergency backup made either with clonezilla-live (a bootable CD) or the ‘rear’ package from EPEL just on general principles. Clonezilla does a menu-drive disk-image backup that it can put on a local disk, or network share via nfs/samba/sshfs, and knows enough about filesystems to just save the used blocks. Rear builds a bootable iso
    (using your own system tools) with a script to recreate your partitions and filesystems from bare metal and restore a tar image onto it. Actually the backup method is somewhat pluggable, but tar to an NFS server is the only one I’ve used. It is probably possible to use a USB drive of if the system is small enough, include it on the bootable iso. A big advantage of ‘rear’ is that you don’t have to take the system down to create a backup – and it is possible but a bit of work to change the filesystem layout before the restore.