Grub install error and how to fix it

:uk:/:us: Message template (english)

My YunoHost server

Hardware: OVH Kimsuffi VPS bought online
YunoHost version:

  • The server architecture is bare-metal amd64
  • The server uses Linux kernel 4.19-ovh-xxxx-std-ipv6-64
  • The server uses Debian 10.7
  • The server uses YunoHost 4.0.8.3 (stable))

I have access to my server : Through SSH

Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Hello,
After rebooting my Kimsuffi server following updates, I had the sad surprise of no longer having access to it.

I then received an email indicating that it was no longer responding to the ping.
A technician went to check and told me that

The server remains blocked during the boot phase on the message :
(grub install)

Your server has restarted in ‘Rescue’ mode.

Here are the steps I followed to get it back on track:

In rescue mode, the server disk is not mounted, it’s just a rescue boot.
The principle is to mount the partitions of my disk, to change the root folder with chroot and to repair Grub.

lsblk
sudo fdisk -l 

To locate the partitions and their contents.

In my case, I had :

  • sda1 as boot
  • sda2 as partition~900Mo
  • sda3 as swap.

I don’t have an EFI partition.

I mount the partitions and some folders to recreate the environment of my server.

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /sys /mnt/sys
mount -t proc /proc /mnt/proc

Root change :

chroot /mnt /bin/bash
mount - a

To mount all the partitions of /etc/fstab (I’m not sure if this command is useful)

and then we repair Grub :

apt-get install grub-pc
grub-install /dev/sda
update-grub

To leave the chmod :

exit

Finally, change the Netboot in the KimSuffi interface, choosing “Hard Disk”.

image

and reboot the server :

reboot

:fr: ModÚle de message (français)

Mon serveur YunoHost

Matériel: VPS Kimsuffi acheté en ligne
Version de YunoHost:

  • L’architecture du serveur est bare-metal amd64
  • Le serveur utilise le noyau Linux 4.19-ovh-xxxx-std-ipv6-64
  • Le serveur utilise Debian 10.7
  • Le serveur utilise YunoHost 4.0.8.3 (stable)

J’ai accùs à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectuĂ© des modificiations particuliĂšres sur votre instance ? : non

Description du problĂšme

Bonjour,
AprĂšs avoir rebootĂ© mon serveur Kimsuffi suite Ă  des mises Ă  jour, j’ai eu la triste surprise de ne plus y avoir accĂšs.

J’ai alors reçu un mail indiquant qu’il ne rĂ©pondait plus au ping.
Un technicien est allĂ© voir et m’a indiquĂ© que

Le serveur reste bloqué durant la phase de boot sur le message :
(grub install)

Votre serveur a redĂ©marrĂ© en mode ‘Rescue’

Voici les Ă©tapes que j’ai suivies pour le remettre en route :

En mode rescue, le disque du serveur n’est pas montĂ©, c’est juste un boot de secours.
Le principe est de monter les partitions de mon disque, de changer de dossier racine avec chroot et de réparer Grub

lsblk
sudo fdisk -l 

Pour repérer les partitions et leur contenu.

Dans mon cas, j’avais :

  • sda1 en boot
  • sda2 en partition de ~900Mo
  • sda3 en swap.

Je n’ai pas de partition EFI.

Je montes les partitions et certains dossiers pour recrĂ©er l’environnement de mon serveur

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /sys /mnt/sys
mount -t proc /proc /mnt/proc

Changement de racine :

chroot /mnt /bin/bash
mount - a

Pour monter toutes les partitions du /etc/fstab (Je ne suis pas sĂ»r de l’interĂȘt de cette commande)

et ensuite on répare Grub :

apt-get install grub-pc
grub-install /dev/sda
update-grub

Pour quitter le chmod :

exit

Pour finir, changement du Netboot dans l’interface KimSuffi, en choisissant “Disque Dur”

image

et reboot du serveur :

reboot
5 Likes

Man ! Thank you so much for this ! I’ve the same issue after migrations steps and your post just save my whole cloud !
Thank you again ! :+1:

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.