OpenSUSE Leap 42: Install OpenSUSE Leap 42

This article will describe installing OpenSUSE Leap 42 and upgrading from OpenSUSE 13 to OpenSUSE Leap 42.

1 Install

Download openSUSE-Leap-42.2-DVD-x86_64.iso.

GRUB menu is displayed when booting iso. Select "Installation".

0001_GRUB.png

Select language and keyboard layout, and agree with license.

0002_LanguageKeyboardLicense.png

Check "Add Online Repositories Before Installation" if you need to install source code or debug symbol. This article checks it.

0003_InstallationOptions.png

You can create partition with guidance of "Edit Proposal Settings". Default setting is btrfs. This article uses LVM.

0004_SuggestedPartitioning.png

Set time zone. Click your location on world map.

0005_ClockAndTimeZone.png

Select repository to be added.

0006_ListOfOnlineRepositories.png

Agree license of Main repository packages.

0007_MainRepositoryLicense.png

Select desktop environment.

0008_DesktopSelection.png

Add user.

0009_LocalUser.png

Set detailed items with clicking it. This article will enable SSH service and open SSH port.

0010_InstallationSettings.png

SSH service is enabled and SSH port is opened.

0011_EnableSSH.png

Accept license of package to be installed.

0012_AdobeICCProfilesLicense.png

Start installation.

0013_ConfirmInstallation.png

After installation, system will be rebooted automatically and log in to OpenSUSE.

0014_InstallationCompleted.png

2 Upgrade from OpenSUSE 13 to OpenSUSE Leap 42

Upgrade OpenSUSE 13.2 and change systemd target to multi-user.target.

> sudo zypper update
> sudo systemctl set-default multi-user
> sudo reboot

This script will do the following.

  • Change repository from 13.2 to Leap 42.2 and upgrade with "zypper dup".
  • Change systemd target to graphical.target.
  • Change network interface name to eth0. In OpenSUSE 13, network interface name depends network interface hardware. But network interface name is reverted to eth0 in OpenSUSE Leap 42.
  • Reboot system.
#!/bin/sh

set -e

sudo cp -a /etc/zypp/repos.d /etc/zypp/repos.d.13.2

for repo in /etc/zypp/repos.d/*; do
  sudo \
    sed \
    -e 's;^baseurl=\(.*\)13\.2-non-oss\(.*\);baseurl=\1leap/42.2/non-oss\2;g' \
    -e 's;^baseurl=\(.*\)13\.2\(.*\);baseurl=\1leap/42.2\2;g' \
    -e 's;^baseurl=\(.*\)leap/42.2/$;baseurl=\1leap/42.2/non-oss;g' \
    -e 's;13\.2;leap-42.2;g' \
    -i "${repo}"
done

for repo in /etc/zypp/repos.d/*13.2*; do
  dest=$(echo "${repo}" | sed -e 's;13\.2;leap-42.2;g')
  sudo mv "${repo}" "${dest}"
done

for repo in /etc/zypp/repos.d/*; do
  grep '^baseurl=cd:///' "${repo}" > /dev/null &&
    sudo sed -e 's/enabled=1/enabled=0/g' -i "${repo}"
done

sudo zypper --gpg-auto-import-keys ref
sudo zypper -n dup --auto-agree-with-licenses

sudo systemctl set-default graphical

# This is my environment.
sudo mv /etc/sysconfig/network/ifcfg-ens3 \
     /etc/sysconfig/network/ifcfg-eth0

sudo reboot

After reboot, OpenSUSE Leap 42.2 is running.

> lsb_release -a
LSB Version:    n/a
Distributor ID: openSUSE project
Description:    openSUSE Leap 42.2
Release:        42.2
Codename:       n/a