Mailing List Archive

Help!!! My system won't boot. (?lvm?) :-(
Hello, Gentoo.

My system isn't booting. In particular, most of the SSD partitions
won't mount, because they are not under /dev any more. The root
partition, /dev/md125 mounts, but that is all.

These partitions are lvm partitions under RAID-1 (software RAID). They
simply fail to appear in /dev/mapper on boot up. (I don't remember the
exact error message, here).

I've managed to bring my system up using a Rescue-DVD followed by
chroot. This shows that the partions on the SSD are basically
undamaged.

I strongly suspect that my emerge update from last night is to blame.
There, lvm2-2.03.17-r1 was reinstalled after other packages
(dependencies) were updated. The order of these packages, taken from
/var/log/emerge.log was:

1. dev-libs/mpfr-4.1.1_p1
2. dev-lang/mujs-1.3.2
3. sys-apps/util-linux-2.38.1
4. sys-apps/systemd-utils-251.10
5. dev-python/installer-0.6.0
6. app-text/lib-paper-2.0.4
7. app-misc/ca-certificates-20211016.3.86
8. sys-fs/lvm2-2.03.17-r1

.. There were a few more packages after that, a total of 23. If any of
these is relevant, then it is surely 3. or 4. lvm2 itself was merely
rebuilt.

I've had a quick scan of the gentoo bugzilla, but not found anything
relevant there.

Please help me get my system booting again!

Thanks!

--
Alan Mackenzie (Nuremberg, Germany).
Re: Help!!! My system won't boot. (?lvm?) :-( [ In reply to ]
Alan Mackenzie <acm@muc.de> writes:

> My system isn't booting. In particular, most of the SSD partitions
> won't mount, because they are not under /dev any more. The root
> partition, /dev/md125 mounts, but that is all.
>
> These partitions are lvm partitions under RAID-1 (software RAID). They
> simply fail to appear in /dev/mapper on boot up.
>
> I've managed to bring my system up using a Rescue-DVD followed by
> chroot. This shows that the partions on the SSD are basically
> undamaged.
>
> I strongly suspect that my emerge update from last night is to blame.

It was.

Been there, done that myself.

Mount your filesystems from the rescue boot and chroot into them.

Re-emerge lvm2 with the "lvm" flag enabled.

See
https://www.gentoo.org/support/news-items/2022-11-19-lvm2-default-USE-flags.html

Some of these commands (or similar) in the rescue boot might be helpful:

mkdir -p /mnt/{usr,var,home,work,boot,dev,sys,proc}

mount /dev/mapper/vg0-root /mnt
mount /dev/mapper/vg0-usr /mnt/usr
mount /dev/mapper/vg0-var /mnt/var
mount /dev/mapper/vg1-home /mnt/home
mount /dev/mapper/vg1-work /mnt/work

mount /dev/sda1 /mnt/boot

mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /dev/shm /mnt/dev/shm
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc

PATH=/bin:/sbin:/usr/bin:/usr/sbin \
SHELL=/bin/bash \
chroot /mnt

--
Alan J. Wylie https://www.wylie.me.uk/

Dance like no-one's watching. / Encrypt like everyone is.
Security is inversely proportional to convenience
Re: Help!!! My system won't boot. (?lvm?) :-( [ In reply to ]
Hello, Alan.

On Wed, Jan 11, 2023 at 20:16:07 +0000, Alan J. Wylie wrote:
> Alan Mackenzie <acm@muc.de> writes:

> > My system isn't booting. In particular, most of the SSD partitions
> > won't mount, because they are not under /dev any more. The root
> > partition, /dev/md125 mounts, but that is all.

> > These partitions are lvm partitions under RAID-1 (software RAID). They
> > simply fail to appear in /dev/mapper on boot up.

> > I've managed to bring my system up using a Rescue-DVD followed by
> > chroot. This shows that the partions on the SSD are basically
> > undamaged.

> > I strongly suspect that my emerge update from last night is to blame.

> It was.

> Been there, done that myself.

> Mount your filesystems from the rescue boot and chroot into them.

> Re-emerge lvm2 with the "lvm" flag enabled.

Many thanks, indeed! That was the cause of my problem, and re-emerging
lvm2 with that USE flag set solved it completely.

> See
> https://www.gentoo.org/support/news-items/2022-11-19-lvm2-default-USE-flags.html

Yes. There was even a news item about it back in November. I've read
it again, and it seems too vague to me. For example, it says:

>>> If you use LVM2 for any partitions, or if you use tools like
>>> 'lvchange', you should enable USE=lvm.

, without saying in detail anywhere what it means to "use" LVM2. I
wasn't aware of "using" LVM2 when I read that news item, so I just
carried on, blithely unaware of the coming catastrophe. ;-)

Still, it's OK, now.

> Some of these commands (or similar) in the rescue boot might be helpful:

> mkdir -p /mnt/{usr,var,home,work,boot,dev,sys,proc}

> mount /dev/mapper/vg0-root /mnt
> mount /dev/mapper/vg0-usr /mnt/usr
> mount /dev/mapper/vg0-var /mnt/var
> mount /dev/mapper/vg1-home /mnt/home
> mount /dev/mapper/vg1-work /mnt/work

> mount /dev/sda1 /mnt/boot

> mount -o bind /dev /mnt/dev
> mount -o bind /dev/pts /mnt/dev/pts
> mount -o bind /dev/shm /mnt/dev/shm
> mount -o bind /sys /mnt/sys
> mount -o bind /proc /mnt/proc

> PATH=/bin:/sbin:/usr/bin:/usr/sbin \
> SHELL=/bin/bash \
> chroot /mnt

Thanks for that, too. I actually created a small script with commands
like these when I was installing Gentoo ~5 years ago, and I adapted
that, saving the heavy labour of working out again that the flag in
mount that I need is -o bind. :-)

> --
> Alan J. Wylie https://www.wylie.me.uk/

> Dance like no-one's watching. / Encrypt like everyone is.
> Security is inversely proportional to convenience

--
Alan Mackenzie (Nuremberg, Germany).