최신 openSUSE Leap 버전으로 전체 업그레이드하는 방법

최신 openSUSE Leap 버전으로 전체 업그레이드하는 방법

새로 설치에 비해 전체 업그레이드의 주요 장점은
모든 계정, 구성 및 설치된 프로그램이 그대로 유지된다는 것입니다.

사용Linux용 Windows 하위 시스템(WSL), 새 openSUSE 42.1 인스턴스를 설치했습니다.

openSUSE 42를 15.x로 전체 업그레이드하는 방법은 무엇입니까?

나의 주요 관심은 openSUSE 42에서 최신 openSUSE 버전으로 업그레이드하는 것입니다.
이 글을 쓰는 시점에서는, Leap 15.4는 openSUSE의 최신 활성 버전입니다..

동기 부여

명령줄에서 설치해도 WSL은 여전히 ​​openSUSE 42.2 버전에서만 사용할 수 있습니다.
고려하면openSUSE 42.2의 라이프사이클은 2018년 1월에 공식적으로 종료되었습니다.
– 약 5년 전 – 새 버전으로 업그레이드하는 것이 합리적이었습니다.

경고하다!

전체 업그레이드를 고려하기 전에 사용 가능한 디스크 공간이 충분한지 확인하세요(
이 경우 최소 약 5GiB).

인용하다


1개 열려 있음WindowsCMD.exe관리자로서( WinKey+ r, 을 입력 cmd하고 Ctrl+ 를 누른 상태에서 ) Shift를 누릅니다 Enter.
그런 다음 다음 명령을 실행하여 openSUSE 42.2를 설치합니다.

wsl.exe --install --distribution openSUSE-42

답변1

openSUSE 42를 15.x로 전체 업그레이드하는 방법은 무엇입니까?

실험을 시작하기 전, 혹시라도 문제가 생길 경우를 대비해 예방 백업을 해두는 것이 좋습니다. 기존 구성 파일을 백업하려면 .repo: 1

cd /etc/zypp/repos.d/ && sudo zip oss-42.2_orig.zip *.repo

openSUSE를 42.2에서 15.4로 업그레이드하는 방법 2

1. 기존 openSUSE 42.2 새로 고침 및 업데이트

업그레이드하기 전에 중요한 단계는 현재 시스템 버전을 실행 sudo zypper refresh하고 새로 고치는 것입니다.sudo zypper update

:~> sudo zypper refresh
Retrieving repository 'oss' metadata ...........................[done]
Building repository 'oss' cache ................................[done]
Retrieving repository 'oss_update' metadata ....................[done]
Building repository 'oss_update' cache .........................[done]
All repositories have been refreshed.
:~> sudo zypper update
Loading repository data...
Warning: Repository 'oss_update' appears to be outdated.
 Consider using a different mirror or server.
Reading installed packages...

The following 3 NEW packages are going to be installed:
  kbd kmod pkg-config

The following 88 packages are going to be upgraded:
  binutils command-not-found coreutils cpp48 curl dbus-1 …
  yast2-xml zip zypper

88 packages to upgrade, 3 new.
Overall download size: 96.8 MiB. Already cached: 0 B. After the operation,
additional 7.8 MiB will be used.
Continue? [y/n/...? shows all options] (y): y

위의 출력 덤프에 표시된 대로 yStart Update(업데이트 시작)를 선택했습니다.
그러면 최신 버전의 openSUSE 42.2 패키지 다운로드 및 설치가 시작됩니다.

Retrieving package emacs-info-24.3-24.6.1.noarch (1/91),              4.2 MiB
Retrieving: emacs-info-24.3-24.6.1.noarch.rpm .............[done (1.7 MiB/s)]
Retrieving package file-magic-5.22-7.6.1.x86_64 (2/91),             334.5 KiB
Retrieving: file-magic-5.22-7.6.1.x86_64.rpm ..........................[done]
Retrieving package wicked-service-0.6.40-6.6.1.x86_64 (91/91),       58.6 KiB
Retrieving: wicked-service-0.6.40-6.6.1.x86_64.rpm ....................[done]
Checking for file conflicts: ..........................................[done]
( 1/91) Installing: emacs-info-24.3-24.6.1.noarch .....................[done]
( 2/91) Installing: file-magic-5.22-7.6.1.x86_64 ......................[done]
(91/91) Installing: wicked-service-0.6.40-6.6.1.x86_64 ................[done]
Additional rpm output:
Failed to connect to bus: No such file or directory
Output of coreutils-8.25-2.3.1.x86_64.rpm %posttrans script:
    Please run mkinitrd as soon as your system is complete.

이제 openSUSE Leap 42.2가 성공적으로 새로 고쳐지고 업데이트되었으므로
openSUSE Leap 15.4로 업그레이드를 시작할 차례입니다.

.repo2. 구성 파일의 버전 번호를 변경합니다.

A. 에서는 다음으로 /etc/zypp/repos.d/oss.repo바꿉니다 .42.2/repo/oss/suse15.4/repo/oss

sudo sed -i 's|42.2/repo/oss/suse|15.4/repo/oss|g' /etc/zypp/repos.d/oss.repo
:~> cat /etc/zypp/repos.d/oss.repo
[oss]
enabled=1
autorefresh=0
baseurl=http://download.opensuse.org/distribution/leap/15.4/repo/oss/
type=rpm-md

B. 에서는 다음으로 /etc/zypp/repos.d/oss_update.repo바꿉니다 .42.215.4

sudo sed -i 's|42.2|15.4|g' /etc/zypp/repos.d/oss_update.repo
:~> cat /etc/zypp/repos.d/oss_update.repo
[oss_update]
enabled=1
autorefresh=0
baseurl=http://download.opensuse.org/update/leap/15.4/oss/
type=rpm-md

3. 사용 가능한 패키지 및 버전 목록을 동기화합니다.

:~> sudo zypper refresh
Retrieving repository 'oss' metadata ...........................[done]
Building repository 'oss' cache ................................[done]
Retrieving repository 'oss_update' metadata ....................[done]
Building repository 'oss_update' cache .........................[done]
All repositories have been refreshed.

4. 릴리스 업그레이드 수행

:~> sudo zypper dist-upgrade
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.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...
14 Problems:
Problem: nothing provides (kmod(sg.ko) if kernel)
needed by suse-module-tools-15.4.12-150400.1.4.x86_64
 Solution 1: deinstallation of suse-module-tools-12.4-3.2.x86_64
 Solution 2: keep obsolete suse-module-tools-12.4-3.2.x86_64
 Solution 3: break suse-module-tools-15.4.12-150400.1.4.x86_64
  by ignoring some of its dependencies
Choose from above solutions by number or skip, retry, cancel [1/2/3/s/r/c]: 1

좋아요? 이제 어떻게 해야 하나요?
위의 출력 덤프에 표시된 대로 suse-module-tools-12.4-... 제거

새로운 것질문보여주다.

Problem: nothing provides (/usr/sbin/useradd or busybox)
needed by sysuser-shadow-3.1-150400.1.35.noarch
 Solution 1: deinstallation of rpcbind-0.2.3-3.3.1.x86_64
 Solution 2: keep obsolete rpcbind-0.2.3-3.3.1.x86_64
 Solution 3: break sysuser-shadow-3.1-150400.1.35.noarch
  by ignoring some of its dependencies
Choose from above solutions by number or skip, retry, cancel [1/2/3/s/r/c]: 1

또 선택했어요제거(rpcbind-0.2.3-3.3.1.x86_64).

이것은 계속해서 진행됩니다. 때때로,제거다음과 같이 제시된다해결책2.
계속해서 선택하고 있어요제거다음 패키지의 경우:
patterns-openSUSE-base-20150918-27.1.x86_64, man-2.6.6-6.3.1.x86_64,
emacs-24.3-24.6.1.x86_64, udev-228-25.18.1.x86_64,
util-linux-2.28-12.9.1.x86_64, systemd-228-25.18.1.x86_64,
libutempter0-1.1.6-7.55.x86_64, openssh-7.2p2-11.6.1.x86_64,
emacs-nox-24.3-24.6.1.x86_64, gpm-1.20.7-9.53.x86_64,
systemd-sysvinit-228-25.18.1.x86_64, util-linux-systemd-2.28-12.9.1.x86_64, , , , , , ,
sysconfig-netconfig-0.84.0-1.2.x86_64, , , , , , , .
aaa_base-13.2+git20140911.61c1681-24.3.1.x86_64kmod-17-10.3.1.x86_64
screen-4.0.4-7.21.x86_64sysconfig-0.84.0-1.2.x86_64
wicked-0.6.40-6.6.1.x86_64kmod-compat-17-10.3.1.x86_64
libwicked-0-6-0.6.40-6.6.1.x86_64ruby-common-2.1-6.3.1.noarch
wicked-service-0.6.40-6.6.1.x86_64yast2-packager-3.1.123-5.6.1.x86_64
aaa_base-extras-13.2+git20140911.61c1681-24.3.1.x86_64
yast2-ruby-bindings-3.1.51.2-3.1.x86_64yast2-3.1.217-5.6.1.x86_64
yast2-country-data-3.1.32-1.2.x86_64ruby-2.1-4.2.x86_64
yast2-hardware-detection-3.1.7-9.5.x86_64yast2-transfer-3.1.3-1.3.x86_64

대답한 후제거마지막 패키지의 경우,많은출력은 다음과 같습니다.

Resolving dependencies...
Computing distribution upgrade...
The following 96 NEW packages are going to be installed:
  bash-sh blog boost-license1_66_0 branding-openSUSE … vim-data-common

The following NEW product is going to be installed:
  "openSUSE Leap 15.4"

The following 45 packages are going to be REMOVED:
  aaa_base aaa_base-extras emacs emacs-nox gpm kmod … yast2-transfer

The following pattern is going to be REMOVED:  base

The following product is going to be REMOVED:  openSUSE

The following 198 packages are going to be upgraded:
  augeas bash bc bind-utils binutils bzip2 ca-certificates … zypper

The following pattern is going to be upgraded:  minimal_base

The following 26 packages are going to be downgraded:
  acl fillup insserv-compat klogd libacl1 libaio1 libattr1 … unzip zip

The following 4 packages are going to change architecture:
  file-magic                 x86_64 -> noarch
  linux-glibc-devel          noarch -> x86_64
  openssl                    x86_64 -> noarch
  perl-XML-NamespaceSupport  x86_64 -> noarch
The following 217 packages are going to change vendor:
  acl                        openSUSE -> SUSE LLC <https://www.suse.com/>
  zypper                     openSUSE -> SUSE LLC <https://www.suse.com/>

198 packages to upgrade, 26 to downgrade, 96 new, 45 to remove, 217 to
change vendor, 4 to change arch.
Overall download size: 189.6 MiB. Already cached: 0 B. After the operation,
additional 293.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y

그것을 선택하자 y다운로드와 설치가 시작되었습니다.

Retrieving package boost-license1_66_0-1.66.0-12.3.1.noarch (1/320), 20.8 KiB
Retrieving: boost-license1_66_0-1.66.0-12.3.1.noarch.rpm ..............[done]
Retrieving package branding-openSUSE-15.4.20220322-lp154.2. (2/320), 11.6 KiB
Retrieving package device-mapper-1.02.163-150400.15.95.x (320/320), 143.7 KiB
Retrieving: device-mapper-1.02.163-150400.15.95.x86_64.rpm ............[done]

Checking for file conflicts: ..........................................[done]
(  1/363) Installing: boost-license1_66_0-1.66.0-12.3.1.noarch ........[done]
Additional rpm output:
warning: /var/cache/zypp/packages/oss/noarch/boost-license1_66_0-1.66.0-12.3.
1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
(  2/363) Installing: …
(362/363) Removing kmod-17-10.3.1.x86_64 ..............................[done]
(363/363) Removing suse-module-tools-12.4-3.2.x86_64 ..................[done]
Output of rpm-4.14.3-150300.46.1.x86_64.rpm %posttrans script:
    migrating rpmdb from /var/lib/rpm to /usr/lib/sysimage/rpm...

많은 경고를 보았는데, 그 중 가장 일반적인 경고는 No such file or directory다운로드
하고 설치하는 데 약 7분 정도 걸립니다.

5. 현재 새 버전의 openSUSE를 확인하세요.

:~> sudo zypper repos
Repository priorities are without effect.
All enabled repositories share the same priority.

# | Alias                       | Name        | Enabled | GPG Check | Refresh
--+-----------------------------+-------------+---------+-----------+--------
1 | oss                         | oss         | Yes     | (r ) Yes  | No
2 | oss_update                  | oss_update  | Yes     | (r ) Yes  | No
3 | repo-backports-debug-update | Update re-> | No      | ----      | ----
4 | repo-backports-update       | Update re-> | Yes     | (r ) Yes  | Yes
5 | repo-sle-debug-update       | Update re-> | No      | ----      | ----
6 | repo-sle-update             | Update re-> | Yes     | (r ) Yes  | Yes

버전 확인:

:~> cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.4"

6. 시스템 저장소의 캐시를 다시 빌드합니다.

:~> sudo zypper refresh
Repository 'oss' is up to date.
Building repository 'oss' cache ................................[done]
Repository 'oss_update' is up to date.
Building repository 'oss_update' cache .........................[done]

New repository or package signing key received:
  Repository:       Update repository of openSUSE Backports
  Key Fingerprint:  …
Do you want to reject the key, trust temporarily, trust always? [r/t/a/?]: t
Retrieving repository 'Update repository of openSUSE Backports'metadata[done]
Building repository 'Update repository of openSUSE Backports' cache ...[done]

New repository or package signing key received:
Repository:      Update repository with updates from SUSE Linux Enterprise 15
Key Fingerprint: …
Do you want to reject the key, trust temporarily, trust always? [r/t/a/?]: t
Retrieving repository 'Update repository with updates from SUSE Linux E[done]
Building repository 'Update repository with updates from SUSE Linux Ent[done]
All repositories have been refreshed.

7. 설치된 패키지를 사용 가능한 최신 버전 3 으로 업그레이드하세요.

그런 다음 나는 달렸다 sudo zypper update.

-bash-4.4$ sudo zypper update
Loading repository data...
Reading installed packages...

The following 125 packages are going to be upgraded:
  augeas bind-utils binutils ca-certificates-mozilla curl … zypper

The following 7 NEW packages are going to be installed:
  libisc1606 libjitterentropy3 libutempter0 libzck1 … util-linux

The following 2 packages are going to be REMOVED:
  bind-libs hardlink

125 packages to upgrade, 7 new, 2 to remove.
Overall download size: 102.2 MiB. Already cached: 0 B. After the operation,
additional 1.7 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y

물론, 나는 를 선택했다 y. 다음은 업데이트 다운로드 및 설치입니다.

Retrieving package sysuser-shadow-3.1-150400.1.35.noarch (1/132),  12.9 KiB
Retrieving: sysuser-shadow-3.1-150400.1.35.noarch.rpm .................[done]
Retrieving package system-group-hardware-20170617-150400.… (2/132),  12.4 KiB
Retrieving: …
Retrieving package util-linux-2.37.2-150400.8.8.1.x86_64 (132/132),   1.3 MiB
Retrieving: util-linux-2.37.2-150400.8.8.1.x86_64.rpm .................[done]

Checking for file conflicts: ..........................................[done]
(  1/132) Installing: sysuser-shadow-3.1-150400.1.35.noarch ...........[done]
/usr/sbin/groupadd -r render
/usr/sbin/groupadd -r sgx
(  2/132) Installing: …
(132/132) Installing: util-linux-2.37.2-150400.8.8.1.x86_64 ...........[done]
Executing %posttrans scripts ..........................................[done]

http:8.와 사이의 전투https:

내 경험상 http:파일에서 로 바꾸면 오류가 발생할 수 있습니다. 이 작업을 수행하고 실행하면 종종(항상은 아니지만) 다음과 같은 결과가 나타납니다.https:/etc/zypp/repos.d/*.repo

sudo zypper refresh

:~> sudo zypper refresh
Download (curl) error for 'https://download.opensuse.org/distribution/…':
Error code: Curl error 60
Error message: SSL certificate problem: certificate has expired

이는 만료된 인증서 관련 문제인 것 같습니다. 업그레이드가 성공적으로 완료되면(시스템 새로 고침 및 업데이트 포함)
이러한 위험이 발생할 위험은 훨씬 줄어들 것입니다.Curl error

일반화하다

초기 예방 백업을 반복하는 것이 좋습니다.

cd /etc/zypp/repos.d/ && sudo zip oss-15.4_orig.zip *.repo

이러한 업그레이드 중에 어떤 선택을 해야 할지 명확하지 않습니다.
하지만 업그레이드가 대부분 효과가 있었던 것 같습니다. 지금 버전이라고
하더군요cat /etc/os-release오픈수세 도약 15.4.

ConEmu를 통해 openSUSE-15를 부팅하려고 할 때 여전히 Access is denied. Press Enter or Esc to exit...이 메시지가 표시되는 경우가 있습니다 . 이 문제가 ConEmu와 관련이 있는지는 모르겠지만 CMD.exe에서 직접 openSUSE-15를 시작할 때 이 문제를 본 적이 없습니다 wsl ~ -d openSUSE-15. 5

인용하다


1 파일의 내용을 보려면 파일을 복원하려면 oss-42.2_orig.zip다음을 실행합니다 unzip -l oss-42.2_orig.zip.
.repo
cd /etc/zypp/repos.d/ && sudo rm *.repo && sudo unzip oss-42.2_orig.zip

2 지원 데이터베이스: 시스템 업그레이드업그레이드 수행에 있어 가장 중요한 참고 자료입니다.

3 이 시점에서 openSUSE 배포판이 정지되고 키보드 입력에 응답하지 않습니다.
재부팅하면 아래와 같습니다.
-bash: /etc/profile: No such file or directory
-bash-4.4$

설치 후부서지다 여기에 명시된 바와 같이을 누른 다음 다시 시작하세요.그런 행동왼쪽.
아래와 같이 프롬프트가 다시 정상으로 돌아왔습니다.
henke@hp:~>
정확히 무엇이 시스템을 수정했는지 모르겠습니다. 그리고 이 문제를 재현하는 방법을 모르겠습니다.

4 모든 파일을 바꾸려면 다음을 http:실행합니다.https:.repo
sudo sed -i 's/http:/https:/' /etc/zypp/repos.d/*.repo

5 배포판 이름을 변경하지 않았다면 wsl ~ -d openSUSE-42배포판이 실행되더라도 로 실행해야 합니다.포함하다오픈수세 15 입니다.

관련 정보