[Solved] Help - Debian 9 server fail boot after power outage

If none of the more specific forums is the right place to ask

[Solved] Help - Debian 9 server fail boot after power outage

Postby cmonty14 » 2020-07-30 12:17

Hi,
after power outage I face this issue:
Debian 9 server fails to boot.

I started Live-CD, mounted LVM-root and boot partition and chroot in the system.

However there are many commands not available, e.g.
ls
mount
pvs
...

I can install packages like coreutils, lvm2, ... but this does not solve the issue, means the commands still fail.

Then I tried to reinstall Grub2, but I cannot execute grub-install or grub-setup; again the commands are not available.

Question:
Which steps can I perform to start repair the system?

THX
Last edited by cmonty14 on 2020-07-30 20:50, edited 2 times in total.
cmonty14
 
Posts: 3
Joined: 2020-07-30 12:13

Re: Help - Debian 9 server fails to boot after power outage

Postby Head_on_a_Stick » 2020-07-30 18:37

Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12318
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Help - Debian 9 server fails to boot after power outage

Postby p.H » 2020-07-30 19:50

cmonty14 wrote:Debian 9 server fails to boot.

This statement does not contain any useful information.
How does it fail to boot ? What happens exactly ?

cmonty14 wrote:However there are many commands not available

This statement does not contain any useful information.
What happens exactly when you try to execute these commands ?
p.H
 
Posts: 1423
Joined: 2017-09-17 07:12

Re: Help - Debian 9 server fails to boot after power outage

Postby cmonty14 » 2020-07-30 19:55

OK.
Let my precise my statements.

After chroot to the root partition, that is in fact a logical volume (LVM2), I get this error message:
Code: Select all
/usr/bin/env: 'bash': No such file or directory


When I enter ls in chroot command prompt I get this error message:
Code: Select all
bash: ls: command not found


When I enter pvs in chroot command prompt I get this error message:
Code: Select all
bash: pvs: command not found


When I enter grub-install in chroot command prompt I get this error message:
Code: Select all
bash: grub-install: command not found


This means I cannot reinstall Grub in order to fix the boot issue.
But I also don't understand what the root cause for all issues is. There's no error reported by fsck.ext4.
cmonty14
 
Posts: 3
Joined: 2020-07-30 12:13

Re: [Solved] Help - Debian 9 server fail boot after power ou

Postby cmonty14 » 2020-07-30 20:51

Solved by booting from Debian 9 Live CD and then chroot into root partition.
All command work and grub-install fixes the issue with booting.
cmonty14
 
Posts: 3
Joined: 2020-07-30 12:13


Return to General Questions

Who is online

Users browsing this forum: Head_on_a_Stick and 6 guests

fashionable