0

Here is the message i get

I was upgrading Ubuntu 12.04.1 to 12.04.05 and the kernel upgrade from 3.8.0.29 to 3.8.0.44 using diet-upgrade. The system won't boot back in to the new kernel as i cannot find the rootvg

Gave up waiting for root device. Common problems: -Boot args (cat /proc/cmdline) - Check root delay = (did the system wait long enough?) - Check root= (did the system wait for the right device?) - Missing Modules (cat /proc/modules; ls /dev) Alert! /dev/mapper/rootvg-root does not exist. Dropping to a shell

(initramfs)

I tried using a live cd to boot the system and did the below tasks

  1. Boot Live CD
  2. Mount /dev/mapper/rootvg-root /newroot
  3. Chroot /newroot
  4. Tried to reinstall lvm2 and it said it was successful and recreated initrd.img
  5. Update-initramfs -u

It won't reboot. Can you throw me some pointers what would be happening?

Ram Ram
  • 11

1 Answers1

1

I am able to mount the rootvg from a rescue CD to booting into a shell just before partitioning starts

  1. mkdir /newroot Mount the Root volume to /newroot
  2. mount /dev/mapper/rootvg-root /newroot Mount the boot partition

    mount /dev/sda1 /newroot/boot

Mount the var volume

mount /dev/mapper/rootvg-var /newroot/var

Chroot the environment

chroot /newroot

Once chroot you have access to all the tools installed in the system including apt-get, aptitude, zcat etc

Use Zcat to read the initrd.img archive to find if the lvm module got added to sbin/

zcat /boot/initrd.img-3.8.0-44-generic | cpio --extract --verbose --list | fgrep lvm


sbin

sbin/rmmod

sbin/mount.ntfs-3g -> /bin/ntfs-3g

sbin/blkid

sbin/udevd

sbin/mount.fuse

sbin/hwclock

sbin/modprobe

sbin/wait-for-root

sbin/dumpe2fs

sbin/udevadm

sbin/dmsetup

sbin/mount.ntfs -> /bin/ntfs-3g

I cannot find lvm in the image sbin and that's reason for it not able to import the VG and mount the volume.

Correct initrd image should like this

sbin

sbin/rmmod

sbin/mount.ntfs-3g -> /bin/ntfs-3g

sbin/blkid

sbin/udevd

sbin/mount.fuse

sbin/hwclock

sbin/modprobe

sbin/wait-for-root

sbin/dumpe2fs

sbin/udevadm

sbin/lvm

sbin/mount.ntfs -> /bin/ntfs-3g

Update the following file to force load the module

echo "lvm" >> /etc/initramfs-tools/modules

This will create a new initramfs image

initramfs-update -k -c all

Verify the lvm module got added to the image using

zcat /boot/initrd.img-3.8.0-44-generic | cpio --extract --verbose --list | fgrep lvm

Exit chroot

exit

reboot

Server came back fine.

Ram Ram
  • 11