From Fedora Project Wiki
mNo edit summary
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{autolang}}
{{autolang}}
 
{{admon/warning|注意!|在新的版本中,FedUP已经被[[DNF_system_upgrade|DNF 系统升级插件]]所取代。}}
{{admon/note|这是新东西!|FedUp 是随 Fedora 18 而来的一个新系统,因而将在 Fedora 18 发布之前不断完善。如果您发现本文档有错误或是过期了,请修正它或者报告给相关人员。}}
{{admon/warning|安全考虑|当您通过网络升级时,FedUp 还不能保证从网络获取的内容是受 Fedora 信任的。具体请查看 [[rhbug:877623|Bugzilla: #877623]]。如果出于安全考虑,您可以通过下载 ISO 镜像验证并升级来解决该问题。注意,Anaconda 和 Preupgrade 也不验证。}}
 
{{admon/warning|安全考虑|当您通过网络升级时,FedUp 还不确保只有从 Fedora 获取的受信任软件正在系统上运行。具体请查看 [[rhbug:877623|Bugzilla: #877623]]。You can download the ISO release image and verify the authenticity independently before perfoming a upgrade with Fedup via media or ISO images methods to workaround this issue.  Note that neither Anaconda not Preupgrade verified the authenticity of the source either and this is not a regression. }}


= 什么是 FedUp? =
= 什么是 FedUp? =


FedUp (FEDora UPgrader) 是一个升级 Fedora 的新工具。它已替换了所有在之前 Fedora 版本上推荐的更新方式(例如通过 [[PreUpgrade]] 升级和 DVD 升级)。Anaconda,Fedora 的安装器,从 Fedora 18 后将不会自带更新功能,所有全部交给 FedUp。
FedUp (FEDora UPgrader) 是一个升级 Fedora 的新工具。它替换了在之前 Fedora 版本上推荐的更新方式(例如通过 [[PreUpgrade]] 升级和 DVD 升级)。Anaconda,Fedora 的安装器,从 Fedora 18 后将不会自带更新功能,所有将全部交给 FedUp 来完成。


目前,FedUp 可以通过网络安装源完美升级 Fedora 17 至 Fedora 18,类似于之前 [[PreUpgrade]] 的工作方式。更多升级的方法目前已经处于计划之中,当它们可行后本页也会继续更新。
目前,FedUp 可以通过网络安装源完美升级 Fedora 17 至 Fedora 18,就像之前 [[PreUpgrade]] 的升级一样。更多升级的方法目前已经处于计划之中,当它们可行后本页也会继续更新。


{{admon/warning|针对 Fedora 16 和更老的版本|FedUp 客户端尚未在任何早于 Fedora 17 的系统上构建或运行。如果您想更新,请首先[[Upgrade|'''更新''']]Fedora 17。}}
{{admon/warning|针对 Fedora 16 和更老的版本|FedUp 客户端尚未在任何早于 Fedora 17 的系统上构建或运行。如果您想更新,请首先 [[Upgrade|'''更新''']] Fedora 17。}}


= FedUp 做了些什么? =
= FedUp 做了些什么? =


FedUp 系统有两个组成部分 - 客户端被用作下载软件包并准备升级和预启动环境,实际更新工作由 [[Systemd|systemd]] 和 yum 完成。详细信息请访问 [http://ohjeezlinux.wordpress.com/2012/11/13/fedup-a-little-background/ FedUp 主作者对它的介绍] 页面。
FedUp 系统有两个组成部分 - 程序本身被用作下载软件包并准备升级过程和预启动环境,实际更新工作则由 [[Systemd|systemd]] 和 yum 完成。详细信息请访问 [http://ohjeezlinux.wordpress.com/2012/11/13/fedup-a-little-background/ FedUp 主作者对它的介绍] 页面。


== FedUp 客户端 ==
== FedUp 客户端 ==
Line 23: Line 21:
== 升级过程 ==
== 升级过程 ==


从运行 FedUp 客户端之后重启开始实际上的升级。文件系统会在启动时被挂载,已下载的包会被安装并且一些有关升级的任务也会开始执行。在升级过程中,将会使用一个特别的包含升级进度条显示的 plymouth 主题。
从运行 FedUp 客户端之后重启才开始实际上的升级。文件系统会在启动时被挂载,已下载的软件包会被安装并且一些有关升级的任务也会开始执行。在升级过程中,将会使用一个特别的包含升级进度条显示的 plymouth 主题作为屏幕显示。


= 常见问题解答 =
= 常见问题解答 =
Line 30: Line 28:


== 我该如何汇报升级出现的问题? ==
== 我该如何汇报升级出现的问题? ==
这取决于您出现的问题。
请首先查看 [[Common F18 bugs#Upgrade_issues]],也许这些问题不是受我们严重关注的问题。如果不在这个页面里面,请根据出问题的组件反馈问题。


===升级准备时的问题 ===
===升级准备时的问题 ===
如果您在重启前使用 FedUp 客户端遇到问题({{package|fedup}}),请 [https://bugzilla.redhat.com/buglist.cgi?product=Fedora&component=fedup&resolution=--- 搜索有关 fedup 的 bug],或者针对您'''升级前系统的版本'''提交。
如果您在重启前使用 FedUp 客户端遇到问题({{package|fedup}}),请 [https://bugzilla.redhat.com/buglist.cgi?product=Fedora&component=fedup&resolution=--- 搜索有关 fedup 的 Bug],或者针对您'''升级前系统的版本'''提交关于 fedup 的 Bug 报告。


=== 升级过程中的问题 ===
=== 升级过程中的问题 ===
If you hit issues after upgrade preparation and the initial reboot, search for or file a bug against {{package|fedup-dracut}} using the version you are upgrading '''to'''.
如果您在准备过程结束后重启时遇到问题,请 [https://bugzilla.redhat.com/buglist.cgi?product=Fedora&component=fedup-dracut&resolution=--- 搜索有关 fedup-dracut 的 Bug],或者针对您'''升级前系统的版本'''提交关于 fedup-dracut 的 Bug 报告。


=== 升级后的问题 ===
=== 升级后的问题 ===
If you hit issues after upgrade with a specific package, file a bug against the package with which you are having issues.
如果升级某个软件包后出现问题,请针对相关软件提交 Bug 报告。


== 我该如何在升级过程中调试出现的问题 ==
== 我该如何在升级过程中调试出现的问题? ==
A troubleshooting and debug guide will be written soon and linked to from here.
稍后完善


== Does FedUp verify the software it runs or installs during upgrade? ==
== FedUp 验证升级过程中安装或运行的软件吗? ==
This is a planned feature. See [https://bugzilla.redhat.com/show_bug.cgi?id=877623 Bug 877623] for a status update.
这是一个正在计划中的新特性。查看 [https://bugzilla.redhat.com/show_bug.cgi?id=877623 Bug 877623] 以了解更多。


== 哪里可以问我的问题? ==
== 哪里可以问我的问题? ==
For now, the best place to ask questions is probably #fedora-qa on Freenode IRC or the [https://admin.fedoraproject.org/mailman/listinfo/test Fedora Test list].
最好的位置是参与 IRC 交流 {{fpchat|#fedora-qa}} 或者发邮件至 {{fplist|test}} 邮件列表。


= 我如何使用 FedUp 更新我的系统? =
= 如何通过 FedUp 升级我的系统? =


As alluded to above, there are three parts to upgrading with FedUp - preparation, execution and cleanup.
使用 FedUp 升级您的系统有3个阶段 - 升级准备、执行升级和清理
 
在您更新之前,确保您已经阅读了 [[Common F18 bugs#Upgrade_issues]]。


== 升级准备 ==
== 升级准备 ==
{{admon/important|Latest fedup|Make sure that you install the latest version of the fedup client on the system to be upgraded. At the time of this writing (2013-01-08), that is fedup-0.7.2-1.fc17}}
{{admon/important|最新版的 fedup|确保您已安装最新的 fedup客户端。本页撰写于2013-01-08,目前是 fedup-0.7.2-1.fc17}}
# Do a full system update and reboot to ensure that any kernel changes are running
# 运行系统更新并重启以确保内核更新生效
# Install {{package|fedup}}
# 安装 {{package|fedup}}
#* Be sure to get the latest release, this may involve enabling updates-testing (put <code>--enablerepo=updates-testing</code> between {{command|yum}} and {{command|install}} on the command line)
#* 确保已获取最新版,您可以通过启用 updates-testing (命令行执行 '''<code>yum --enablerepo=updates-testing install fedup</code>''')
 
There are three options for sourcing the packages needed for upgrade - using a network repository, a local ISO file or a local device (hard drive, optical disk etc.).


3种方式可获得需要更新的软件包 - 使用网络安装源、本地 ISO 镜像或本地设备(例如硬盘或者光盘)。
{{admon/important|强烈推荐通过网络进行升级|我们强烈建议您通过网络安装更新的方式完成系统升级,而不是通过本地安装源进行更新。网络更新将确保您获得最新的  Fedora 18 软件包。如果您的本地安装源不是最新的 Fedora 18 组件,您可能会发现系统是一个由 Fedora 17 和 Fedora 18 两个版本的软件包组成的混合体。直到您升级所有软件至最新版系统并重启才可能正常工作 (如果还启动的话)。}}
=== 网络 ===
=== 网络 ===
Using a network source is the easiest method of upgrading and will pull in updates while upgrading - eliminating the potential issue if your current system has a newer kernel version than the Fedora release to which you are upgrading.
使用网络进行升级是最省事的办法 - 如果您当前的系统有一个比您要升级到的 Fedora 版本自带内核还要新的内核,这种方式可以消除潜在的问题。


# Start the upgrade prep by executing following command
# 执行下列命令准备升级
#* {{command|sudo fedup-cli --network 18 --debuglog fedupdebug.log}}
#* {{command|sudo yum update fedup fedora-release}}
#* <arch> is the arch of the system that you are upgrading - either i386 or x86_64
如果你正从Fedora 20升级到Fedora 21,执行下列命令
# Once the preparations have completed, check the {{filename|fedupdebug.log}} file if any errors show up in the output from {{command|fedup-cli}}
#* sudo fedup --network 21 --product=[workstation | server| cloud | nonproduct]
如果你正从Fedora 21升级到Fedora 22,执行下列命令
#* sudo fedup --network 22
# 一旦准备完毕,检查 {{filename|/var/log/fedup.log}} 文件查看是否有来自 {{command|fedup-cli}} 的错误输出


=== ISO 文件 ===
=== ISO 文件 ===
In order to use an ISO file, it needs to exist locally on the filesystem of the system to be upgraded. The documentation is written as if that file is /home/user/fedora-18.iso but you will need to replace all instances of that path with the actual path of the iso. Updates will be pulled in if you have network access on the machine to be upgraded.
为了使用 ISO 镜像,您需要把它放置于文件系统上。本文假设其位于 /home/user/fedora-18.iso,您可以任意指定位置。如果这台机器联网,更新的升级将会联网获取。


# 下载适合您正运行的架构的 Fedora {{FedoraVersion}} 的 ISO 文件。
# 下载适合您正运行的架构的 Fedora {{FedoraVersion}} 的 ISO 文件。
#* For the sake of example, we will assume that the iso exists at {{filename|/home/user/fedora-18.iso}} but it can be anwhere in the filesystem as long as you alter the path below to reflect the actual location of the ISO.
#* 为了便于说明,我们假设 ISO 位于 {{filename|/home/user/fedora-18.iso}},不过您可以任意指定您的实际 ISO 文件位置,替换下面的 {{filename|/home/user/fedora-18.iso}} 即可
# Start the upgrade prep by executing the following command
# 执行下列命令准备升级
#* <nowiki>sudo fedup-cli --iso /home/user/fedora-18.iso --debuglog=fedupdebug.log</nowiki>
#* <nowiki>sudo fedup-cli --iso /home/user/fedora-18.iso --debuglog=fedupdebug.log</nowiki>
# Once the preparations have completed, check the {{filename|fedupdebug.log}} file if any errors show up in the output from {{command|fedup-cli}}
# 一旦准备完毕,检查 {{filename|fedupdebug.log}} 文件查看是否有来自 {{command|fedup-cli}} 的错误输出


=== 其他设备 ===
=== 其他设备 ===
Optical drives and other mountable storage can also be used as a package source for upgrade preparations.
光盘和其他可被挂载的设备均可被用作升级准备过程中使用的软件包安装源。


# Mount the source material
# 挂载源介质
#* For the sake of example, we will assume that this source is mounted at {{filename|/mnt/fedora}} but you can mount it anywhere as long as you replace {{filename|/mnt/fedora}} in the command below with the actual mounted location of the upgrade source.
#* 为了便于说明,我们假设设备挂载于 {{filename|/mnt/fedora}},不过您可以任意指定挂载位置。替换下面的 {{filename|/mnt/fedora}} 即可
# Start the upgrade preparations by executing the following command
# 执行下列命令准备升级
#* <nowiki>sudo fedup-cli --device /mnt/fedora --debuglog=fedupdebug.log</nowiki>
#* <nowiki>sudo fedup-cli --device /mnt/fedora --debuglog=fedupdebug.log</nowiki>
# Once the preparations have completed, check the {{filename|fedupdebug.log}} file if any errors show up in the output from {{command|fedup-cli}}
# 一旦准备完毕,检查 {{filename|fedupdebug.log}} 文件查看是否有来自 {{command|fedup-cli}} 的错误输出


== 执行升级 ==
== 执行升级 ==
{{admon/warning|Needs Reference|This section still needs a reference to the 'esc kills plymouth' bug once a suitable summary has been written}}
{{admon/warning|需要参考|本部分仍然需要一些有关 'esc 键杀死 plymouth 进程'的 Bug 的参考}}


# Reboot the system if {{command|fedup}} has completed without error.
# 如果 {{command|fedup}} 已完成工作且没有错误发生,则重启系统。
# Once the system reboots, there should be a new entry in the GRUB menu titled {{command|System Upgrade}}.
# 一旦系统重启,GRUB 菜单将会有一个新的条目,叫做 {{command|'''System Upgrade'''}}
#* Adding <nowiki>rd.upgrade.debugshell</nowiki> would be a decent idea
#* 如果您在启动参数里面添加 <code>rd.upgrade.debugshell</code>,您会看到一个 shell 窗口,允许您在系统出现某些情况时进行修复
# Select the {{command|System Upgrade}} option from the GRUB menu
# 选择 {{command|'''System Upgrade'''}} 条目继续
# The system should boot into the upgrade process and a plymouth boot screen should be displayed
#*'''备注:''' 如果grub菜单没有这一项,很可能是你装的grub是你电脑里其它系统装的,解决它很简单:重装grub:
#* If you press 'esc', a more detailed log of progress will be desplayed but if you switch back to the graphical progress indicator, it will remain at 0% for the remainder of the upgrade but that does not mean the upgrade has stopped. See '''Need section reference here once it's written'''
#*# grub2-mkconfig -o /boot/grub2/grub.cfg
# Once the upgrade process has completed, the system will reboot and an option to boot {{FedoraVersion|long|next}} will be on the grub menu
#*# grub2-install /dev/sda '''(用你常用的启动设备替代/dev/sda)'''
# 系统将会启动至升级环境,一个 plymouth 启动屏幕会显示出来
#* 如果您按下 'esc' 键,一个更详细的进度日志会显示出来,但是如果您切换至之前的图形显示进度条界面,进度条会一直停留在 0%,不过您不必担心因为升级实际上在运行。这是一个 Bug。
# 一旦更新完成,系统将会重启,grub 菜单会多出一个启动 {{FedoraVersion|long|current}} 的选项


== GRUB 更新 ==
== GRUB 更新 ==
{{admon/note|Somewhat Optional|While updating GRUB on your upgraded system isn't strictly required, it is recommended for BIOS systems and '''very strongly''' recommended for UEFI systems due to the transition from grub-efi to grub2-efi}}
{{admon/note|这是可选的操作!|在已更新完毕的系统上升级 GRUB 严格意义上讲并不是必须的,但是对于 BIOS 类系统我们还是十分建议您做一下升级。而对于 UEFI 类系统我们'''强烈建议''' 升级 grub-efi grub2-efi}}


=== 更新 GRUB2 (BIOS 系统) ===
=== 更新 GRUB2 (BIOS 系统) ===


* After upgrade, the grub2 you're booting from will still be the F17 version; upgrading must be done manually
* '''升级完成后,之前安装的 grub2 仍然会启动 F17 版本,您需要手工升级'''
* Follow the steps in [[GRUB_2|this grub2 page]] to reinstall and update grub


=== 更新 GRUB (UEFI 系统) ===
== 清理 ==
{{admon/note|Problems Upgrading Grub on UEFI|Late in testing, we found some potentially serious problems with manually upgrading grub-efi to grub2-efi. Until this is figured out, we recommend that users continue to use grub-efi as it should work for the near future}}
<!-- This is commented out due to some problems found late in testing fedup on EFI, will modify once this gets worked out
{{admon/caution|Intel Macs|These instructions will not work for Fedora installs on Intel macs. We're still working out separate instructions but for now, just continue to use grub-efi and upgrade to grub2 later.}}
{{admon/note|Secure Boot| Secure Boot functionality was not completed in time for Fedora 18 beta and these instructions do not cover using {{package|shim}} or the signed kernel. Once Secure Boot functionality is available, these instructions will be updated.}}


{{admon/note|Grub Theme|With the migration to grub2-efi in Fedora 18, you will see no grub splash after initial upgrade nor after upgrading to grub2-efi}}
<!-- Some of the stuff from [https://fedoraproject.org/wiki/User:Fenris02/Distribution_upgrades_and_cleaning_up_after_them] this post upgrade cleanup guide] might be wise -->


Grub2 is not installed as part of the upgrade process, so you'll have to install it:
在做发行版同步时重建RPM数据可以阻止RPMDB校验报错:
<pre>
sudo yum install grub2-efi
</pre>


Once the {{package|grub2-efi}} package is installed, we need to add a new EFI boot entry. The easiest way to do this is to just modify the command used when Fedora was first installed. Note that you will not be using the exact same command when upgrading to grub2 as the location of some files has changed. The older reference command can be found in <nowiki>/var/log/anaconda/anaconda.program.log</nowiki> and should end with a command similar to:
{{command|sudo rpm --rebuilddb}}
<pre>
efibootmgr -c -w -L Fedora -d /dev/sdX -p Y -l \EFI\redhat\grub.efi
</pre>


Find the current boot number for fedora using <code>efibootmgr</code>:
There are a collection of post-upgrade things to do. Some of which are fixed by doing a distro sync:
<pre>
efibootmgr -v
</pre>


You are looking for a line similar to:
{{command|sudo yum distro-sync --setopt<nowiki>=</nowiki>deltarpm<nowiki>=</nowiki>0}}
<pre>
Boot0004* Fedora  HD(1,800,34800,6733749f-b42a-4b8c-a0de-5a1d3505f8af)File(\EFI\redhat\grub.efi)
</pre>


The boot number in this example is 0004.
The rpmconf tool searches for .rpmnew, .rpmsave and .rpmorig files and asks you what to do with them: Keep current version, place back old version, watch the diff or merge.


Remove the old boot entry using the following command (<nowiki><boot number></nowiki>) is the boot number you found above:
{{command|sudo yum install rpmconf}}
<pre>
efibootmgr -b <boot number> -B
</pre>


{{admon/warning|Using Quotes|Make sure you put quotes around '\EFI\fedora\grubx64.efi' or bash will interpret \E, \f and \g as control characters and your system will not boot properly}}
{{command|sudo rpmconf -a}}


Once you have the command that was used and the boot number of the old boot entry, you can change it to use the new grub2-efi installation:
If you are using google-chrome from the Google repository, you must re-install google-chrome due to a packaging bug on the Google side of things. Make sure to adjust the command to the build type you would like to install:
<pre>
sudo efibootmgr -c -w -L Fedora -d /dev/sdX -p Y -l '\EFI\fedora\grubx64.efi' -b <boot number>
</pre>
 
In order to get a bootable UEFI system, you need to regenerate the grub configuration and symlink it to <code>/etc/grub2-efi.cfg</code>
<pre>
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
</pre>
 
Once the system reboots, you should be using grub2-efi instead of grub-efi
-->
 
== 清理 ==


{{admon/warning|Pending|This part of the documentation is still being written }}
{{command|sudo yum remove google-chrome-\* && sudo yum install google-chrome-[beta,stable,unstable]}}
<!-- Some of the stuff from [http://fedorasolved.org/Members/fenris02/post_upgrade_cleanup this post upgrade cleanup guide] might be wise -->

Latest revision as of 05:33, 29 August 2016

Warning.png
注意!
在新的版本中,FedUP已经被DNF 系统升级插件所取代。
Warning.png
安全考虑
当您通过网络升级时,FedUp 还不能保证从网络获取的内容是受 Fedora 信任的。具体请查看 Bugzilla: #877623。如果出于安全考虑,您可以通过下载 ISO 镜像验证并升级来解决该问题。注意,Anaconda 和 Preupgrade 也不验证。

什么是 FedUp?

FedUp (FEDora UPgrader) 是一个升级 Fedora 的新工具。它替换了在之前 Fedora 版本上推荐的更新方式(例如通过 PreUpgrade 升级和 DVD 升级)。Anaconda,Fedora 的安装器,从 Fedora 18 后将不会自带更新功能,所有将全部交给 FedUp 来完成。

目前,FedUp 可以通过网络安装源完美升级 Fedora 17 至 Fedora 18,就像之前 PreUpgrade 的升级一样。更多升级的方法目前已经处于计划之中,当它们可行后本页也会继续更新。

Warning.png
针对 Fedora 16 和更老的版本
FedUp 客户端尚未在任何早于 Fedora 17 的系统上构建或运行。如果您想更新,请首先 更新 至 Fedora 17。

FedUp 做了些什么?

FedUp 系统有两个组成部分 - 程序本身被用作下载软件包并准备升级过程和预启动环境,实际更新工作则由 systemd 和 yum 完成。详细信息请访问 FedUp 主作者对它的介绍 页面。

FedUp 客户端

FedUp 运行于准备升级的系统上。它获取所有需要升级的软件包和内核。目前只有命令行版本,不过图形界面版本已经在准备了。

升级过程

从运行 FedUp 客户端之后重启才开始实际上的升级。文件系统会在启动时被挂载,已下载的软件包会被安装并且一些有关升级的任务也会开始执行。在升级过程中,将会使用一个特别的包含升级进度条显示的 plymouth 主题作为屏幕显示。

常见问题解答

我能使用 FedUp 更新我的 Fedora 16 吗?

不行。目前不可用。FedUp 客户端目前尚未在 Fedora 16 上构建或运行,所以您至少需要 Feora 17。请首先使用 Preupgrade 升级至 Fedora 17。

我该如何汇报升级出现的问题?

请首先查看 Common F18 bugs#Upgrade_issues,也许这些问题不是受我们严重关注的问题。如果不在这个页面里面,请根据出问题的组件反馈问题。

升级准备时的问题

如果您在重启前使用 FedUp 客户端遇到问题(Package-x-generic-16.pngfedup),请 搜索有关 fedup 的 Bug,或者针对您升级前系统的版本提交关于 fedup 的 Bug 报告。

升级过程中的问题

如果您在准备过程结束后重启时遇到问题,请 搜索有关 fedup-dracut 的 Bug,或者针对您升级前系统的版本提交关于 fedup-dracut 的 Bug 报告。

升级后的问题

如果升级某个软件包后出现问题,请针对相关软件提交 Bug 报告。

我该如何在升级过程中调试出现的问题?

稍后完善

FedUp 验证升级过程中安装或运行的软件吗?

这是一个正在计划中的新特性。查看 Bug 877623 以了解更多。

哪里可以问我的问题?

最好的位置是参与 IRC 交流 #fedora-qa[?] 或者发邮件至 test 邮件列表。

如何通过 FedUp 升级我的系统?

使用 FedUp 升级您的系统有3个阶段 - 升级准备、执行升级和清理

在您更新之前,确保您已经阅读了 Common F18 bugs#Upgrade_issues

升级准备

Important.png
最新版的 fedup
确保您已安装最新的 fedup客户端。本页撰写于2013-01-08,目前是 fedup-0.7.2-1.fc17
  1. 运行系统更新并重启以确保内核更新生效
  2. 安装 Package-x-generic-16.pngfedup
    • 确保已获取最新版,您可以通过启用 updates-testing 源(命令行执行 yum --enablerepo=updates-testing install fedup)

3种方式可获得需要更新的软件包 - 使用网络安装源、本地 ISO 镜像或本地设备(例如硬盘或者光盘)。

Important.png
强烈推荐通过网络进行升级
我们强烈建议您通过网络安装更新的方式完成系统升级,而不是通过本地安装源进行更新。网络更新将确保您获得最新的 Fedora 18 软件包。如果您的本地安装源不是最新的 Fedora 18 组件,您可能会发现系统是一个由 Fedora 17 和 Fedora 18 两个版本的软件包组成的混合体。直到您升级所有软件至最新版系统并重启才可能正常工作 (如果还启动的话)。

网络

使用网络进行升级是最省事的办法 - 如果您当前的系统有一个比您要升级到的 Fedora 版本自带内核还要新的内核,这种方式可以消除潜在的问题。

  1. 执行下列命令准备升级
    • sudo yum update fedup fedora-release

如果你正从Fedora 20升级到Fedora 21,执行下列命令

    • sudo fedup --network 21 --product=[workstation | server| cloud | nonproduct]

如果你正从Fedora 21升级到Fedora 22,执行下列命令

    • sudo fedup --network 22
  1. 一旦准备完毕,检查 /var/log/fedup.log 文件查看是否有来自 fedup-cli 的错误输出

ISO 文件

为了使用 ISO 镜像,您需要把它放置于文件系统上。本文假设其位于 /home/user/fedora-18.iso,您可以任意指定位置。如果这台机器联网,更新的升级将会联网获取。

  1. 下载适合您正运行的架构的 Fedora 39 的 ISO 文件。
    • 为了便于说明,我们假设 ISO 位于 /home/user/fedora-18.iso,不过您可以任意指定您的实际 ISO 文件位置,替换下面的 /home/user/fedora-18.iso 即可
  2. 执行下列命令准备升级
    • sudo fedup-cli --iso /home/user/fedora-18.iso --debuglog=fedupdebug.log
  3. 一旦准备完毕,检查 fedupdebug.log 文件查看是否有来自 fedup-cli 的错误输出

其他设备

光盘和其他可被挂载的设备均可被用作升级准备过程中使用的软件包安装源。

  1. 挂载源介质
    • 为了便于说明,我们假设设备挂载于 /mnt/fedora,不过您可以任意指定挂载位置。替换下面的 /mnt/fedora 即可
  2. 执行下列命令准备升级
    • sudo fedup-cli --device /mnt/fedora --debuglog=fedupdebug.log
  3. 一旦准备完毕,检查 fedupdebug.log 文件查看是否有来自 fedup-cli 的错误输出

执行升级

Warning.png
需要参考
本部分仍然需要一些有关 'esc 键杀死 plymouth 进程'的 Bug 的参考
  1. 如果 fedup 已完成工作且没有错误发生,则重启系统。
  2. 一旦系统重启,GRUB 菜单将会有一个新的条目,叫做 System Upgrade
    • 如果您在启动参数里面添加 rd.upgrade.debugshell,您会看到一个 shell 窗口,允许您在系统出现某些情况时进行修复
  3. 选择 System Upgrade 条目继续
    • 备注: 如果grub菜单没有这一项,很可能是你装的grub是你电脑里其它系统装的,解决它很简单:重装grub:
      1. grub2-mkconfig -o /boot/grub2/grub.cfg
      2. grub2-install /dev/sda (用你常用的启动设备替代/dev/sda)
  4. 系统将会启动至升级环境,一个 plymouth 启动屏幕会显示出来
    • 如果您按下 'esc' 键,一个更详细的进度日志会显示出来,但是如果您切换至之前的图形显示进度条界面,进度条会一直停留在 0%,不过您不必担心因为升级实际上在运行。这是一个 Bug。
  5. 一旦更新完成,系统将会重启,grub 菜单会多出一个启动 Fedora 39 的选项

GRUB 更新

Note.png
这是可选的操作!
在已更新完毕的系统上升级 GRUB 严格意义上讲并不是必须的,但是对于 BIOS 类系统我们还是十分建议您做一下升级。而对于 UEFI 类系统我们强烈建议 升级 grub-efi 到 grub2-efi

更新 GRUB2 (BIOS 系统)

  • 升级完成后,之前安装的 grub2 仍然会启动 F17 版本,您需要手工升级

清理

在做发行版同步时重建RPM数据可以阻止RPMDB校验报错:

sudo rpm --rebuilddb

There are a collection of post-upgrade things to do. Some of which are fixed by doing a distro sync:

sudo yum distro-sync --setopt=deltarpm=0

The rpmconf tool searches for .rpmnew, .rpmsave and .rpmorig files and asks you what to do with them: Keep current version, place back old version, watch the diff or merge.

sudo yum install rpmconf

sudo rpmconf -a

If you are using google-chrome from the Google repository, you must re-install google-chrome due to a packaging bug on the Google side of things. Make sure to adjust the command to the build type you would like to install:

sudo yum remove google-chrome-\* && sudo yum install google-chrome-[beta,stable,unstable]