How to fix Kernel Panic on Redhat Linux without distrubing /home partition

Hello friends,

I have installed Redhat Enterprise linux on one of my machine. while installing I have opted for default partitions. Now I am facing Kernel Panic issue most of my very important files and huge data nearly many GB’s of data are there in /home partition. Anyone please help me to fix the issue without loosing data in it.
My Partition structure is like this

Device Mount Point Type size(MB) start end
LVM Volume Groups
VolGroup00 953760
LogVol01 swap 1984
LogVol00 ext3 951776

/dev/sda/

/dev/sda1 ext3 102 1 13
/dev/sda2 VolGroup00 LVM PV 953765 14 121601

Thanks
Kiran

Could you please share the Kernel Panic error or a screenshot, so that we can help you out better…

1 Like

Hii Ravi, Please find below screen shot and do the needful

@kiran_lintech

Your file system is corrupted for this you need an live cd and boot your system into rescue mode.
After entering into the rescue mode change the root directory to /mnt/sysimage

Sh-3.2# chroot /mnt/sysimage

Sh-3.2# lvm lvs -o +devices

LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert Devices
LogVol00 VolGroup00 -wi-ao 529.84G                                       /dev/sda2(0)
LogVol00 VolGroup00 -wi-ao 529.84G                                       /dev/mpath/mpath0p1(0)
LogVol01 VolGroup00 -wi-ao 127.88G                                       /dev/sda2(13756)

check the status of your disks

Sh-3.2# dumpe2fs -h /dev/VolGroup00/LogVol00 |less
Sh-3.2# dumpe2fs -h /dev/VolGroup00/LogVol00 |grep -i superblock (or)
Sh-3.2#tune2fs -l /dev/VolGroup00/LogVol00 | grep -i superblock

and make sure all the device should be unmounted if they are mounted fallow the below steps

Sh-3.2# grep sysimage /proc/mounts

Sh-3.2# umount /mnt/sysimage/selinux
Sh-3.2# umount /mnt/sysimage/dev/pts
Sh-3.2# umount /mnt/sysimage/boot
Sh-3.2# umount /mnt/sysimage/dev
Sh-3.2# umount /mnt/sysimage/proc
Sh-3.2# umount /mnt/sysimage/sys
Sh-3.2# umount /mnt/sysimage

check again whether the devices are mounted or not

Sh-3.2# grep sysimage /proc/mounts

checking the filesystem

Sh-3.2# fsck -nvf /dev/VolGroup00/LogVolXX

The above command will do a “dry-run” to show us what fsck would do.
The below command will fix all the file system issues

Sh-3.2# fsck -yvf /dev/VolGroup00/LogVolXX

It will take long time after completion make sure whether you file system is clean or not by using the below command

Sh-3.2# dumpe2fs -h /dev/VolGroup00/LogVol00 | grep -i state

Sh-3.2#tune2fs -l /dev/VolGroup00/LogVol00 | grep -i state

2 Likes

Hii Raghuu

After booting the system in rescue mode, i am unable to go further ie. when I gave the command
chroot /mnt/sysimage

it is show the error as below
chroot: failed to run command ‘/bin/sh’: No such file or directory.

Please do the needful to fix the same.

Thanks
Kiran.

See if this helps: