From Fedora Project Wiki
No edit summary
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{autolang}}
{{autolang}}
 
{{Update}}
{{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]]。如果出于安全考虑,您可以通过下载 ISO 镜像验证并升级来解决该问题。注意,Anaconda 和 Preupgrade 也不验证。}}


Line 68: Line 66:


# 执行下列命令准备升级
# 执行下列命令准备升级
#* {{command|sudo fedup-cli --network 18 --debuglog fedupdebug.log}}
#* {{command|sudo fedup-cli --network 18}}
# 一旦准备完毕,检查 {{filename|fedupdebug.log}} 文件查看是否有来自 {{command|fedup-cli}} 的错误输出
# 一旦准备完毕,检查 {{filename|/var/log/fedup.log}} 文件查看是否有来自 {{command|fedup-cli}} 的错误输出


=== ISO 文件 ===
=== ISO 文件 ===
Line 106: Line 104:


* '''升级完成后,之前安装的 grub2 仍然会启动 F17 版本,您需要手工升级'''
* '''升级完成后,之前安装的 grub2 仍然会启动 F17 版本,您需要手工升级'''
* 按照 [[GRUB_2|本页的说明]] 重新安装并升级 grub
*
 
=== 更新 GRUB (UEFI 系统) ===
{{admon/note|在 UEFI 系统上更新 GRUB  的问题|在稍晚些时候的测试中,我们发现手工升级 grub-efi 至 grub2-efi 会某些潜在严重问题,在解决方案尚未出来之前,我们建议用户先使用 grub-efi。}}
<!-- 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 主题|With the migration to grub2-efi in Fedora 18, you will see no grub splash after initial upgrade nor after upgrading to grub2-efi}}
 
Grub2 is not installed as part of the upgrade process, so you'll have to install it:
<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:
<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>:
<pre>
efibootmgr -v
</pre>
 
You are looking for a line similar to:
<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.
 
Remove the old boot entry using the following command (<nowiki><boot number></nowiki>) is the boot number you found above:
<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}}
 
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:
<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|稍等|本部分正在撰写。}}
<!-- Some of the stuff from [http://fedorasolved.org/Members/fenris02/post_upgrade_cleanup this post upgrade cleanup guide] might be wise -->

Revision as of 12:41, 28 December 2013

Outdated.png
This wiki page is outdated
Please update this wiki page to reflect recent events or newly available information.
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 fedup-cli --network 18
  2. 一旦准备完毕,检查 /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 条目继续
  4. 系统将会启动至升级环境,一个 plymouth 启动屏幕会显示出来
    • 如果您按下 'esc' 键,一个更详细的进度日志会显示出来,但是如果您切换至之前的图形显示进度条界面,进度条会一直停留在 0%,不过您不必担心因为升级实际上在运行。这是一个 Bug。
  5. 一旦更新完成,系统将会重启,grub 菜单会多出一个启动 Fedora 39 的选项

GRUB 更新

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

更新 GRUB2 (BIOS 系统)

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