OpenSUSE

From Segfault
Jump to navigation Jump to search

Postinstall

Static network configuration

$ cat /etc/sysconfig/network/ifcfg-eth0
STARTMODE=onboot
BOOTPROTO=static
IPADDR=10.0.0.3
NETMASK=255.255.255.0
 
$ cat /etc/sysconfig/network/routes
default 10.0.0.1 - -
 
$ grep ^NETCONFIG_DNS_STATIC /etc/sysconfig/network/config
NETCONFIG_DNS_STATIC_SEARCHLIST="example.com"
NETCONFIG_DNS_STATIC_SERVERS="10.0.0.1"
 
$ cat /etc/HOSTNAME
suse

We also might want to disable those link-local addresses:[1]

$ grep LINKLOCAL_INTERFACES /etc/sysconfig/network/config 
# LINKLOCAL_INTERFACES=...

Restart networking:

$ service network restart

Note: when using DHCP, the machine's hostname might get overwritten by the response from the DHCP server. Set DHCLIENT_SET_HOSTNAME in /etc/sysconfig/network/dhcp to "no" to disable this behaviour.

Packages

Install missing packages:

zypper install  bash-completion bc btrfs-heatmap btrfs-progs compsize curl e2fsprogs git-core iftop iotop-c less lsof man-pages plocate pv rsync screen strace sharutils vim-enhanced wget xfsprogs

For desktop systems:

firefox gedit gnome-keyring libreoffice-writer mozilla-noscript mozilla-privacy-badger openssh-askpass thunderbird vlc


Keep multiple kernel versions

Keep multiple kernel versions:

$ cat /etc/zypp/zypp.conf
[...]
multiversion = provides:multiversion(kernel)
multiversion.kernels = latest,running

This only leaves two kernel versions installed and should be sufficient most of the time.

/tmp on tmpfs

Enable with:

sudo systemctl link /usr/share/systemd/tmp.mount

Remove remaining cruft from /tmp, reboot, and the system should come back with /tmp mounted as tmpfs.

Updating

zypper refresh
zypper update

Upgrading

First we need to update our current repository:

zypper refresh
zypper update

Now we're ready to upgrade to the new release

VER=15.5
zypper modifyrepo --all --disable --no-refresh
zypper addrepo --refresh --name repo-${VER}-oss    http://download.opensuse.org/distribution/leap/${VER}/repo/oss/ repo-${VER}-oss
zypper addrepo --refresh --name repo-${VER}-update http://download.opensuse.org/update/leap/${VER}/oss             repo-${VER}-update

Now the configured repositories should look somewhat like this:

$ zypper repos --uri --show-enabled-only
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias            | Name             | Enabled | GPG Check | Refresh | URI
--+------------------+------------------+---------+-----------+---------+--------------------------------------------------------------
1 | repo-15.5-oss    | repo-15.5-oss    | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.5/repo/oss/
2 | repo-15.5-update | repo-15.5-update | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/update/leap/15.5/oss

Now the actual upgrade can begin:

zypper refresh
zypper dist-upgrade --download-in-advance

Repositories

Adding or removing custom repositories:[2] can be done via Zypper too. Let's say we want to add the utilities repository in an openSUSE Factory installation:

zypper addrepo -f https://download.opensuse.org/repositories/utilities/openSUSE_Factory utilities
zypper refresh

Now the packages in that repository can be installed:

$ zypper search --repo utilities | grep -wc package
933

Bugs

libzypp.so.1439: cannot open shared object file

During an upgrade to Tumbleweed, the Zypper command barfed with:[3]

$ zypper lr --details
zypper: error while loading shared libraries: libzypp.so.1439: cannot open shared object file:

And, in yast:

Internal error. Please report a bug report with logs.
Details: component cannot import namespace 'Pkg'
Caller: /usr/lib64/ruby/vendor_ruby/2.1.0/yast/yast.rb:162:in `import_pure'

The solution was to install the latest zypper packages manually:

rpm --upgrade http://download.opensuse.org/distribution/leap/42.1/repo/oss/suse/x86_64/libsolv-tools-0.6.14-1.1.x86_64.rpm
rpm --upgrade http://download.opensuse.org/distribution/leap/42.1/repo/oss/suse/x86_64/libzypp-15.19.5-1.1.x86_64.rpm
rpm --upgrade http://download.opensuse.org/distribution/leap/42.1/repo/oss/suse/x86_64/zypper-1.12.23-1.1.x86_64.rpm

Links

References