Help: How to restore Centos 8 system after deleting accidentally boot data
Posted: 2021/01/19 01:02:46
Well, this weekend has been very difficult. I have a centOS 8 computer, configured as Web and SSH servers. It have been working very well in two years, without any issue. Because of confinement I need to do a lot of remote work to access the server and to store files in external HDs I need to recover from time to time. But playing with mount commands (a bad idea), It seems I mounted by accident the boot partititon which had also the efi folders. So I apparently I unmounted it but for some reason the mounted folders didn't desapair, they persisted. But saddly I notice this when I tried to delete the mounting folder.
Then, in a chain of unfortunate events, I reboot the computer but it entered to the DELL setup system (its a Dell Presicion), but it is not booting any more.
So I tried to recover using the original usb and centos-iso I used to install the server, with the application Rescue a Centos Linux system (I needed to visit my lab for doing that), with the option: 1) Continue
then I mounted the system with:
chroot /mnt/sysimage
I can see all my files are still there in /home and /var/www/html (I have a moodle system for teaching).
but when I try to reapair with:
grub2-mkconfig -o /boot/grub2/grub.cfg
I am getting an error message: There is not an EFI folder
Then I try also:
grub2-install /dev/sda1 #(becasue on this dev it is present /boot/grub/efi/EFI/centos as showed with lsblk )
However I am getting a message:
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist
when I visit the folder /usr/lib/grub there is only an i386 folder
What can I do? Forgive me, this is my first post. Not sure if this is the correct place and which other information I need to include. I don't have access in this moment to the server, but tomorrow I can.
I am very sad, becasue no recent backups of my course were made recently (a month at least), important to recover my moodle system (all the file system if possible)
So, also I wonder if there is some third-party software can help me (like rescatux?) but I can try the hard way. I am desperate to recover my data this week
Then, in a chain of unfortunate events, I reboot the computer but it entered to the DELL setup system (its a Dell Presicion), but it is not booting any more.
So I tried to recover using the original usb and centos-iso I used to install the server, with the application Rescue a Centos Linux system (I needed to visit my lab for doing that), with the option: 1) Continue
then I mounted the system with:
chroot /mnt/sysimage
I can see all my files are still there in /home and /var/www/html (I have a moodle system for teaching).
but when I try to reapair with:
grub2-mkconfig -o /boot/grub2/grub.cfg
I am getting an error message: There is not an EFI folder
Then I try also:
grub2-install /dev/sda1 #(becasue on this dev it is present /boot/grub/efi/EFI/centos as showed with lsblk )
However I am getting a message:
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist
when I visit the folder /usr/lib/grub there is only an i386 folder
What can I do? Forgive me, this is my first post. Not sure if this is the correct place and which other information I need to include. I don't have access in this moment to the server, but tomorrow I can.
I am very sad, becasue no recent backups of my course were made recently (a month at least), important to recover my moodle system (all the file system if possible)
So, also I wonder if there is some third-party software can help me (like rescatux?) but I can try the hard way. I am desperate to recover my data this week