no boot or kernelpanic after update suse 12.2 LVM root partition

Hello,
first of all opensuse good job, i like it and use it… :stuck_out_tongue:

Where to start…
I have an old PC assembled from waste hardware but it does it’s job as a nfs and smb fileserver and a developement PC for web things.
Also it was an opensuse 11.4 zypper dup’ed it to 12.1 and 12.2 of course I will do it for 12.3 as well.
Included going from system V to systemd and from grub to grub2. :nerd:

Well, today I was reminded by the updater (in KDE :shame:, usually has RL 3 only) that there were various updates, so I cancelled the Update and went to the terminal where I did
zypper up
and trillions of updates were listed … I just pressed y - I had to go .
Came home → kernel panic - the system did not boot, neither in the usual kernel nor in failsafe. :’(

But why was this?

facts: bootloader grub2, systemd, suse 12.2

#uname -a - Linux 3.4.28-2.20-desktop #1 SMP PREEMPT Tue Jan 29 16:51:37 UTC 2013 (143156b) i686 i686 i386 GNU/Linux

on a hyperthreaded intel P4

I thought the old harddrive just went to heaven or the Motherboard

the Harddrive /dev/sda and its partitions are setup as LVM so the structure
LVM system
system/root ‘/’
system/var
system/home
system/swap

  • a partition /boot where all the grub stuff is
  • a single drive /dev/sdb set to /media (its the data storage which is exported)

do not ask me why this LVM is like it is, why have ‘/’ on an LVM? well, anyway i guess it was proposed]

The failure booting the system was that the LVM was not recognised by grub2 or the new vmlinux
Let’s say the kernel update did something wrong (at least for grub2)

soooooo…
got into rescue# by CD
from recovering a soft raid I remebered something but LVM is slightly different.

figured the LVM out with

vgscan

→ the answer was that the name was system
did a

vgchange -a y system (when i remember correct)

then discoverd the LVM devices listed in

/dev/mapper/system-root
/dev/mapper/system-var
/dev/mapper/system-home

mounted all into /mnt started with the system and added var and home to it proper place
added the boot partition which is a seperate one into /mnt/boot

and finally the drives were all mounted and assembled as it would be in the system itself
so what now
well

mount --bind /proc /mnt/proc (I think)

and

mount --bind /dev /mnt/dev

followed by

chroot /mnt/

took me into my old filesystem on the assembled LVM drive
then an issued mkinitrd made it a bootable system again.

what waste of 3hrs. time, well but its fun

If this happens to you with a MD raid device the procedure would be similar.
Assemble the raid figure it with mdadm, mount it chroot into it and make a new boot image.

Hmmm… but, the question is?

Why was the running update doing it wrong?

Do you have factory as an active repo? Sounds like it.

Unless you are upgrading you should never get a whole bunch of updates and certainly should not accept them blindly.

Recovery from such a slip can be a problem particularly if you can’t boot.

I had the same issue more or less.

Using a standard 12.2 64 bit, with the normal repos + pacman, I work on this so i want it to be stable, no surprises.
I updated the system two or three days ago and rebooted yesterday.
When it started grub claimed it could not access my hard-disk.
Did a manual boot via grub and installed a new boot loader via Yast.

It is clear that the kernel update messed up my lvm id because the id in grub can not be found any more. Now it points to /dev/hda1 instead.

I use grub, not grub2 btw.

Be careful out there :wink:

On 02/28/2013 01:46 AM, rawiweb wrote:
> zypper up
> and trillions of updates were listed … I just pressed y

if you use “zypper up” with any repos enabled which might
potentially contain conflicting software, then you are headed into
wonderland (and will wonder what happened to your previously working
system!)…

such is the reason that the paragraph in http://tinyurl.com/33qc9vu
which begins with “IMPORTANT” is so very important!!!

now, if you can force yourself to type the second line instead of the
first line


zypper up
zypper patch

you will find that zypper in the latter case will ONLY install those
security patches and major bug updates which wait in the
Non-OSS-Update and Update repos only

that is to say that “zypper patch” will not and can not draw
conflicting software from any or all of the other repos you might
have accidentally left updated and enabled. [check what you have
updating and enabled with the command “zypper lr -d”]

personally, [even with ALL but the magic few SAFE repos disabled]
when i want to update i either run YaST Online Update or “zypper
patch” both of which pull ONLY from the Non-OSS-Update and Update
repos…doing anything else risks failure, depending on what other
software is available in non-update repos and their priorities…


dd
http://tinyurl.com/DD-Caveat

hmm, lets have a look at the repos

gogalthorp Do you have factory as an active repo? Sounds like it.

zypper lr -> ohh factory, yes i have that enabled
so I better do

zypper patch

when in a hurry. :stuck_out_tongue:

Well about the system it is more or less for playing around with and not too Important for me,
never recovered an LVM before though learned something new.

But

joakim_ganse
It is clear that the kernel update messed up my lvm id because the id in grub can not be found any more. Now it points to /dev/hda1 instead.
I use grub, not grub2 btw.

@ joakim - Do you also have factory enabled?

I did not test if the use of zypper up with the factory repo disabled
Would this have done the same?

And 12 days to go to zypper dup the system to 12.3 what will happen?

Well i guess i’ll see.
Greetings

The administrator has specified that you can only edit messages for 10 minutes after you have posted. This limit has expired, so you must contact the administrator to make alterations on your message.

↑ can you make it 20 minutes for me please ↑

Well i saw that the factory repo was disabled @ joakim
The usual save ones did the same as well.

The reason for the limit is because 10 min is the time that the message is sent out to those that don’t use the web interface so it need to be locked down.

Nope, I only have the standard 12.2, Packman and Nvidia repos. Never touched factory.

The common ground her might be that I have upgraded the system from 11.3 or maybe it was from 11.4.
Also my boot partition is ext2, not sure if that has anything to do with it but grup2 doesn’t like it so I still use Grub.

I just find this strange and hopefully it only hits people that have upgraded LVM systems.

After fixing Grup so it boots the initial ram disk still pointed wrong.
In the menu I had this: /boot/initrd-3.4.28-2.20-desktop-kdump and it should have been /boot/initrd-3.4.28-2.20-desktop

On 2013-03-01 21:06, rawiweb wrote:
> ↑ can you make it 20 minutes for me please ↑

Impossible.

Hint: read about nntp in the forum FAQ.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 2013-03-05 14:26, joakim ganse wrote:
> Also my boot partition is ext2, not sure if that has anything to do
> with it but grup2 doesn’t like it so I still use Grub.

ext2 is the recommended filesystem for separate /boot partitions. I had
no idea that grub2 has problems with this.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

That’s news to me. I use “ext2” for “/boot” and I use grub2. I have not run into any problems with this.

First I have to admit I am no expert on file systems, grub, kernel etc. Just a happy user that enjoys the freedom.

The thing I tried when running into problems was grub2-install and this is the error message:
grub2-install /dev/sda1
/usr/sbin/grub2-bios-setup: warning: File system `ext2’ doesn’t support embedding.
/usr/sbin/grub2-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged…
/usr/sbin/grub2-bios-setup: error: will not proceed with blocklists.

I minght very well be doing the wrong thing but to me install sounds like the thing to do when the boot-loader is missing :confused:

Use grub2-install --force

I would never use a force switch. That is to me as bad as using a non stable repository.