How to upgrade openSUSE 15.5 to 15.6 using the cli

The following note shows how to use Zypper to do a live distribution upgrade of openSUSE Leap 15.5 to openSUSE Leap 15.6. thounchey3:~ # cat /etc/os-release NAME="openSUSE Leap" VERSION="15.5" ID="opensuse-leap" ID_LIKE="suse opensuse" VERSION_ID="15.5" PRETTY_NAME="openSUSE Leap 15.5" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:15.5" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap" LOGO="distributor-logo-Leap" Check for the 3 required repositories, ensure they are enabled.` thounchey3:~ # zypper lr -u Repository priorities are without effect. All enabled repositories share the same priority. # | Alias | Name | Enabled | GPG Check | Refresh | URI ---+-----------------------------+---------------------------------------------------------------------------------------------+---------+-----------+---------+------------------------------------------------------------------------ 1 | repo-backports-debug-update | Update repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports | No | ---- | ---- | http://download.opensuse.org/update/leap/15.5/backports_debug/ 2 | repo-backports-update | Update repository of openSUSE Backports | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.5/backports/ 3 | repo-debug | Debug Repository | No | ---- | ---- | http://download.opensuse.org/debug/distribution/leap/15.5/repo/oss/ 4 | repo-debug-non-oss | Debug Repository (Non-OSS) | No | ---- | ---- | http://download.opensuse.org/debug/distribution/leap/15.5/repo/non-oss/ 5 | repo-debug-update | Update Repository (Debug) | No | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.5/oss/ 6 | repo-debug-update-non-oss | Update Repository (Debug, Non-OSS) | No | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.5/non-oss/ 7 | repo-non-oss | Non-OSS Repository | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/15.5/repo/non-oss/ 8 | repo-openh264 | Open H.264 Codec (openSUSE Leap) | Yes | (r ) Yes | Yes | http://codecs.opensuse.org/openh264/openSUSE_Leap/ 9 | repo-oss | Main Repository | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/15.5/repo/oss/ 10 | repo-sle-debug-update | Update repository with debuginfo for updates from SUSE Linux Enterprise 15 | No | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.5/sle/ 11 | repo-sle-update | Update repository with updates from SUSE Linux Enterprise 15 | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.5/sle/ 12 | repo-source | Source Repository | No | ---- | ---- | http://download.opensuse.org/source/distribution/leap/15.5/repo/oss/ 13 | repo-update | Main Update Repository | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.5/oss/ 14 | repo-update-non-oss | Update Repository (Non-Oss) | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.5/non-oss/ thounchey3:~ # zypper refresh Repository 'Update repository of openSUSE Backports' is up to date. Repository 'Non-OSS Repository' is up to date. Repository 'Open H.264 Codec (openSUSE Leap)' is up to date. Repository 'Main Repository' is up to date. Repository 'Update repository with updates from SUSE Linux Enterprise 15' is up to date. Repository 'Main Update Repository' is up to date. Repository 'Update Repository (Non-Oss)' is up to date. All repositories have been refreshed. thounchey3:~ # zypper update Loading repository data... Reading installed packages... Nothing to do. thounchey3:~ # grep baseurl /etc/zypp/repos.d/*.repo | grep -v releasever [1321/1321] /etc/zypp/repos.d/repo-openh264.repo:baseurl=http://codecs.opensuse.org/openh264/openSUSE_Leap/ thounchey3:~ # zypper --releasever=15.6 refresh Warning: Enforced setting: $releasever=15.6 Retrieving repository 'Update repository of openSUSE Backports' metadata ..........................................................[done] Building repository 'Update repository of openSUSE Backports' cache ...............................................................[done] Retrieving repository 'Non-OSS Repository' metadata ...............................................................................[done] Building repository 'Non-OSS Repository' cache ....................................................................................[done] Repository 'Open H.264 Codec (openSUSE Leap)' is up to date. Retrieving repository 'Main Repository' metadata ..................................................................................[done] Building repository 'Main Repository' cache .......................................................................................[done] Retrieving repository 'Update repository with updates from SUSE Linux Enterprise 15' metadata .....................................[done] Building repository 'Update repository with updates from SUSE Linux Enterprise 15' cache ..........................................[done] Retrieving repository 'Main Update Repository' metadata ...........................................................................[done] Building repository 'Main Update Repository' cache ................................................................................[done] Retrieving repository 'Update Repository (Non-Oss)' metadata ......................................................................[done] Building repository 'Update Repository (Non-Oss)' cache ...........................................................................[done] All repositories have been refreshed. thounchey3:~ # zypper --releasever=15.6 dup --download-in-advance Warning: Enforced setting: $releasever=15.6 Loading repository data... Reading installed packages... Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command. Computing distribution upgrade... The following 163 packages are going to be upgraded: ansible apparmor-abstractions apparmor-parser apparmor-profiles bind-utils branding-openSUSE cracklib cracklib-dict-small crypto-policies curl dracut dracut-mkinitrd-deprecated e2fsprogs fipscheck firewalld fish gettext-runtime gio-branding-openSUSE girepository-1_0 git git-core glib2-tools glibc glibc-devel glibc-locale glibc-locale-base gpg2 grub2 grub2-branding-openSUSE grub2-i386-pc grub2-x86_64-efi haveged htop hwloc-data ipset jeos-firstboot kmod krb5 less libapparmor1 libargon2-1 libaugeas0 libblkid1 libbsd0 libcom_err2 libcontainers-common libcontainers-default-policy libcrack2 libcryptsetup12 libcurl4 libdevmapper1_03 libext2fs2 libfdisk1 libfido2-1 libfido2-udev libfipscheck1 libgcrypt20 libgio-2_0-0 libgirepository-1_0-1 libglib-2_0-0 ... ... dracut[I]: *** Stripping files *** dracut[I]: *** Stripping files done *** dracut[I]: *** Creating image file '/boot/initrd-6.4.0-150600.21-default' *** dracut[I]: *** Creating initramfs image file '/boot/initrd-6.4.0-150600.21-default' done *** Running post-transaction scripts ..................................................................................................[done] There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these programs. Since the last system boot core libraries or services have been updated. Reboot is suggested to ensure that your system benefits from these updates. reboot ❯ cat /etc/os-release NAME="openSUSE Leap" VERSION="15.6" ID="opensuse-leap" ID_LIKE="suse opensuse" VERSION_ID="15.6" PRETTY_NAME="openSUSE Leap 15.6" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:15.6" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap" LOGO="distributor-logo-Leap" Reference: ...

June 12, 2024 · 4 min · 785 words · kenno

Delete unused ENIs on AWS with AWS CLI

So I want to clean up Elastic Network Interfaces (ENIs) that were created for testing and no longer needed, and I want to use AWS CLI to do that. For me, I know that all unused ENIs will have their status as “available”. So I will find all those ENIs and will delete them. ➜ aws ec2 describe-network-interfaces --filters Name=status,Values=available \ --query 'NetworkInterfaces[].{NetworkInterfaceId:NetworkInterfaceId,Description:Description}' [ { "NetworkInterfaceId": "eni-0dc616df583312345", "Description": "2nd nic in 2b az" }, { "NetworkInterfaceId": "eni-0bf98b53cf1b12345", "Description": "2nd nic" }, { "NetworkInterfaceId": "eni-034bcff8ceef12345", "Description": "test-eni" }, { "NetworkInterfaceId": "eni-09adbc3a20c912345", "Description": "Test 2nd eni on custom subnet 2a AZ" } ] Next, I need to feed each of the values of “NetworkInterfaceId” to the delete command aws ec2 delete-network-interface, which takes only 1 NetworkInterfaceId at a time. ...

June 9, 2024 · 2 min · 271 words · kenno

Installing Xe Guest Utilities on OpenSUSE Leap 15.5

This is a quick note on how to install xe-guest-utilities on OpenSUSE Leap 15.5. Unlike other distros like AlmaLinux where xe-guest-utilities is provided by EPEL repository, on OpenSUSE Leap, this package is available in the guest-tools.iso disk. At least, I was not able to find any similar package on OpenSUSE’s repositories which provide this Xe guest utilities. Therefore, we first need to attach the guest-tools.iso disk to the VM. On Xen Orchestra web ui, perform the following: ...

June 2, 2024 · 2 min · 382 words · kenno

Wicked keeps DUID on OpenSuse 15 even when NIC is replaced

I have migrated a VM running on Proxmox to Xcpng host. Despite the imported VM on Xcpng has a new NIC with new MAC address, it still retained old IP address asssigned to the old MAC of the VM running on Proxmox. The VM is running OpenSUSE Leap 15.5 and use wicked for network management. How to fix this? Spoiler alert, I figured out how to fix it. First, let’s run some commands to display some information. Here, the new MAC address for eth0 NIC is 12:ea:4c:8f:34:f2. The IP addres 192.168.1.132 is allocated by DHCP service running on OPNsense router for a device with MAC 02:14:98:8a:c5:2c. ...

May 31, 2024 · 2 min · 395 words · kenno

How to upgrade FreeBSD 13.2 to 14.0

I just found out that FreeBSD 13.2-RELEASE will be end-of-life support within 1 month time from now. It’s time to upgrade FreeBSD on one of nas boxes to 14.0-RELEASE. The following is to capture the steps used to perform the upgrade. It’s similar to my old post. SSH into the server, and run tmux or screen. You really don’t want to lose SSH connection during the upgrade. $ ssh kenno@nas2 $ tmux Check the current running version of FreeBSD: root@nas2:~ # freebsd-version 13.2-RELEASE-p11 Make sure the system is up-to-date with all the patches: root@nas2:~ # freebsd-update fetch root@nas2:~ # freebsd-update install root@nas2:~ # pkg update root@nas2:~ # pkg upgrade Upgrade FreeBSD from 13.2 to 14.0 root@nas2:~ # freebsd-update -r 14.0-RELEASE upgrade src component not installed, skipped Looking up update.FreeBSD.org mirrors... 3 mirrors found. Fetching metadata signature for 13.2-RELEASE from update1.freebsd.org... done. Fetching metadata index... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/generic kernel/generic-dbg world/base world/lib32 The following components of FreeBSD do not seem to be installed: world/base-dbg world/lib32-dbg Does this look reasonable (y/n)? y Fetching metadata signature for 14.0-RELEASE from update1.freebsd.org... done. Fetching metadata index... done. Fetching 1 metadata patches. done. Applying metadata patches... done. Fetching 1 metadata files... done. Inspecting system... Wait for a long while… then when the update process detects changes in some important files, I’m asked to decide what to do by editing that file, pick the desired changes, and save them. For example: The following changes, which occurred between FreeBSD 13.2-RELEASE and [0/143] FreeBSD 14.0-RELEASE have been merged into /etc/ssh/sshd_config: --- current version +++ new version @@ -87,11 +87,11 @@ #UsePAM yes #AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no -#X11Forwarding yes +#X11Forwarding no #X11DisplayOffset 10 #X11UseLocalhost yes #PermitTTY yes #PrintMotd yes #PrintLastLog yes @@ -104,11 +104,11 @@ #PidFile /var/run/sshd.pid #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20230719 +#VersionAddendum FreeBSD-20231004 # no default banner path #Banner none # override default of no subsystems Does this look reasonable (y/n)? y The following changes, which occurred between FreeBSD 13.2-RELEASE and FreeBSD 14.0-RELEASE have been merged into /etc/sysctl.conf: --- current version +++ new version @@ -1,6 +1,5 @@ -# $FreeBSD$ # # This file is read when going to multi-user and its contents piped thru # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. # Does this look reasonable (y/n)? y To install the downloaded upgrades, run "/usr/sbin/freebsd-update install". Perform the update by running the above suggested command. root@nas2:~ # /usr/sbin/freebsd-update install src component not installed, skipped Creating snapshot of existing boot environment... done. Installing updates... Kernel updates have been installed. Please reboot and run "/usr/sbin/freebsd-update install" again to finish installing updates. I guess we know what to do next… root@nas2:~ # reboot Connection to nas2 closed by remote host. Connection to nas2 closed. Reconnect to the server with SSH. There is no need to run ’tmux’ session this time. root@nas2:~ # /usr/sbin/freebsd-update install src component not installed, skipped Creating snapshot of existing boot environment... done. Installing updates...rm: ///usr/include/c++/v1/__string: is a directory Restarting sshd after upgrade Performing sanity check on sshd configuration. Stopping sshd. Waiting for PIDS: 863. Performing sanity check on sshd configuration. Starting sshd. Scanning /usr/share/certs/untrusted for certificates... Scanning /usr/share/certs/trusted for certificates... Completing this upgrade requires removing old shared object files. Please rebuild all installed 3rd party software (e.g., programs installed from the ports tree) and then run "/usr/sbin/freebsd-update install" again to finish installing updates. How to rebuild all installed 3rd party software? I’m guessing I need to run pkg update && pkg upgrade. root@nas2:~ # pkg update pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended Updating FreeBSD repository catalogue... pkg: Repository FreeBSD has a wrong packagesite, need to re-create database Fetching meta.conf: 100% 178 B 0.2kB/s 00:01 Fetching data.pkg: 100% 7 MiB 3.6MB/s 00:02 Processing entries: 100% FreeBSD repository update completed. 34072 packages processed. All repositories are up to date. Love the suggestion about running pkg bootstrap -f. root@nas2:~ # pkg bootstrap -f The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly, please wait... Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done Installing pkg-1.21.3... package pkg is already installed, forced install Extracting pkg-1.21.3: 100% This time, I should be able to continue updating the 3rd party software. root@nas2:~ # pkg update Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. root@nas2:~ # pkg upgrade Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Updating database digests format: 100% Checking for upgrades (44 candidates): 100% Processing candidates (44 candidates): 100% The following 43 package(s) will be affected (of 0 checked): Installed packages to be REINSTALLED: binutils-2.40_5,1 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') bsdinfo-0.22_2 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') btop-1.3.2 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') dmidecode-3.5 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') ...<SNIP>... tmux-3.3a_2 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') tree-sitter-0.22.2 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') unibilium-2.1.1_1 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') zstd-1.5.6 (ABI changed: 'freebsd:13:x86:64' -> 'freebsd:14:x86:64') Number of packages to be reinstalled: 43 395 MiB to be downloaded. Proceed with this action? [y/N]: y That’s it! ...

May 29, 2024 · 5 min · 873 words · kenno