Difference between revisions of "Upgrade Path"

From ArchWiki
Jump to: navigation, search
(Article is a stub)
m (grammar)
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Stub|Incomplete article}}
+
[[Category:System administration]]
 +
{{Warning|It is ''strongly advised'' to avoid the {{ic|--force}} switch as it is not safe. This will seriously break your system, especially for the {{ic|/lib}} update.}}
  
Collected here is an upgrade path from approximately <date> to a up-to-date archlinux system.
+
{{Note|[[mkinitcpio]] can fail during a kernel install, especially after a lengthy delay in updating. If it fails run it again manually before updating or the system will fail to boot}}
  
'''Warning:''' It is strongly advised to avoid the <tt>--force</tt> switch as it is not safe. This will seriously break your system, especially for the <tt>/lib</tt> update.
+
{{Note|Remember to deal with [[Pacnew and Pacsave Files]] after upgrading.}}
  
Remember to deal with <tt>.pacnew</tt>s and <tt>.pacsave</tt>s after upgrading
+
Archlinux upgrades occasionally require manual intervention to complete. While its best practise to regularly update an archlinux installation, sometimes this isn't possible and upgrading a system can be complicated by multiple simultaneous conflicting updates, especially since conflicts can interact with each other. Collected here are detailed instructions to bring old machines from various points of time up to date.
  
 
= Timeline =
 
= Timeline =
  
The timeline of recent breaking changes detailed here:
+
The timeline of recent breaking changes detailed on this page:
  
* [https://www.archlinux.org/news/end-of-initscripts-support/ End of initscripts support] '''2012-11-04'''
+
* '''2012-11-04''' [https://www.archlinux.org/news/end-of-initscripts-support/ End of initscripts support]
* [https://www.archlinux.org/news/fontconfig-2101-update-manual-intervention-required/ Fontconfig 2.10.1 update] '''2012-09-06'''
+
* '''2012-09-06''' [https://www.archlinux.org/news/fontconfig-2101-update-manual-intervention-required/ Fontconfig 2.10.1 update]
* [https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/ The /lib directory becomes a symlink] '''2012-07-14'''
+
* '''2012-07-14''' [https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/ The /lib directory becomes a symlink]
* [https://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required-1/ Symlinks to /run] '''2012-06-07'''
+
* '''2012-06-07''' [https://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required-1/ Symlinks to /run]
* [https://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required/ Symlinks to /proc/self/mounts] '''2011-12-20'''
+
* '''2011-12-20''' [https://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required/ Symlinks to /proc/self/mounts]
  
== End of initscripts support ==
+
= End of initscripts support =
  
As <tt>systemd</tt> is now the default init system, Arch Linux is receiving minimal testing on <tt>initscripts</tt> systems. Due to a lack of resources and interest, we are unlikely to work on fixing <tt>initscripts</tt>-specific bugs, and may close them as WONTFIX.
+
[[Systemd]] is now the default init system. Its strongly encourage for all users to migrate as soon as possible. Please refer to the [[Systemd]] page for more instructions.
  
We therefore strongly encourage all users to migrate to <tt>systemd</tt> as soon as possible. See the [https://wiki.archlinux.org/index.php/Systemd systemd migration guide].
+
= Fontconfig 2.10.1 update =
 
+
To ease the transition, <tt>initscripts</tt> support will remain in the official repositories for the time being, unless otherwise stated. As of January 2013, we will start removing <tt>initscripts</tt> support (e.g., <tt>rc</tt> scripts) from individual packages without further notice.
+
 
+
== Fontconfig 2.10.1 update - manual intervention required ==
+
  
 
The fontconfig 2.10.1 update overwrites symlinks created by the former package version. These symlinks need to be removed before the update:
 
The fontconfig 2.10.1 update overwrites symlinks created by the former package version. These symlinks need to be removed before the update:
  
<pre>rm /etc/fonts/conf.d/20-unhint-small-vera.conf
+
  rm /etc/fonts/conf.d/20-unhint-small-vera.conf
rm /etc/fonts/conf.d/20-fix-globaladvance.conf
+
  rm /etc/fonts/conf.d/20-fix-globaladvance.conf
rm /etc/fonts/conf.d/29-replace-bitmap-fonts.conf
+
  rm /etc/fonts/conf.d/29-replace-bitmap-fonts.conf
rm /etc/fonts/conf.d/30-metric-aliases.conf
+
  rm /etc/fonts/conf.d/30-metric-aliases.conf
rm /etc/fonts/conf.d/30-urw-aliases.conf
+
  rm /etc/fonts/conf.d/30-urw-aliases.conf
rm /etc/fonts/conf.d/40-nonlatin.conf
+
  rm /etc/fonts/conf.d/40-nonlatin.conf
rm /etc/fonts/conf.d/45-latin.conf
+
  rm /etc/fonts/conf.d/45-latin.conf
rm /etc/fonts/conf.d/49-sansserif.conf
+
  rm /etc/fonts/conf.d/49-sansserif.conf
rm /etc/fonts/conf.d/50-user.conf
+
  rm /etc/fonts/conf.d/50-user.conf
rm /etc/fonts/conf.d/51-local.conf
+
  rm /etc/fonts/conf.d/51-local.conf
rm /etc/fonts/conf.d/60-latin.conf
+
  rm /etc/fonts/conf.d/60-latin.conf
rm /etc/fonts/conf.d/65-fonts-persian.conf
+
  rm /etc/fonts/conf.d/65-fonts-persian.conf
rm /etc/fonts/conf.d/65-nonlatin.conf
+
  rm /etc/fonts/conf.d/65-nonlatin.conf
rm /etc/fonts/conf.d/69-unifont.conf
+
  rm /etc/fonts/conf.d/69-unifont.conf
rm /etc/fonts/conf.d/80-delicious.conf
+
  rm /etc/fonts/conf.d/80-delicious.conf
rm /etc/fonts/conf.d/90-synthetic.conf
+
  rm /etc/fonts/conf.d/90-synthetic.conf
pacman -Sy fontconfig</pre>
+
  pacman -Sy fontconfig
 +
 
 
Main systemwide configuration should be done by symlinks (especially for autohinting, sub-pixel and lcdfilter):
 
Main systemwide configuration should be done by symlinks (especially for autohinting, sub-pixel and lcdfilter):
  
<pre>cd /etc/fonts/conf.d
+
  cd /etc/fonts/conf.d
ln -s ../conf.avail/XX-foo.conf</pre>
+
  ln -s ../conf.avail/XX-foo.conf
Also check [https://wiki.archlinux.org/index.php/Font_Configuration Font Configuration] and [https://wiki.archlinux.org/index.php/Fonts Fonts].
+
  
== The /lib directory becomes a symlink ==
+
For more information, refer to [https://wiki.archlinux.org/index.php/Font_Configuration Font Configuration] and [https://wiki.archlinux.org/index.php/Fonts Fonts].
  
'''Note:''' for installs that have not been updated to glibc-2.16, it will save you lots of time and prevent major breakage to do: pacman -U http://pkgbuild.com/~allan/glibc-2.16.0-1-<arch>.pkg.tar.xz where <arch> is replaced by i686 or x86_64 as required. Add a single &quot;-d&quot; if needed. The instructions below assume that this has been done.
+
= The /lib directory becomes a symlink =
  
All Arch Linux packages have had their files in the <tt>/lib</tt> directory moved to <tt>/usr/lib</tt> and now <tt>/lib</tt> is a symlink to <tt>usr/lib</tt>. When performing this update, pacman will likely identify a conflict in the <tt>/lib</tt> directory. In the simplest case, this is worked around by doing:
+
All Arch Linux packages have had their files in the {{ic|/lib}} directory moved to {{ic|/usr/lib}} and now {{ic|/lib}} is a symlink to {{ic|usr/lib}}. When performing this update, pacman will likely identify a conflict in the {{ic|/lib}} directory. In the simplest case, this is worked around by doing:
  
<pre>pacman -Syu --ignore glibc
+
Instructions for dealing with this update have been enumerated here. Please read this page very carefully before proceeding.
pacman -Su</pre>
+
If either of this steps does not work (e.g. due to dependency version issues, file conflicts in <tt>/lib</tt>), refer to this guide for more detailed instructions on performing this upgrade.
+
  
 
https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib
 
https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib
  
== filesystem upgrade - manual intervention required ==
+
= Upgrading Filesystem =
 +
 
 +
Upgrading the filesystem package can get tricky since there are several different breaking changes that may have accumulated over time that somewhat interact with each other. Pick the section below that best describes the conflict you see for instructions to bring the {{ic|filesystem}} package up to date.
 +
 
 +
== Symlinks to /run and /run/lock ==
 +
 
 +
As of {{ic|filesystem-2012.6-2}} the folders {{ic|/var/run}} and {{ic|/var/lock}} will be replaced by symlinks to {{ic|/run}} and {{ic|/run/lock}}, respectively.
 +
 
 +
On most systems this is already the case, as {{ic|initscripts}} create the symlinks on boot. However, these symlinks are not owned by any package, which is what we are fixing with this upgrade.
 +
 
 +
If the symlinks are already in place on your system (which should be the case for most people), then you can simply perform:
  
As of <tt>filesystem-2012.6-2</tt> the folders <tt>/var/run</tt> and <tt>/var/lock</tt> will be replaced by symlinks to <tt>/run</tt> and <tt>/run/lock</tt>, respectively.
+
  pacman -Sy
 +
  rm -r /var/{lock,run} /etc/profile.d/locale.sh
 +
  pacman -S filesystem
  
On most systems this is already the case, as <tt>initscripts</tt> create the symlinks on boot. However, these symlinks are not owned by any package, which is what we are fixing with this upgrade.
+
Then reboot the system before continuing along with the upgrade.
  
If the symlinks are already in place on your system (which should be the case for most people), then you can simply perform
+
If upgrading while running a kernel prior to {{ic|linux-3.4}}, you will get a warning about permissions on {{ic|/sys}}. This is nothing to worry about; as of {{ic|linux-3.4}}, the permissions will be {{ic|555}}, and this upgrade reflects this in the {{ic|filesystem}} package.
  
<pre>pacman -Syu --ignore filesystem &amp;&amp; pacman -S filesystem --force</pre>
+
== Conflict with mtab ==
Otherwise, if <tt>/var/run</tt> or <tt>/var/lock</tt> are directories (e.g. if you are using <tt>systemd</tt> and never booted with <tt>initscripts</tt>) you need to delete the directories before performing the update. As these directories are used at runtime, it is recommended to shutdown any background tasks before performing
+
  
<pre>pacman -Syu --ignore filesystem &amp;&amp; rm -rf /var/run /var/lock &amp;&amp; \
+
The file {{ic|/etc/mtab}} used to be generated at boot and hence was not owned by any package. Now it is a symlink to {{ic|/proc/self/mounts}} owned by {{ic|filesystem}}. This change means that {{ic|initscripts}} no longer requires write access to the rootfs (though other packages might).
    pacman -S filesystem</pre>
+
Followed by a reboot before using the system again.
+
  
Lastly, on upgrading <tt>filesystem</tt> users of kernels prior to <tt>linux-3.4</tt> will get a warning about permissions on <tt>/sys</tt>. This is nothing to worry about, as of <tt>linux-3.4</tt> the permissions will be <tt>555</tt>, and this upgrade reflects this in the <tt>filesystem</tt> package.
+
However, following the instructions in the news, while sufficient for dealing with this conflict at the time, will now interact with later {{ic|filesystem}} update. To upgrade do
  
== filesystem upgrade - manual intervention required ==
+
  pacman -Sy
 +
  pacman -S initscripts
 +
  rm -r /var/{lock,run} /etc/mtab
  
When upgrading to <tt>filesystem-2011.12</tt> there will be a conflict with <tt>/etc/mtab</tt>.
+
Now you'll need to comment out {{ic|CheckSpace}} in {{ic|/etc/pacman.conf}} as pacman needs to access {{ic|/etc/mtab}} to enable this feature. It is highly recommended to re‐enable it after dealing with the conflict.
  
Install the package as follows:
+
  pacman -S filesystem
  
<pre>pacman -S filesystem --force</pre>
+
And then reboot the system before continuing along with the upgrade as described in the previous section.
The reason for the conflict is that the file used to be generated at boot and hence not owned by any package. Now it is a symlink to <tt>/proc/self/mounts</tt> owned by <tt>filesystem</tt>. This change means that <tt>initscripts</tt> no longer requires write access to the rootfs (though other packages might).
+

Revision as of 13:58, 29 May 2013

Warning: It is strongly advised to avoid the --force switch as it is not safe. This will seriously break your system, especially for the /lib update.
Note: mkinitcpio can fail during a kernel install, especially after a lengthy delay in updating. If it fails run it again manually before updating or the system will fail to boot
Note: Remember to deal with Pacnew and Pacsave Files after upgrading.

Archlinux upgrades occasionally require manual intervention to complete. While its best practise to regularly update an archlinux installation, sometimes this isn't possible and upgrading a system can be complicated by multiple simultaneous conflicting updates, especially since conflicts can interact with each other. Collected here are detailed instructions to bring old machines from various points of time up to date.

Timeline

The timeline of recent breaking changes detailed on this page:

End of initscripts support

Systemd is now the default init system. Its strongly encourage for all users to migrate as soon as possible. Please refer to the Systemd page for more instructions.

Fontconfig 2.10.1 update

The fontconfig 2.10.1 update overwrites symlinks created by the former package version. These symlinks need to be removed before the update:

 rm /etc/fonts/conf.d/20-unhint-small-vera.conf
 rm /etc/fonts/conf.d/20-fix-globaladvance.conf
 rm /etc/fonts/conf.d/29-replace-bitmap-fonts.conf
 rm /etc/fonts/conf.d/30-metric-aliases.conf
 rm /etc/fonts/conf.d/30-urw-aliases.conf
 rm /etc/fonts/conf.d/40-nonlatin.conf
 rm /etc/fonts/conf.d/45-latin.conf
 rm /etc/fonts/conf.d/49-sansserif.conf
 rm /etc/fonts/conf.d/50-user.conf
 rm /etc/fonts/conf.d/51-local.conf
 rm /etc/fonts/conf.d/60-latin.conf
 rm /etc/fonts/conf.d/65-fonts-persian.conf
 rm /etc/fonts/conf.d/65-nonlatin.conf
 rm /etc/fonts/conf.d/69-unifont.conf
 rm /etc/fonts/conf.d/80-delicious.conf
 rm /etc/fonts/conf.d/90-synthetic.conf
 pacman -Sy fontconfig

Main systemwide configuration should be done by symlinks (especially for autohinting, sub-pixel and lcdfilter):

 cd /etc/fonts/conf.d
 ln -s ../conf.avail/XX-foo.conf

For more information, refer to Font Configuration and Fonts.

The /lib directory becomes a symlink

All Arch Linux packages have had their files in the /lib directory moved to /usr/lib and now /lib is a symlink to usr/lib. When performing this update, pacman will likely identify a conflict in the /lib directory. In the simplest case, this is worked around by doing:

Instructions for dealing with this update have been enumerated here. Please read this page very carefully before proceeding.

https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib

Upgrading Filesystem

Upgrading the filesystem package can get tricky since there are several different breaking changes that may have accumulated over time that somewhat interact with each other. Pick the section below that best describes the conflict you see for instructions to bring the filesystem package up to date.

Symlinks to /run and /run/lock

As of filesystem-2012.6-2 the folders /var/run and /var/lock will be replaced by symlinks to /run and /run/lock, respectively.

On most systems this is already the case, as initscripts create the symlinks on boot. However, these symlinks are not owned by any package, which is what we are fixing with this upgrade.

If the symlinks are already in place on your system (which should be the case for most people), then you can simply perform:

 pacman -Sy
 rm -r /var/{lock,run} /etc/profile.d/locale.sh
 pacman -S filesystem

Then reboot the system before continuing along with the upgrade.

If upgrading while running a kernel prior to linux-3.4, you will get a warning about permissions on /sys. This is nothing to worry about; as of linux-3.4, the permissions will be 555, and this upgrade reflects this in the filesystem package.

Conflict with mtab

The file /etc/mtab used to be generated at boot and hence was not owned by any package. Now it is a symlink to /proc/self/mounts owned by filesystem. This change means that initscripts no longer requires write access to the rootfs (though other packages might).

However, following the instructions in the news, while sufficient for dealing with this conflict at the time, will now interact with later filesystem update. To upgrade do

 pacman -Sy
 pacman -S initscripts
 rm -r /var/{lock,run} /etc/mtab

Now you'll need to comment out CheckSpace in /etc/pacman.conf as pacman needs to access /etc/mtab to enable this feature. It is highly recommended to re‐enable it after dealing with the conflict.

 pacman -S filesystem

And then reboot the system before continuing along with the upgrade as described in the previous section.