Answer the question
In order to leave comments, you need to log in
How to restore grub via Hetzner's Rescue systems?
I will describe the situation: once upon a time there was a server (from Hetzner) and it worked remarkably well under debain 6
And now, after more than 3 years, I wanted to update it. Decided done. apt-get update, apt-get upgrade. During the update, a warning popped up in the blue window that grub was updated and changes needed to be made, but since I was not sure, I checked the boxes - leave it as it is. However, a vague suspicion crept in that after a reboot it might not take off. Therefore, the necessary data was transferred and rebooted.
As expected, the server did not boot. It would seem that everything is simple - booted into the Rescue system, mounted the disk, did grub-install, update-grub - wrote that everything is ok. But after the reboot, everything is also not available. And now I'm sitting here thinking that I'm doing it wrong.
Yes, there is nothing critical - I transferred everything that was needed to a new server in advance, but in principle I want to understand the situation. Yes, there is a software raid on the server. Therefore, I mounted /dev/md2 accordingly, since the /dev/sda and sdb disks themselves naturally do not want to be mounted
Answer the question
In order to leave comments, you need to log in
He asked, he answered. Maybe someone will come in handy.
For the case if you have software-raid and need to restore grub via Rescue, then:
ls /dev/md* //see what you have collected in the raid
mount /dev/md2 /mnt - mount the one I needed, it was md2
further chroot in mounted partition and unmount system resue files
mount --bind /dev /mnt/dev/; mount --bind /proc /mnt/proc/; mount --bind /sys /mnt/sys/
chroot /mnt
mount -a
And now grub-install /dev/sda and update-grub - this is exactly what could not be done immediately after booting into the rescue system
After reboot everything is ok
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question