Mailinglist Archive: opensuse (795 mails)

< Previous Next >
Re: [opensuse] These packages need to be selected to install: grub2
  • From: Dennis Gallien <dwgallien@xxxxxxxxx>
  • Date: Wed, 01 Nov 2017 16:57:12 -0400
  • Message-id: <4605135.8byEINj3G7@alien-suse>
On Wednesday, November 1, 2017 3:35:53 PM EDT Felix Miata wrote:
Dennis Gallien composed on 2017-11-01 15:01 (UTC-0400):
Felix Miata wrote:
I don't have Grub2 on any of my many openSUSE installations of TW, 42.3
or
older, though all machines are multiboot (all with generic MBR code),
making boot repair necessary very rarely, and easy to do. This I type on
is one, 42.3 on RAID1, which like several others, is a direct upgrade
from 42.1 using Zypper dup with Grub2 locked out via Zypper.

Online upgrade from 42.2 to 42.3 differs very little from doing ordinary
online security updates. Both even use 4.4 kernels. I start mine by first
booting to multi-user.target, logging in as root, locking the kernel,
editing the repo files in /etc/zypp/repos.d/ to point to 42.3 instead of
42.[1,2], then 'zypper ref', then upgrading only the fundamentals, via

script containing:
zypper -v in zypper libzypp libsolv-tools rpm openSUSE-release
zypper -v in device-mapper dmraid glibc lvm2 mdadm systemd udev

Only then do I follow with:
zypper -v up
zypper -v dup
zypper -v in kernel-default

This procedure has proven superbly reliable for me over several years,
probably back at least to around 11.2 or 11.3.

Interesting. Which method do you use to boot to multi-user target; does
that matter?

Most of my Grub stanzas end with " 3 ". With Grub Legacy and GFXboot, it's
trivial to backspace away the 3 and let the default target proceed, or
change it to a 5, to ensure seeing the KDM, TDM or KDM3 greeter if it isn't
somehow broken.

As to mattering, I like to keep Xorg shut down while doing any kind of
updates, so don't really know any ramifications of keeping it running while
updating.
And how do you lock the kernel from the command line; I'm not
familiar with that?

# zypper al grub2
# zypper ll | grep gru
30 | grub2 | package | (any)

"Package Locks Management" is deep in the zypper man page.

Alternatively, 'zypper al *rub2*' should lock out every package that
includes the string rub2. If you really want to be picky, also lock
os-prober and shim, and search for every package that includes the string
grub2 and lock each separately, but the simple al grub2 seems adequate for
42.3:
# rpmqa grub
grub-0.97-210.3.x86_64
ruby2.1-rubygem-cfa_grub2-0.6.2-1.4.x86_64
# alias | grep qa
alias rpmqa='rpm -qa | sort | grep '

One more thing I do regardless of type of updating I'm doing, is setting the
immutable bit (with chattr) on every initrd that has proven successful at
least once:
# lsattr /boot/initrd-4.*
----i--------e-- /boot/initrd-4.4.76-1-default
----i--------e-- /boot/initrd-4.4.85-22-default
----i--------e-- /boot/initrd-4.4.87-25-default


For some reason I was thinking I had to use systemctl, I didn't realize I
could still use the runlevel number on the grub boot line since systemd. That
will do me fine. And I confess that upgrading via YaST has had me spoiled for
so many years that I haven't learned zypper as well as I need to. I'll digest
your suggestions and come up with a strategy that works best for me. Thanks
again, Felix.




--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >