Posts

Showing posts with the label Recovery

Recovering or restoring grub in CentOS or RHEL 7

Image
What if GRUB is corrupted on your RHEL or CentOS 7 ? GRUB corruption is a common problem in RHEL or CentOS, which could occur due these reasons: If any file is missing or deleted from "/boot/grub2/" folder e.g. "grub.cfg" Mistakenly ran "dd" utility to clear boot sector Due to bad sector or corrupted disk Bad or incompatible firmware/driver installation  e.t.c. In case GRUB is corrupted, usually after powering on your server you see below kind of shell, also known as GRUB shell: Once you get to this prompt there is a way to restore or recover GRUB so that your system can boot up properly. To recover GRUB we need to have RHEL or CentOS 7 ISO image, which we usually use for OS installation. Make sure you mount same OS version iso image which is already installed on system. Below procedure will work only on BIOS based X86 servers and virtual machines. Follow these steps to recover GRUB: Step 1 : Mount RHEL or CentOS 7 ISO image ...

How to recover bad partition or superblock on Ext3 partition ?

How to recover bad partition or superblock on Ext3 partition ? What if you are getting below two errors ? 1. /dev/sdb2: Input/output error 2. mount: /dev/sdb2: can't read superblock Steps : 1. If you can go to Emergency Mode in the Linux and it directely asking for password or else Go to rescue mode, by booting with 1st Linux cd or a DVD then on "boot:" prompt "linux rescue" and press enter. 2. Unmount the partition first on which you getting the error. 3. Next find out bad superblock to recover, #dumpe2fs /dev/sdb2 | grep superblock Sample Output : ------------------------------------------------------------------ Primary superblock at 0, Group descriptors at 1-6   Backup superblock at 32768, Group descriptors at 32769-32774   Backup superblock at 98304, Group descriptors at 98305-98310   Backup superblock at 163840, Group descriptors at 163841-163846   Backup superblock at 229376, Group descriptors at 229377-229382 ...