Centos 7 filed to load after power failer

Issues related to applications and software problems
yaodav
Posts: 17
Joined: 2019/06/30 08:47:46

Centos 7 filed to load after power failer

Post by yaodav » 2020/09/25 14:04:53

i have CentOS 7 guest over win 10 host using vmware
i hade power failer and when I'm trying to start the Centos Im getting to the GRUB menu but when Im selectin the version i whont to run this is the screen that I'm getting:
1.png
1.png (14.35 KiB) Viewed 231 times
Im running

Code: Select all

journalctl -ex
2.png
2.png (46.44 KiB) Viewed 231 times
please help me solved it

User avatar
TrevorH
Forum Moderator
Posts: 29719
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 filed to load after power failer

Post by TrevorH » 2020/09/25 16:18:50

Boot from the install iso in rescue mode (an option off the Troubleshooting menu when you first boot it) and run xfs_repair against that filesystem's block device.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

yaodav
Posts: 17
Joined: 2019/06/30 08:47:46

Re: Centos 7 filed to load after power failer

Post by yaodav » 2020/09/26 19:49:47

I enter the Troubleshooting then i have 4 options:
1) Install CentOS 7...
2) Rescue a CentOS system
3) Run a memory test
4) Boot from local drive

when Im selectin 2 again I Hvae 4 options:
3.png
3.png (15.69 KiB) Viewed 206 times
if i select 1 it says what:
Rescue Mount
You don`t have any Linux partitions. The system will reboot automatically when you exit from the shell. please press <return> to get a shell.
the same show also If Im selectin option 2 (Read-only mount).


if Im celection Boot from local drive (option 4 in the Troubleshooting manu) It cant find My imeg file.
so where fo i need to run the fxs_repair command

User avatar
TrevorH
Forum Moderator
Posts: 29719
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 filed to load after power failer

Post by TrevorH » 2020/09/26 20:35:58

You want option 3 to drop to a root command prompt so that you can explore the system and find out what is going on and attempt to run xfs_repair on the damaged filesystem(s).
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

yaodav
Posts: 17
Joined: 2019/06/30 08:47:46

Re: Centos 7 filed to load after power failer

Post by yaodav » 2020/09/27 05:46:39

i tried to run

Code: Select all

xfs_repair /sysroot
command the the outpot is:
/sysroot: No such file or directory
/sysroot: No such file or directory
fata error -- couldn't initialize XFS library
I also tried

Code: Select all

mount /dev/mapper/live-rw /sysroot
and the output is
mount: pount point /sysroot does not exist
do i need to create /sysroot dir?

also this is the output of the command

Code: Select all

lsblk
4.png
4.png (6.86 KiB) Viewed 157 times

User avatar
TrevorH
Forum Moderator
Posts: 29719
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 filed to load after power failer

Post by TrevorH » 2020/09/27 12:41:03

Try reading man xfs_repair and one of the first things it says in there is:
Regardless, the filesystem to be repaired must be unmounted, otherwise, the resulting filesystem may be inconsistent or corrupt.
So what you want to repair should not be mounted.

I would suggest that you run vgchange -ay to activate your LVs then run xfs_repair against the LV that contains the problematic filesystem.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

yaodav
Posts: 17
Joined: 2019/06/30 08:47:46

Re: Centos 7 filed to load after power failer

Post by yaodav » 2020/09/27 13:26:06

I tried to unmount it but I'm getting
umont: .dev/sda2: not mounted
i run the command you sead

Code: Select all

vgchange -ay
now the

Code: Select all

lsblk
commdna look like this:
lsblk.png
lsblk.png (20.5 KiB) Viewed 144 times
so i treid to run

Code: Select all

xfs_repair /dev/sda2/
got the message
cannot open /dev/sda2: device or resource busy
so i treid to umount it and i got
/dev/sda2: not mounted
so i tried to mount it and I'm getting
mount: can't find /dev/sda2 in /etc/fstab
i tried to read the fstab file and it empty

User avatar
TrevorH
Forum Moderator
Posts: 29719
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 filed to load after power failer

Post by TrevorH » 2020/09/27 13:39:24

Now that you ran the vgchange, you can see that it lists centos-swap and centos-root as LVs that were not there before. You need to run xfs_repair /dev/centos/root after the vgchange.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

yaodav
Posts: 17
Joined: 2019/06/30 08:47:46

Re: Centos 7 filed to load after power failer

Post by yaodav » 2020/09/27 13:58:51

I run the command and it tels me this:
7.png
7.png (8.06 KiB) Viewed 128 times

User avatar
TrevorH
Forum Moderator
Posts: 29719
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 7 filed to load after power failer

Post by TrevorH » 2020/09/27 14:44:47

It tells you what to do in that.

First, attempt to mount /dev/centos/root /mnt to replay the pending log then umount it and rerun the xfs_repair. You may need to mkdir /mnt first so that the /mnt directory exists before you can run the mount. If it will not mount then use xfs_repair -L /dev/centos/root.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”