Hello,
On a sandbox Centos 7 VM system i deleted the /boot directory. I was/am hoping to restore it and boot this system again. I am new to Linux and working on my advanced troubleshooting. I have an exact duplicate of this VM for file comparison, etc.
* rm -rf /boot (this kept the /boot directory but cleaned its contents).
* init 6 (not surprisingly the system would not boot).
* Booted using linux rescue disk and ran /sbin/grub2-install /dev/sda command. This restored the /boot/grub2 directory.
* Rebooted system and stuck at grub> prompt.
No idea what to do next. Any help would be greatly appreciated. Seems to be limited information for release 7 as all forums i've searched point to running grub-install not grub2-install.
Thank you.
Deleted /boot dir - problems around that
Re: Deleted /boot dir - problems around that
At a minimum yum reinstall kernel
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: Deleted /boot dir - problems around that
I haven't figured out if it is possible to mount a dvd iso under vmware when booted into Centos rescue mode. Without that can't see how i can get the packages to reinstall the kernel.
Re: Deleted /boot dir - problems around that
You can.
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: Deleted /boot dir - problems around that
Thanks for pointing me in the right direction. I couldn't find the path to the cd/dvd drive until I figured out it was /dev/sr0. Fixed the issue by using the following:
1. Boot off dvd into rescue mode.
2. chroot /mnt/sysimage
3. mount /dev/sr0 /mnt
4. yum reinstall /mnt/Packages/kernel-3.10.0-123.el7.x86_64.rpm
5. /sbin/grub2-install /dev/sda
6. /sbin/grub2-mkconfig /boot/grub2/grub.cfg
7. Reboot into VM run-level 3.
Done. Onto next problem, which i haven't caused yet.
1. Boot off dvd into rescue mode.
2. chroot /mnt/sysimage
3. mount /dev/sr0 /mnt
4. yum reinstall /mnt/Packages/kernel-3.10.0-123.el7.x86_64.rpm
5. /sbin/grub2-install /dev/sda
6. /sbin/grub2-mkconfig /boot/grub2/grub.cfg
7. Reboot into VM run-level 3.
Done. Onto next problem, which i haven't caused yet.
Re: Deleted /boot dir - problems around that
Then yum update to get the latest kernel 3.10.0-123.6.3 currently. If it's already installed according to rpm then use yum reinstall.
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