"no volume groups found" after reinstalling GRUB

Hello,

I have notebook with opensuse 12.1, which is installed on encrypted LVM which consists of two parts - / (root) and /home. /boot is installed on not encrypted and not-LVM partition, format ext4. also I had dead windows installation, and I wanted to reinstall it, for playing some games.
my old partitioning:
/dev/sda1 - hidden “system restore” partition (default for almost all notebooks with preinstalled windows), 20 GB
/dev/sda2 - old windows partition, 40 GB
/dev/sda3 - boot partition, ~250 MB
/dev/sda*(all other partitions) - LVM, 400 GB ("/" 150 GB, “/home” 250 GB)

my actions:

  1. under opensuse, in the Yast menu, I’ve deleted old windows (/dev/sda2) and system restore (/dev/sda1) partitions and created single partition for new windows installation - 60 GB, formatting as FAT32 and choosing “do not mount” option.

  2. I’ve installed windows (thus needed to reinstall GRUB because windows has killed it with own bootloader), selecting that 60 GB partition in the installation menu and formatting it to NTFS.

  3. inserted opensuse 12.1 installation disk in order to repair bootloader, rebooted the notebook

  4. booted from the disk, chose installation, but haven’t found “repair system” in the installation menu (AFAIR it was there in early 11.x’s), only new install and update. So i’ve selected new installation, but after some preparations, installer showed me an error in the boot loader section:
    “Because of the partitioning, the boot loader cannot be installed properly”.

  5. having googled that error I’ve found such solution - boot into the rescue mode and reinstall grub with:
    grub
    find /boot/vmlinuz (this showed me the partition named hd0,1)
    setup (hd0,1)
    reboot

5.1. so I’ve reinstalled grub with these commands and rebooted the notebook.

  1. after rebooting, grub said something about “could not load (hd0,2)/message” and showed the text-mode menu, with all my old sections. But all these sections were unbootable - grub was returning an error like “filesystem type unknown, partition type 0x8e …” and something about being unable to boot partition (hd0,2). Then i’ve understood that by merging old system restore (hd0,0 in grub’s numeration) and windows (hd0,1) partitions they became “hd0,0” and old /boot became “hd0,1”, not “hd0,2”. So i’ve took good old Hiren’s BootCD and rebooted the notebook, then booting up from this LiveCD.

  2. i’ve selected RIPLinux in Hiren’s menu, then under RIPLinux i’ve mounted my old /boot and edited /boot/grub/menu.lst, changing all hd0.x’s to one partition less:


default 0
timeout 8
# old # gfxmenu (hd0,2)/message
gfxmenu (hd0,1)/message

title Desktop -- openSUSE 12.1 - 3.1.0-1.2
# old #   root (hd0,2)
    root (hd0,1)
    kernel /vmlinuz-3.1.0-1.2-desktop root=/dev/zuzelvm/root splash=verbose showopts vga=0x314
    initrd /initrd-3.1.0-1.2-desktop

title Failsafe -- openSUSE 12.1 - 3.1.0-1.2
# old #   root (hd0,2)
    root (hd0,1)
    kernel /vmlinuz-3.1.0-1.2-desktop root=/dev/zuzelvm/root showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x314
    initrd /initrd-3.1.0-1.2-desktop

title Windows
# old #   rootnoverify (hd0,1)
    rootnoverify (hd0,0)
    chainloader +1

  1. then I rebooted and at last grub showed me the graphical-mode menu, but it appeared that the only working section is windows’ chainloader.
    when I’m trying to boot both default and failsafe opensuse the boot process goes into infinite loop with messages like this:

waiting for all devices to appear… (cant remember exact phrase)
No volume group found.
Volume group “zuzelvm” not found.
No volume group found.
Volume group “zuzelvm” not found.
No volume group found.
Volume group “zuzelvm” not found.
No volume group found.
Volume group “zuzelvm” not found.
No volume group found.
Volume group “zuzelvm” not found.
No volume group found.
Volume group “zuzelvm” not found.
(infinite loop)

and the only possible way to stop that madness is Ctrl+Alt+SysRq+REISUB.

I’ve googled a bit and found the possible way to fix that problem - boot the system and run:
/sbin/pvscan
/sbin/vgscan -v (to find LVM)
/sbin/vgchange -ay -v (to activate LVM)
/sbin/vgdisplay -v (to find path of LVM)
/sbin/lvchange -ay -v /dev/path/to/LVM
/sbin/mount /dev/path/to/LVM /where/to/mount

but the problem is - I have root filesystem ("/") inside the LVM (note that it is also encrypted). I’ve tried to boot opensuse in the single-mode(I mean with “init=/bin/sh” parameter), but I’m still getting this error about “Volume group “zuzelvm” not found.”

As i think, all partitions have got one less number (i.e. /dev/sda3 became /dev/sda2, /dev/sda5 became /dev/sda4, etc), that’s why the LVM cannot initialize.

So how could I restore my LVM?
I really hope for your help, because now I have absolute unusable system (I mean windows, lol) and one month old backups (I did a lot of work over that month so I don’t want to reinstall opensuse losing all data changes).

Thanks in advance.

Kai

//side questions: how could I format partitions to NTFS under opensuse, and why knotify4 sometimes eats 100% cpu?

I’m not sure that I understand all of your problems.

Try booting from a live CD or a rescue CD, and then do something like:


cryptsetup luksOpen /dev/sda6 lvmsys
vgscan        ## scan for volume groups
vgchange -a y ## activates the volume groups
ls /dev/mapper  ## see what the names are
mount /dev/mapper/system-root /mnt
mount /dev/mapper/system-home /mnt/home

You will have to change some of the details to match your partitions and volume group names.

That should allow you to see what is there.

When booting, you should have been prompted for the encryption key. If you were not, then something is broken in your “initrd” file.

thanks, I’ll try that to take my data from LVM.
But how could I fix my opensuse installation? I don’t want to reinstall it.

yes, boot process always asked for a password, but after showing about 50 lines of boot log (waiting for devices, loading drivers, etc). Now it shows about 5-7 lines (with last line like “waiting for all devices to appear”) and then goes for “No volume group found. Volume group “zuzelvm” not found.” repeating it forever.

It sounds as if the LVM is corrupt, and not recognized. You might not have a choice about reinstalling.

d’oh, but I haven’t even touched LVM’s partitions.

am I right? maybe running mkinitrd with the rescue cd will help.

I missed that possibility of partition renumbering. You can check that, using “fdisk” from a liveCD or rescue boot.

The partition name for primary partitions depends on which slot is used in the partition table. For logical drives in the extended partition, then name usually doesn’t change when you delete something.

If you can get access to the partitions using the methods I gave in an earlier post, it is possible to repair the problem. Post the output of


fdisk -l /dev/sda

and put it in a code block. Also, if you have access that way, post the output of “/etc/crypttab”.

well, seems that you are right and my LVM was damaged.
I’ve tried to run opensuse installation disk again, but now it haven’t said than old linux installations found, and haven’t prompted the LVM password while scanning for hardware.
in the bootloader menu button “import partitions” said something like “no older installations found”, but when I tried it before, it was loading my old partitioning (/dev/sda2 as boot and LVE divided into / and /home).

I’ve booted livecd and tried to run vgscan, lvscan, cryptsetup, etc, and all tools said me that no volume groups found (running these tools with double verbosity -vv showed that there is no LVM on /dev/sda3) but parted shows that /dev/sda3 device has “lve” flag on it.
I remember that my LVE consisted of several partitions, afair from /dev/sda3 to /dev/sda6, with the sizes like 120GB, 70GB, etc, resulting in 400GB total, and now parted and other partition tools show only /dev/sda3 partition with the size of 400GB.

so I have reinstalled opensuse, losing a lot of changes and, which is almost as important as /home, losing local repository with huge amount of compiled software (I did backups only of /home, not the repo), and also losing all my 8 virtual machines with different OSes (6 *nix and 2 *ndows, while *ndows VMs was licensed, and duno if I could reinstall them using old serial keys - I have activated them via Internet after the installation so keys might not work now), which I haven’t backuped too. to say that i’m upset now is to say nothing.

nrickert, thanks a lot for trying to help me.
I’d like to suggest one thing to all fellow opensuse users:

MAKE THE BACKUP OF ALL IMPORTANT DATA BEFORE DOING ANYTHING WITH HARD DISK!!! (e.g. installing new OS, resizing partition size, etc).

I still have two side questions - how could I format drives to NTFS under opensuse, and how could I deal with knotify eating 100% cpu eventually?
I’ve made a workaround before:

          • root killall -9 knotify4
            in the crontab, and then opensuse was running nice, without loading cpu.

Yes, that’s good advice.

If possible, arrange your schedule so that major changes to disk are done just before a planned new install. And regularly backup any important data.

I mainly backup “/home” and a few config files in “/etc”. But, before a major change on my primary system, I also backup the root partition. I have never needed to restore from that, but it is useful if I have forgotten an important configuration detail.

I doubt that it is possible. Even if possible, my advice would be to format with Windows.

Some time ago (back when running 11.4), I used:

Personal Settings → Application and System Notifications → Player settings (a tab at top)

and I set that to “No audio output”. Since that change, knotify has not been a drag on resources.

thanks, seems that it works.