Upgrading Alpine - CD v1.8.x: Difference between revisions
m (subst a template that is about to be RfD.) |
(replace /etc/init.d with rc-service) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 11: | Line 11: | ||
Start downloading a new '.iso' and a '.sha1' file | Start downloading a new '.iso' and a '.sha1' file | ||
{{Cmd|wget -c | {{Cmd|wget -c <nowiki>http://dl-3.alpinelinux.org/alpine/v1.8/iso/alpine-1.8.3-i386.iso</nowiki> | ||
wget http://dev.alpinelinux.org/alpine/v1.8/iso/ | wget <nowiki>http://dev.alpinelinux.org/alpine/v1.8/iso/alpine-1.8.3-i386.iso.sha1</nowiki>}} | ||
Check integrity of the downloaded files | Check integrity of the downloaded files | ||
Line 19: | Line 19: | ||
''If says 'FAILED', delete the tar.gz file and download it again.'' | ''If says 'FAILED', delete the tar.gz file and download it again.'' | ||
Burn the 'iso' file to a empty CD and label it ' | Burn the 'iso' file to a empty CD and label it 'alpine-1.8.3-i386.iso'<BR> | ||
'''''Note:''' Burning a 'iso' file is not done the same way as you would do when burning .jpg or other files to a CD!'' | '''''Note:''' Burning a 'iso' file is not done the same way as you would do when burning .jpg or other files to a CD!'' | ||
Line 28: | Line 28: | ||
== Replace CD == | == Replace CD == | ||
1. Unmount the old CD. | 1. Unmount the old CD. | ||
{{Cmd| | {{Cmd|rc-service modloop stop}} | ||
1. Eject, remove old CD, insert the new CD that you labeled ' | 1. Eject, remove old CD, insert the new CD that you labeled 'alpine-1.8.3-i386.iso', close the CD-tray. | ||
{{Cmd|eject}} | {{Cmd|eject}} | ||
1. Mount the new CD | 1. Mount the new CD | ||
{{Cmd| | {{Cmd|rc-service modloop start}} | ||
{{:Include:Upgrading_Alpine_executeupgradescript}} | {{:Include:Upgrading_Alpine_executeupgradescript}} |
Latest revision as of 09:48, 17 November 2023
This material is proposed for deletion ... besides leaving this here for historical purposes it serves no purpose and should be deleted or merged
(Discuss) |
Alpine that runs from CD
This document applies to alpine which is burnt/booted from CD.
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).
Download a new alpine release
Note: This document does not describe how you download and burning a CD by using alpine.
We assume that you download/burn the 'iso' file on a separate computer that has a CD-burner and software that can burn ISO-files.
Start downloading a new '.iso' and a '.sha1' file
wget -c http://dl-3.alpinelinux.org/alpine/v1.8/iso/alpine-1.8.3-i386.iso wget http://dev.alpinelinux.org/alpine/v1.8/iso/alpine-1.8.3-i386.iso.sha1
Check integrity of the downloaded files
sha1sum -c alpine-1.8.3-i386.iso.sha1
The output of the above command should say 'OK'.
If says 'FAILED', delete the tar.gz file and download it again.
Burn the 'iso' file to a empty CD and label it 'alpine-1.8.3-i386.iso'
Note: Burning a 'iso' file is not done the same way as you would do when burning .jpg or other files to a CD!
Note: Continue working on the box that you are upgrading
Setup environment variables
To make the documentation a bit more "generic" we start by setting some environment variables.
vi /etc/lbu/lbu.conf
Make sure that the variable LBU_MEDIA
is not commented (by removing the leading '#').
You also need to set a appropriate value for your LBU_MEDIA
. The media you choose will be the media where you store your settings/configuration.
Examples:
LBU_MEDIA=usb
or:
LBU_MEDIA=sda1
Now that you have your /etc/lbu/lbu.conf configured for your needs, we will set the environment variables (note the leading .
).
. /etc/lbu/lbu.conf
You can test if your environment variable was set:
echo $LBU_MEDIA
It should output something like usb
, sda1
, or whatever you just configured.
Back up your config
Before starting to upgrade, it's wise to save your configuration.
lbu ci
Replace CD
1. Unmount the old CD.
rc-service modloop stop
1. Eject, remove old CD, insert the new CD that you labeled 'alpine-1.8.3-i386.iso', close the CD-tray.
eject
1. Mount the new CD
rc-service modloop start
Execute upgrade script
The new media has a 'upgrade' script found on root level on media. This 'upgrade' script needs to be executed and walked through.
/media/$LBU_MEDIA/upgrade
You will be informed about various changes and you will be able to choose if you want to keep your old config-files or if you want to use a new.
Each setup is different, so it's hard to say what needs to be upgraded and what should be kept.
When the new media holds a updated version of configfile, you will be prompted with something that looks like this:
Quit, Next, Show diff, Edit new, Zap new, Use new (q/n/s/e/z/u) [s]:
If you choose to 'Edit new' you will use the 'vi' editor.
A short note on how you use that editor:
- i = Enter "insert" mode so you can edit the content
- [esc] = Enter CMD-mode where you can chose to save/quit
- CMD-mode has these options
- :w = Write your changes
- :q = Quit editor
- :q! = Force quit even if you have changes that is still not saved
- CMD-mode has these options
Save changes
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up).
lbu ci
Rebooting
In most cases you will need to reboot Alpine (specially 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.