boot centos 7 from grub 0.97
Posted: 2019/10/15 06:53:51
Hallo everybody.
I would like to have some help in booting a CentOS 7 partition using grub 0.97 (CentOS 5.2). My problem is the following:
1. I have some servers with CentOS 5.2
All this servers have the some disk partitions. In particular they have CentOS 5.2 installed in /dev/sda2 and an unused /dev/sda3 partition.
Disks and partitions are identical for all servers.
2. I have installed CentOS 7 in the /dev/sda3 partition of one of my servers and, instead of repeating the same installation on all other computers, I would like to copy the whole partition to a file, like:
dd if=/dev/sda3 of=c7.img
and then copy the file to the /dev/sda3 partition of all other servers:
dd if=c7.img of=/dev/sda3
(note: the file c7.img has been created in a NFS shared by all servers)
3. my problem is, now that I have a fresh installation of CentOS7 in /dev/sda3, how can I boot it starting from a system running CentOS 5.2 ?
I suppose I must work on the /boot/grub/grub.cfg of the CentOS 5.2 installation and reboot, but my very naive tries have ended up with an
unbootable system. A typical grub.cfg file is like the following:
timeout 5
default 0
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
# kernel0 (hd0,1)
title CentOS5.2_30Mar2010_(hd0,1)
root (hd0,1)
kernel /boot/vmlinuz-2.6.18-92.el5 ro root=/dev/sda2 ro root=/dev/sda2 rhgb quiet
initrd /boot/initrd-2.6.18-92.el5.img
and what I have tried to do is to add a new entry like:
title CentOS7
root (hd0,2)
kernel /boot/vmlinuz-3.10.0-1062.1.2.el7.x86_64 ro root=/dev/sda3 rhgb quiet
initrd /boot/initramfs-3.10.0-1062.1.2.el7.x86_64.img
}
changing default to "1", but it didn't work.
Assuming that my explanation makes sense and that I am not trying to do a substantially wrong procedure (which I am not sure), can you give me some hints?
Thank you in advance.
I would like to have some help in booting a CentOS 7 partition using grub 0.97 (CentOS 5.2). My problem is the following:
1. I have some servers with CentOS 5.2
All this servers have the some disk partitions. In particular they have CentOS 5.2 installed in /dev/sda2 and an unused /dev/sda3 partition.
Disks and partitions are identical for all servers.
2. I have installed CentOS 7 in the /dev/sda3 partition of one of my servers and, instead of repeating the same installation on all other computers, I would like to copy the whole partition to a file, like:
dd if=/dev/sda3 of=c7.img
and then copy the file to the /dev/sda3 partition of all other servers:
dd if=c7.img of=/dev/sda3
(note: the file c7.img has been created in a NFS shared by all servers)
3. my problem is, now that I have a fresh installation of CentOS7 in /dev/sda3, how can I boot it starting from a system running CentOS 5.2 ?
I suppose I must work on the /boot/grub/grub.cfg of the CentOS 5.2 installation and reboot, but my very naive tries have ended up with an
unbootable system. A typical grub.cfg file is like the following:
timeout 5
default 0
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
# kernel0 (hd0,1)
title CentOS5.2_30Mar2010_(hd0,1)
root (hd0,1)
kernel /boot/vmlinuz-2.6.18-92.el5 ro root=/dev/sda2 ro root=/dev/sda2 rhgb quiet
initrd /boot/initrd-2.6.18-92.el5.img
and what I have tried to do is to add a new entry like:
title CentOS7
root (hd0,2)
kernel /boot/vmlinuz-3.10.0-1062.1.2.el7.x86_64 ro root=/dev/sda3 rhgb quiet
initrd /boot/initramfs-3.10.0-1062.1.2.el7.x86_64.img
}
changing default to "1", but it didn't work.
Assuming that my explanation makes sense and that I am not trying to do a substantially wrong procedure (which I am not sure), can you give me some hints?
Thank you in advance.