Skip to main content

LVM Troubleshooting

 Info: 

A bare grub> prompt means the boot loader started but couldn't find its menu file (grub.cfg). So it doesn't know what to boot. The kernel and your data are almost certainly fine. These two servers most likely had GRUB packages damaged by the original bad run, much like lvm2 was. You can start them by hand from this prompt and then fix the menu.

1. Start the server by hand from grub> (vCenter console, one server at a time):

ls

This lists the disks, for example (hd0) (hd0,msdos1) (hd0,msdos2). The first partition is normally /boot, so:

set root=(hd0,msdos1)
ls /

You should see files starting with vmlinuz- and initramfs-. If you don't, try (hd0,msdos2) or (hd0,gpt2).

Then type these lines. Pressing TAB after vmlinuz- and initramfs- fills in the name, so pick the newest 553.184.1 version:

linux /vmlinuz-4.18.0-553.184.1.el8_10.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap
initrd /initramfs-4.18.0-553.184.1.el8_10.x86_64.img
boot

If it can't find rhel-root, the server's disk group has a different name. In that case, revert that server to its snapshot instead.

2. Once it's up, fix GRUB:

ssh rbb-ref-a-vlim04
sudo -i
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
rpm -q grub2-pc grub2-pc-modules grub2-tools
ls -l /boot/grub2/grub.cfg /boot/loader/entries/
  • If any grub2 package is "not installed":
    dnf install -y grub2-pc grub2-pc-modules grub2-tools --enablerepo=os-base
    
  • If it said BIOS (most likely), rebuild the menu and reinstall the boot code:
    grub2-mkconfig -o /boot/grub2/grub.cfggrub2-install /dev/sda
    
    Use lsblk first to confirm the disk is sda.
  • If it said UEFI, stop and send me the output. The files are in different places, and grub2-install must not be run.

3. Test:

grubby --default-kernel
reboot

It should boot on its own to the 553.184.1 kernel. Check with uname -r.

Then do the same on vlim05.

4. Check the rest before any other reboots:

ansible 'all:!rbb-ref-b-vadmin' -i inventories/ref_rbb/hosts_ref_rbb.yml --ask-vault-pass -u dbv6admin -b -m shell \
  -a "rpm -q grub2-pc grub2-tools; ls -l /boot/grub2/grub.cfg"

Every server should show both packages installed and a grub.cfg that isn't 0 bytes.

If the manual boot doesn't work, revert to the snapshot. That's the safe fallback, and we can fix GRUB before re-patching.

Comments

Popular posts from this blog

Joke of Day

Home / Blog / 35 Cybersecurity Jokes to Make Any Security Geek Chuckle (or Groan) 35 Cybersecurity Jokes to Make Any SecurityGeek Chuckle (or Groan) Posted on September 8, 2020 Last updated on December 13, 2024. Good IT jokes are few and far between, especially when it comes to cybersecurity. That’s why we put on our creativityhats to brainstorm joke after joke – with a break to pull in a few of our favorites from the web – for the ultimate result: themotherlode (or should we say mother board ?) of cybersecurity jokes and puns. P.S.: we side with Alfred Hitchcock on thisone: puns are the highest form of literature. Everyone deserves an eye-catching intro to break the ice at the start of a meeting or spice up a PowerPoint – gotta keepthe CEO’s attention somehow! And no joke is complete without the perfect graphic. Feel free to grab ours and includethem in your next newsletter, quarterly presentation, or for a workday pick-me-up. Without further ado, we present… Our Favorite Cybersecurit...

3/19

 Greetings. The last few days on this weight management program as been a bit crazy.  I had serious cravings.  Then I did some serious yard work then took a shower.  After that I felt like I would faint.  Chiquita and I had to go and get some powerade.  I ate some crackers as well and it seem to help.  Tomorrow back to the weight management grind.  :) G 283.1 lb