• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Grub boot problem

Erwan

Regular Pleskian
Hi all,

This is not a problem directly related to Plesk but I need your help if possible...
Setup: Centos 7.9 / Plesk Obsidian 18
Raid with 4 discs.

After requesting the replacement of a defective disk, the server did not restart due to a problem with Grub.
#grub>

I try this to repair in rescue mode:

#mount /dev/sdb1 /mnt
#mkdir /mnt/proc
#mkdir /mnt/sys
#mkdir /mnt/dev
#mount -o bind /proc /mnt/proc
#mount -o bind /sys /mnt/sys
#mount -o bind /dev /mnt/dev
#chroot /mnt /bin/bash

To then do:
grub-install /dev/sdb
update-grub

But i have this error with #chroot /mnt /bin/bash:
chroot: failed to run command ‘/bin/bash’: No such file or directory

I try this:
# ldd /bin/bash
linux-vdso.so.1 (0x00007ffd89de5000)
libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5 (0x00007f8f1a736000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f8f1a50c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8f1a308000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8f19f5d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8f1a95b000)
# cp /lib/x86_64-linux-gnu/libncurses.so.5 /mnt/lib
# cp /lib/x86_64-linux-gnu/libncurses.so.5 /mnt/lib
# cp /lib/x86_64-linux-gnu/libdl.so.2 /mnt/lib
# cp /lib/x86_64-linux-gnu/libc.so.6 /mnt/lib
# cp /lib64/ld-linux-x86-64.so.2 /mnt/lib64

But always:
chroot: failed to run command ‘/bin/bash’: No such file or directory

Does anyone have an idea of the problem?
I'm not familiar with how Grub works and how to fix it... thanks in advance for your help.

Erwan
 
It seems that the bash is not installed.

This can be a very difficult issue, because it is unclear whether there is a raid configuration problem, an operating system problem, a corrupt file structure or a grub issue. You will need to check all these points. For example: What is the raid bios saying about the array? Are your discs part of the array and is it "good"? What was the previous raid setup? Was it a raid 1 or 5? Normally, when a defective disc is removed from these, the server should still start, because that's what these types are made for. If the server does not start from the volume, is it trying to start from the new disc that is not part of the array? It's really nothing that can be solved by a few forum guesses. It more likely needs detailed knowledge on the previous system state and configuration and what is going on now during boot.
 
Thank you Peter.

The raid array is ok.

I think there was a problem with doing Plesk & yum update and after, asking for disk change.
When the server starts, this is what is proposed:

> Centos linux (4.9.103-xxxx-std-ipv6-64) 7 (Core)

and if selected, error: file /boot/vmlinux-4.9.103-xxxx-std-ipv6-64 not found

I'm trying to figure out grub.. and when I do an ls through the grub shell:
#ls (hd1,gpt2)/boot/vmlinux...
I have in fact: vmlinux-4.9.185-xxxx-std-ipv6-64

At this point I'm trying to figure out how to change detection and pointing...
 
I found a grub documentation to update loader:

set boot=(hd1,gpt2)
linux (hd1,gpt2)/boot/vmlinuz-X.X.X-xxxx-std-ipv6-64 root=/dev/sda1
initrd (hd1,gpt2)/boot/initrd.img-X.X.X-xxxx-std-ipv6-64
boot


But i have in /boot:
vmlinuz-4.9.185-xxxx-std-ipv6-64 ==> last version
initramfs-4.9.103-xxxx-std-ipv6-64 ==> version before update i think

In fact, on all disks i have in /boot/:
grub2/
efi/
System.map-4.9.185-xxxx-std-ipv6-64
config-4.9.185-xxxx-std-ipv6-64
vmlinuz-4.9.185-xxxx-std-ipv6-64
initramfs-4.9.103-xxxx-std-ipv6-64
 
vmlinuz version (4.9.185) is different from initrd version (4.9.103).
Do you know how to fix it?
 
Back
Top