Upgrading Alpine - v1.9.x: Difference between revisions

From Alpine Linux
(added instructions to upgrade software from http repositories)
(Merge content into "Upgrading Alpine", make redirect page)
 
(21 intermediate revisions by 9 users not shown)
Line 1: Line 1:
This document covers upgrading from a previous version of Alpine 1.9 (or 1.10) to newer versions of 1.9 (or 1.10). Thanks to many improvements in Alpine 1.9, it is possible to easily upgrade in most scenarios.
#REDIRECT [[Upgrading Alpine]]
 
All examples/instructions/actions mentioned in this document should be executed on the box that you are planning to upgrade (unless you are instructed otherwise).
 
== Upgrading an Alpine Linux Hard-disk installation ==
 
When Alpine is installed to hard drive, upgrading the installation is simple.
 
{{Using_Internet_Repositories_for_apk-tools}}
 
Ensure you have the latest available version of the Alpine Package Manager first before upgrading anything else:
apk add -u apk-tools
 
Finally, upgrade all remaining packages, including the kernel if applicable:
apk upgrade
 
== Upgrading Separate Boot Media ==
 
You may have an installation where the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information. In this case, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO. If you are booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine box.
 
== Upgrading Alpine on CF/USB ==
 
Your installation may consist of Alpine running on Compact Flash or USB media. In most cases, it should be sufficient to upgrade most packages using the '''Alpine Hard-disk Installation''' upgrade procedures described above. However, for new packages to survive after a reboot, you should enable [[How_to_enable_APK_caching|APK caching]].
 
{{Warning|As the newer version of alpine may include kernel upgrades, simply pointing the Alpine Package Manager to an Internet-based repository and running ''apk upgrade'' will not be enough, as kernel components are not upgraded when Alpine is run from memory.}}
 
{{Upgrading_Alpine_environmentvars}}
 
=== Upgrade Step-by-Step ===
 
Start by checking that you have enough space on your media.<BR>
You need at least 400MB available space.
df -h | grep "Filesystem\|$LBU_MEDIA"
 
==== Download and verify new release ====
 
Start downloading a new '.iso' and a '.sha1' file
cd /media/$LBU_MEDIA
Seems files are under releases not iso anymore...
  http://dl-3.alpinelinux.org/alpine/v1.10/releases/alpine-1.10.1-x86.iso
 
wget -c {{Latest_1.10_alpine_iso-mirror}}{{Latest_1.10_alpine_iso-filename}}
wget http://dev.alpinelinux.org/alpine/v1.10/iso/{{Latest_1.10_alpine_iso-filename}}.sha1
 
Check integrity of the downloaded files ''(it might take some time)''
sha1sum -c {{Latest_1.10_alpine_iso-filename}}.sha1
''The output of the above command should say 'OK'.<BR>''
''If says 'FAILED', delete the iso file and download it again.''
 
==== Copy the new release  ====
 
Mount the ISO.
mount -t iso9660 {{Latest_1.10_alpine_iso-filename}} /mnt
Back up files that you have modified. For example, you might have modified ''syslinux.cfg'' to show console output on a serial port.<BR>
 
cp /media/$LBU_MEDIA/syslinux.cfg /media/$LBU_MEDIA/syslinux.cfg.my
 
Install the '''rsync''' package if necessary, and copy the files:
 
cd /mnt
apk add rsync
rsync --delete -rltv .alpine-release * /media/$LBU_MEDIA/
 
Restore your backed up files ''(in case you had any)''
 
mv -f /media/$LBU_MEDIA/syslinux.cfg.my /media/$LBU_MEDIA/syslinux.cfg
 
Make sure that all files are permanently saved in right place
 
sync
 
==== Clean up ====
Clean up the downloaded/unpacked files
cd ..
umount /mnt
rm /media/$LBU_MEDIA/{{Latest_1.10_alpine_iso-filename}}
rm /media/$LBU_MEDIA/{{Latest_1.10_alpine_iso-filename}}.sha1
 
=== Save changes ===
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).
lbu ci
 
=== Load new kernel ===
In most cases you will need to reboot Alpine (especially if there are changes in the kernel):
reboot
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}
 
=== Update remaining packages from Web repository ===
 
* Check that /etc/apk/repositories reflects the current version, for example, for 1.10 it could say:
http://dl-3.alpinelinux.org/alpine/v1.10/packages/main
* Upgrade packages from Web.
apk update
apk add -u apk-tools
apk upgrade -U

Latest revision as of 01:07, 29 October 2012

Redirect to: