From Fedora Project Wiki
m (Created page with 'Category:DocumentationCategory:How toCategory:PreUpgrade PreUpgrade - это приложение, предназначенное для запуска на суще...')
 
mNo edit summary
Line 9: Line 9:


# ''Backup - Резервное копирование'' - прежде чем выполнять любые действия по техническому обслуживанию системы, рекомендуется выполнить резервное копирование важных данных.  
# ''Backup - Резервное копирование'' - прежде чем выполнять любые действия по техническому обслуживанию системы, рекомендуется выполнить резервное копирование важных данных.  
# ''Update'' - Apply available updates Fedora updates before proceedingAs the root user, issue the following command. <pre>yum update</pre>
# ''Update - Обновление'' - примените доступные обновления Fedora до того как запустите preupgradeС правами root, выполните следующую команду. <pre>yum update</pre>
# ''Install'' - As of {{FedoraVersion|long|10}}, the preupgrade utility is included in a default Fedora installHowever, the package can be installed manually using the {{command|yum}} command. <pre>yum install preupgrade</pre>
# ''Install'' - В {{FedoraVersion|long|10}}, утилита preupgrade включена по умолчанию в дистрибутивЕсли пакет не установлен, его можно установить вручную с помощью команды {{command|yum}}. <pre>yum install preupgrade</pre>


= Perform the upgrade =
= Выполнение обновления =


Typically, you will be prompted by {{package|PackageKit}} when upgrades are available for your systemHowever, if you choose to manually upgrade using {{command|preupgrade}}, the steps are listed below.
Как правило о появившихся обновлениях сообщает {{package|PackageKit}}.  Однако, если вы выбрали ручной способ обновления с помощью {{command|preupgrade}}, необходимо выполнить следующие шаги.


# As the root user, run the command {{command|preupgrade}} to start the Preupgrade applicationIf you prefer a command line application, the command {{command|preupgrade-cli}} is available.
# С правами root, выполните команду {{command|preupgrade}} чтобы запустить приложение Preupgrade.  Если вы предпочитаете консольные приложения используйте {{command|preupgrade-cli}}.
# On the ''Choose desired release'' screen, select the Fedora release you want to upgrade to , and click the ''Apply'' button.
# На экране ''Choose desired release'', выберите выпуск Fedora до которого хотите обновиться и нажмите кнопку ''Apply''.
# When all of the packages have downloaded, reboot your system to start the Fedora installer and upgrade to the next release.  
# Когда все пакеты будут загружены, перезапустите систему, чтобы запустить установщик Fedora и обновиться до следующего выпуска.  


= Common post-upgrade tasks =
= Необходимые действия после обновления =


After the upgrade is complete, additional steps are recommended to complete the process.
После завершения действия, описанного в предыдущем пункте, рекомендуется выполнить следующие действия чтобы завершить процесс обновления.


== Removing unsupported packages ==
== Удаление неподдерживаемых пакетов ==


Some packages may no longer be supported by the new releaseYou may wish to remove these packages because they will no longer get security updates, and they may cause later conflicts with supported packagesThese can be identified with the following command: <pre>package-cleanup --orphans</pre>
Некоторые пакеты могут не поддерживаться в новом выпуске ОСВозможно вы захотите удалить эти пакеты, т.к. для них будут отсутствовать обновления безопасности и они могут конфликтовать с поддерживаемыми пакетамиИх пожмно найти с помощью: <pre>package-cleanup --orphans</pre>


== Examine {{filename|.rpmsave}} and {{filename|.rpmnew}} files ==
== Examine {{filename|.rpmsave}} and {{filename|.rpmnew}} files ==


After completing the upgrade process, you may notice file names ending with {{filename|.rpmsave}} and {{filename|.rpmnew}}.  Don't be alarmedThe upgrade process will always preserve any locally modified configuration filesThe file names ending with {{filename|.rpmsave}} contain your local configuration changes. While the file names ending with {{filename|.rpmnew}} represent the configuration file originally packages with the software.
После обновления вы можете заметить файлы заканчивающиеся на {{filename|.rpmsave}} и {{filename|.rpmnew}}.  Не волнуйтесьПроцесс обновления всегда резервирует локальные файлы настроекФайлы, заканчивающиеся на {{filename|.rpmsave}} содержат измененные вами файлы настроек. А файлы, заканчивающиеся на {{filename|.rpmnew}} содержат файлы настроек поставляемые с пакетами.


You should examine all {{filename|.rpmsave}} and {{filename|.rpmnew}} files created by the upgradeDepending on the differences, you may need to manually merge configuration filesYou can locate all matching files using the {{command|find}} command.
Вам нужно проверить файлы {{filename|.rpmsave}} и {{filename|.rpmnew}} созданные программой обновленияВ зависимости от различий, возможно потребуется слияние файлов настроекВы можете найти все подобные файлы с помощью команды {{command|find}}.


<pre>find / -print | egrep "rpmnew$|rpmsave$"</pre>
<pre>find / -print | egrep "rpmnew$|rpmsave$"</pre>


= Troubleshooting =
= Устранение проблем =


== Not enough space in /boot ==
== Не достаточно места на разделе /boot ==


Fedora 13 and above has a 500 MB default boot partition. The default {{filename|/boot}} filesystem size of 200MB for previous releases can be a problem for users upgrading from that releaseIn many cases, the diskspace that is likely free is just enough for preupgrade to find enough space to download the installer to but not quite enough for it to run the installer and install the new kernel after reboot. This section outlines several tips that have been known to work. As always when performing administrative tasks, be sure to back-up any data before proceeding.
Fedora 13 и выше создает boot раздел на 500 MB по умолчанию. Размер файловой системы {{filename|/boot}} на 200MB для предыдущих выпусков может вызвать проблемы при обновленииВ большинстве случаев свободного места будет достаточно для выполнения загрузки программы установки preupgrade, но недостаточно для того, чтобы запустить программу установки и установить новое ядро после перезагрузки системы. В данном рзделе приводятся некоторые советы, позволяющие решить данную проблему. Как всегда, при выполнении административных задач, убедитесь, что выполнено резервное копирование всех данных.


There are two basic methods to make preupgrade work in this situationIn the first method, you need to free up sufficient space for the installer to install the new kernel packages.  In the second method, you need to temporarily fill up enough of the space on {{filename|/boot}} to force preupgrade to download the installer after rebooting.
Существует два основных метода, чтобы выполнить заставить preupgrade работать в данной ситуацииПервый заключается в том, чтобы освободить достаточно свободного месла для программы установки и для ядра.  In the second method, you need to temporarily fill up enough of the space on {{filename|/boot}} to force preupgrade to download the installer after rebooting.


=== Method 1: Free up space ===
=== Метод 1: Освободить место ===


'''First''', try to remove any kernel packages not currently in use on your systemThe [http://skvidal.fedorapeople.org/misc/kernel-prune.py kernel-prune.py] script can be used to identify kernels that may be safely removedIf you choose to remove additional kernels, be prepared with [http://fedoraproject.org/en/get-fedora installation media] should you be unable to return to your previously installed system.
'''Сначала''', попробуйте удалить файлы ядра, которое не используются, в данный момент, системойСкрипт [http://skvidal.fedorapeople.org/misc/kernel-prune.py kernel-prune.py] позволить определить ядра, которые могут быть безопастно удаленыЕсли вы выбрали удаление дополнительных ядер, приготовьте [http://fedoraproject.org/en/get-fedora установочный носитель], чтобы иметь возможность вернуться к установленной ранее системе.


The installer will need approximately 26M of free space in /boot.  Use the following command to determine the amount of free space in the /boot partition:
Программа установки потребует около 26M свободного места на разделе /boot.  Используйте следующую команду для определения объема свободного пространства на /boot разделе:


<pre>
<pre>
Line 54: Line 54:
</pre>
</pre>


To identify kernels that may be safely removed, run the following from a command line:
Для определения ядер, которые могут быть безопасно удалены, выполните следующую команду:
<pre>
<pre>
curl -O 'http://skvidal.fedorapeople.org/misc/kernel-prune.py'
curl -O 'http://skvidal.fedorapeople.org/misc/kernel-prune.py'
Line 61: Line 61:
</pre>
</pre>


Now, to actually remove the kernel versions listed by the above command, run the following as root:
Теперь, чтобы удалить ядра перечисленные предыдущей командой, запустите следующие команды с правами root:
<pre>
<pre>
# PKGS=`./kernel-prune.py`
# PKGS=`./kernel-prune.py`
Line 69: Line 69:




'''Next''', adjust the number of reserved filesystem blocks using the command {{command|tune2fs}}.  You'll first need to identify the block device for your {{filename|/boot}} file systemIn the example below, {{filename|/dev/sda1}} is the block device for the {{filename|/boot}} filesystem.
'''Затем''', настройте количество зарезервированных блоков с помощью команды {{command|tune2fs}}.  Сначала вам потребуется определить блочное устройство для файловой системы {{filename|/boot}}.  В примере ниже, файловая система {{filename|/boot}} является блочным устройством {{filename|/dev/sda1}}.
<pre># mount | grep "/boot"
<pre># mount | grep "/boot"
/dev/sda1 on /boot type ext4 (rw)</pre>
/dev/sda1 on /boot type ext4 (rw)</pre>
Now, adjust the number of reserved blocks for the {{filename|/boot}} filesystem using the command {{command|tune2fs}}. Normally, a small amount of space on ext filesystem formatted partitions is 'reserved' and can only be used by the system administrator; this is to prevent an entirely full partition from rendering a system unbootable, and allow the administrator some space in which to work in order to clean up 'full' partitions. However, neither of this cases really applies to the {{filename|/boot}} filesystem, so removing this reserved space is safe.
Теперь измените количество зарезервированных блоков для файловой системы {{filename|/boot}} с помощью команды {{command|tune2fs}}. Normally, a small amount of space on ext filesystem formatted partitions is 'reserved' and can only be used by the system administrator; this is to prevent an entirely full partition from rendering a system unbootable, and allow the administrator some space in which to work in order to clean up 'full' partitions. However, neither of this cases really applies to the {{filename|/boot}} filesystem, so removing this reserved space is safe.
<pre># tune2fs -r 0 /dev/sda1</pre>
<pre># tune2fs -r 0 /dev/sda1</pre>



Revision as of 09:34, 1 June 2010


PreUpgrade - это приложение, предназначенное для запуска на существующей Fedora 8 и выше, позволяющее разрешать зависимости пакетов и загрузать пакеты необходимые для обновления Fedora. Хотя PreUpgrade загружает новые пакеты, пользователи могут продолжать использовать свои системы. Что позволяет получить опыт подобный тому, что приобретается от использования live upgrade. Больше можно узнать на странице PreUpgrade feature page.

Idea.png
Обновляйте системы до текущего выпуска сразу
Preupgrade предоставляет возможность обновления до последней версии Fedora. Не необходимости выполнять обновление до промежуточных версий. Например, возможно обновиться с Fedora 38 до Fedora 40 directly.

Подготовка системы

Хотя preupgrade в основном получить обпыт по обновлению системы без дополнительных проблем. Рекомендуется выполнить следующие действия прежде чем продолжить.

  1. Backup - Резервное копирование - прежде чем выполнять любые действия по техническому обслуживанию системы, рекомендуется выполнить резервное копирование важных данных.
  2. Update - Обновление - примените доступные обновления Fedora до того как запустите preupgrade. С правами root, выполните следующую команду.
    yum update
  3. Install - В Fedora 10, утилита preupgrade включена по умолчанию в дистрибутив. Если пакет не установлен, его можно установить вручную с помощью команды yum.
    yum install preupgrade

Выполнение обновления

Как правило о появившихся обновлениях сообщает Package-x-generic-16.pngPackageKit. Однако, если вы выбрали ручной способ обновления с помощью preupgrade, необходимо выполнить следующие шаги.

  1. С правами root, выполните команду preupgrade чтобы запустить приложение Preupgrade. Если вы предпочитаете консольные приложения используйте preupgrade-cli.
  2. На экране Choose desired release, выберите выпуск Fedora до которого хотите обновиться и нажмите кнопку Apply.
  3. Когда все пакеты будут загружены, перезапустите систему, чтобы запустить установщик Fedora и обновиться до следующего выпуска.

Необходимые действия после обновления

После завершения действия, описанного в предыдущем пункте, рекомендуется выполнить следующие действия чтобы завершить процесс обновления.

Удаление неподдерживаемых пакетов

Некоторые пакеты могут не поддерживаться в новом выпуске ОС. Возможно вы захотите удалить эти пакеты, т.к. для них будут отсутствовать обновления безопасности и они могут конфликтовать с поддерживаемыми пакетами. Их пожмно найти с помощью:

package-cleanup --orphans

Examine .rpmsave and .rpmnew files

После обновления вы можете заметить файлы заканчивающиеся на .rpmsave и .rpmnew. Не волнуйтесь. Процесс обновления всегда резервирует локальные файлы настроек. Файлы, заканчивающиеся на .rpmsave содержат измененные вами файлы настроек. А файлы, заканчивающиеся на .rpmnew содержат файлы настроек поставляемые с пакетами.

Вам нужно проверить файлы .rpmsave и .rpmnew созданные программой обновления. В зависимости от различий, возможно потребуется слияние файлов настроек. Вы можете найти все подобные файлы с помощью команды find.

find / -print | egrep "rpmnew$|rpmsave$"

Устранение проблем

Не достаточно места на разделе /boot

Fedora 13 и выше создает boot раздел на 500 MB по умолчанию. Размер файловой системы /boot на 200MB для предыдущих выпусков может вызвать проблемы при обновлении. В большинстве случаев свободного места будет достаточно для выполнения загрузки программы установки preupgrade, но недостаточно для того, чтобы запустить программу установки и установить новое ядро после перезагрузки системы. В данном рзделе приводятся некоторые советы, позволяющие решить данную проблему. Как всегда, при выполнении административных задач, убедитесь, что выполнено резервное копирование всех данных.

Существует два основных метода, чтобы выполнить заставить preupgrade работать в данной ситуации. Первый заключается в том, чтобы освободить достаточно свободного месла для программы установки и для ядра. In the second method, you need to temporarily fill up enough of the space on /boot to force preupgrade to download the installer after rebooting.

Метод 1: Освободить место

Сначала, попробуйте удалить файлы ядра, которое не используются, в данный момент, системой. Скрипт kernel-prune.py позволить определить ядра, которые могут быть безопастно удалены. Если вы выбрали удаление дополнительных ядер, приготовьте установочный носитель, чтобы иметь возможность вернуться к установленной ранее системе.

Программа установки потребует около 26M свободного места на разделе /boot. Используйте следующую команду для определения объема свободного пространства на /boot разделе:

df -h /boot

Для определения ядер, которые могут быть безопасно удалены, выполните следующую команду:

curl -O 'http://skvidal.fedorapeople.org/misc/kernel-prune.py'
chmod a+x kernel-prune.py
./kernel-prune.py

Теперь, чтобы удалить ядра перечисленные предыдущей командой, запустите следующие команды с правами root:

# PKGS=`./kernel-prune.py`
# echo $PKGS
# yum remove $PKGS


Затем, настройте количество зарезервированных блоков с помощью команды tune2fs. Сначала вам потребуется определить блочное устройство для файловой системы /boot. В примере ниже, файловая система /boot является блочным устройством /dev/sda1.

# mount | grep "/boot"
/dev/sda1 on /boot type ext4 (rw)

Теперь измените количество зарезервированных блоков для файловой системы /boot с помощью команды tune2fs. Normally, a small amount of space on ext filesystem formatted partitions is 'reserved' and can only be used by the system administrator; this is to prevent an entirely full partition from rendering a system unbootable, and allow the administrator some space in which to work in order to clean up 'full' partitions. However, neither of this cases really applies to the /boot filesystem, so removing this reserved space is safe.

# tune2fs -r 0 /dev/sda1

Last, try removing unnecessary files from the /boot filesystem. This will largely depend on how your system is set up. Removing the incorrect files may result in a unbootable system. Some candidates for removal include /boot/efi and /boot/grub/splash.xpm.gz.

Method 2: Trick preupgrade into downloading the installer

This method requires you to have a wired connection to the internet during the install. If you are on wireless and cannot connect via an ethernet cable you will have to use Method 1 instead.

First, find out how much space is available on the /boot filesystem. df is the command you want for this:

$ df /boot
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1               198337     30543    157554  17% /boot

Second, create a file that takes up enough space that preupgrade decides it cannot install stage2 now. Preupgrade needs approximately 120MB for the installer image so we'll make sure we have a bit less than 100MB. For the example filesystem, that means we need to fill up 60MB. Here's how to do that as root:

# dd if=/dev/zero of=/boot/preupgrade_filler bs=1024 count=61440
# df /boot
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1               198337     92224     95873  50% /boot

Third, run preupgrade as normal. In the early stages, before downloading packages, preupgrade should tell you that there wasn't enough room to download part of the installer but it can download it after reboot if you have a wired connection to the network. You can click continue for that. When preupgrade is done don't reboot immediately. Instead, remove the /boot/preupgrade_filler file and make sure your computer is connected to the network via an ethernet cable. Then you can reboot.

# rm /boot/preupgrade_filler

Fourth, the computer should boot into the installer, connect to the internet via the ethernet cable and start downloading the stage2 installer image. Then it should continue upgrading as normal.


Upgrade does not install upon reboot

Explanation

If you have a multiboot configuration, the /boot menu that grub uses might be different from the /boot menu that preupgrade modifies. In this case, you will need to point grub to the appropriate file to complete upgrade upon reboot. If this is not done, once preupgrade has completed downloading and installing files, upon reboot no change will be visible. The system will simply reboot as to the older version.

Preupgrade boots into an upgrade kernel as an intermediate step. Once the system has been upgraded, preupgrade replaces the temporary upgrade kernel option with an option for the upgraded kernel. In other words, there are two modifications made to the bootloader: a temporary upgrade option, followed by an option that is permanent until the next upgrade.

The grub bootloader can be used to boot from its command line, or /boot/grub/menu.lst can be modified to create a boot menu option. (Example screenshot of grub boot menu.) (For further detail on grub, refer to the grub manual.)

Either grub option can be used for either preupgrade step. To be comprehensive, the following describes both the command line option and doing so by editing the menu.lst file.

However, since the upgrade should only be run once, and the upgraded system will probably require repeated booting, the most expedient approach is probably to manually boot the upgrade via the grub command line, then once the upgrade has completed, to add an option to menu.lst add the upgraded Fedora installation to the grub boot menu. This would correspond to using Method 1, Steps 1 - 3, followed by Method 2, Step 4.


Method 1: Boot Manually from Grub Command Line

STEP 1: Identify Partition Location

Identify the drive and partition of your Fedora /boot folder. (See Grub Naming Convention for details.) For example, if you installed Fedora entirely on the fourteenth partition of a second hard drive, /boot would be located on root (hd1,13)


STEP 2: Boot from Partition Location

Upon reboot, enter 'c' to enter the grub command line. Using the appropriate drive and partition numbers, enter the following commands:

root (hd1,13)
kernel /boot/upgrade/vmlinuz
initrd /boot/upgrade/initrd.img
boot

This will boot the upgrade installation.


STEP 3: Select Installation Image

The upgrade installation will then run an ncurses dialog. After selecting language and keyboard types, select hard drive for installation method. The next dialog box will require partition and directory information of the installation image. Select the partition from the drop-down menu. (Note that the numbering will be one off from the grub partition. In other words root (hd1,13) will appear as /dev/sdf14.) Finally, enter the location of the install image file: /boot/upgrade/install.img.

The installation will run normally at this point. After completing the upgrade, you will need to either boot the upgraded system manually by entering the newly installed kernel and initrd.img files at the grub command line, or add an entry to the menu.lst file. This step is detailed in the next section.


Method 2: Edit the Grub menu.lst File

As an alternative to entering the commands at the grub command prompt upon reboot, you can also edit grub's menu.lst file to add an option that will allow you to select booting to the upgrade process from grub's boot menu. Since the upgrade should only be run once, after you've upgraded you will then need to re-edit menu.lst, remove the upgrade boot menu option, and add a boot entry for the new kernel.


STEP 1: Identify Partition Location

Identify the drive and partition of your Fedora /boot folder. Grub Naming Convention. For example, if you installed Fedora entirely on the fourteenth partition of a second hard drive, /boot would be located on root (hd1,13)


STEP 2: Edit menu.lst

Locate and open the /boot/grub/menu.lst file that grub actually uses. If this file is on another partition, check the /media files.

Using the appropriate drive and partition information in the root line format, add the following entry to the menu.lst file:

title Fedora Upgrade
root (hd*,*)
kernel /boot/upgrade/vmlinuz
initrd /boot/upgrade/initrd.img
savedefault
boot

Save the file, and reboot. Select the Fedora Upgrade from the grub boot menu.


STEP 3: Select Installation Image

The upgrade installation will then run an ncurses dialog. After selecting language and keyboard types, select hard drive for installation method. The next dialog box will require partition and directory information of the installation image. Select the partition from the drop-down menu. (Note that the numbering will be one off from the grub partition. In other words root (hd1,13) will appear as /dev/sdf14.)

Finally, enter the location of the install image file: /boot/upgrade/install.img. The installation will run normally at this point.


STEP 4: Cleanup menu.lst

After completing the upgrade, you will need to either boot the upgraded system manually by entering the newly installed kernel and initrd.img files at the grub command line, or by adding an entry to the menu.lst file.

The following is an example of a grub entry for a Fedora Core 10 installation, located on the fourteenth partition of the second hard drive.

title Fedora Core 10 (on /dev/sdb14)
root (hd1,13)
kernel /boot/vmlinuz-2.6.27.5-117.fc10.x86_64 ro quiet splash
initrd /boot/initrd-2.6.27.5-117.fc10.x86_64
savedefault
boot

Locate the updated kernel and initrd files located in the /boot folder of the Fedora partition, and create an entry with modified title, kernel, and initrd lines that will match those of the upgrade.

Finally, remove the upgrade boot entry from menu.lst.