Upgrading Alpine - HD v1.8.x: Difference between revisions
(Added 'sync' command just in case) |
m (This is an ancient release. Mark page as historical and nowiki known dead links.) |
||
(9 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{Historical|Alpine 1.8.3 is an ancient release.<br>URLs on this page may not function.}} | |||
== Alpine that runs on HD == | == Alpine that runs on HD == | ||
This document applies to alpine which is installed on HardDisk(HD), CompactFlash(CF) or USB.<BR> | This document applies to alpine which is installed on HardDisk(HD), CompactFlash(CF) or USB.<BR> | ||
Line 4: | Line 6: | ||
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). | 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_Alpine_environmentvars}} | {{:Include:Upgrading_Alpine_environmentvars}} | ||
== Download a new alpine release == | == Download a new alpine release == | ||
Start by checking that you have enough space on your media.<BR> | Start by checking that you have enough space on your media.<BR> | ||
You need at least 350MB available space. | You need at least 350MB available space. | ||
{{Cmd|df -h | grep "Filesystem\|$LBU_MEDIA"}} | |||
Start downloading a new '.tar.gz' and a '.sha1' file | Start downloading a new '.tar.gz' and a '.sha1' file | ||
{{Cmd|cd /media/$LBU_MEDIA | |||
wget -c https://web.archive.org/web/20101206020622/http://dl-3.alpinelinux.org/alpine/v1.8/usbdrive/alpine-1.8.3-i386.tar.gz | |||
wget <nowiki>http://dev.alpinelinux.org/alpine/v1.8/usbdrive/alpine-1.8.3-i386.tar.gz.sha1</nowiki> | |||
Check integrity of the downloaded files ''(it might take some time)'' | Check integrity of the downloaded files ''(it might take some time)'' | ||
{{Cmd|sha1sum -c {{Latest_1.8_alpine_gz-filename}}.sha1}} | |||
''The output of the above command should say 'OK'.<BR>'' | ''The output of the above command should say 'OK'.<BR>'' | ||
''If says 'FAILED', delete the tar.gz file and download it again.'' | ''If says 'FAILED', delete the tar.gz file and download it again.'' | ||
== Extract the 'tar.gz' == | == Extract the 'tar.gz' == | ||
Remove old packages dir | |||
{{Cmd|rm -rf /media/$LBU_MEDIA/apks | |||
rm -rf /media/$LBU_MEDIA/kernel}} | |||
Back up file that you have modified ''(below is a list of files that might need backing up)''<BR> | |||
'''''syslinux.cfg:''' You might have modified it to show console on a serial port'' | |||
{{Upgrading_Alpine_executeupgradescript}} | {{Cmd|cp /media/$LBU_MEDIA/syslinux.cfg /media/$LBU_MEDIA/syslinux.cfg.my}} | ||
Extract content of archive | |||
{{Cmd|cd /media/$LBU_MEDIA | |||
tar xvzf {{Latest_1.8_alpine_gz-filename}}}} | |||
Restore your backed up files ''(in case you had any)'' | |||
{{Cmd|mv -f /media/$LBU_MEDIA/syslinux.cfg.my /media/$LBU_MEDIA/syslinux.cfg}} | |||
Make sure that all files are permanently saved in right place | |||
{{Cmd|sync}} | |||
{{:Include:Upgrading_Alpine_executeupgradescript}} | |||
== Clean up == | == Clean up == | ||
Clean up the downloaded/unpacked files | Clean up the downloaded/unpacked files | ||
{{Cmd|rm /media/$LBU_MEDIA/{{Latest_1.8_alpine_gz-filename}} | |||
rm /media/$LBU_MEDIA/{{Latest_1.8_alpine_gz-filename}}.sha1 | |||
rm -rf /media/$LBU_MEDIA/alpine-new}} | |||
== Save changes == | == Save changes == | ||
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up). | Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up). | ||
{{Cmd|lbu ci}} | |||
== Rebooting == | == Rebooting == | ||
In most cases you will need to reboot Alpine (specially if there are changes in the kernel): | In most cases you will need to reboot Alpine (specially if there are changes in the kernel): | ||
{{Cmd|reboot}} | |||
'''''Note:''' If you know what you are doing, you might not need to reboot.<BR>But make sure that all services affected by the upgrade are restarted.'' | '''''Note:''' If you know what you are doing, you might not need to reboot.<BR>But make sure that all services affected by the upgrade are restarted.'' | ||
[[Category:Installation]] |
Latest revision as of 07:23, 31 August 2023
This material is retained only for historical reasons ... Alpine 1.8.3 is an ancient release. |
Alpine that runs on HD
This document applies to alpine which is installed on HardDisk(HD), CompactFlash(CF) or USB.
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).
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
Download a new alpine release
Start by checking that you have enough space on your media.
You need at least 350MB available space.
df -h
Start downloading a new '.tar.gz' and a '.sha1' file {{Cmd|cd /media/$LBU_MEDIA wget -c https://web.archive.org/web/20101206020622/http://dl-3.alpinelinux.org/alpine/v1.8/usbdrive/alpine-1.8.3-i386.tar.gz wget http://dev.alpinelinux.org/alpine/v1.8/usbdrive/alpine-1.8.3-i386.tar.gz.sha1
Check integrity of the downloaded files (it might take some time)
sha1sum -c alpine-1.8.3-i386.tar.gz.sha1
The output of the above command should say 'OK'.
If says 'FAILED', delete the tar.gz file and download it again.
Extract the 'tar.gz'
Remove old packages dir
rm -rf /media/$LBU_MEDIA/apks rm -rf /media/$LBU_MEDIA/kernel
Back up file that you have modified (below is a list of files that might need backing up)
syslinux.cfg: You might have modified it to show console on a serial port
cp /media/$LBU_MEDIA/syslinux.cfg /media/$LBU_MEDIA/syslinux.cfg.my
Extract content of archive
cd /media/$LBU_MEDIA tar xvzf alpine-1.8.3-i386.tar.gz
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
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
Clean up
Clean up the downloaded/unpacked files
rm /media/$LBU_MEDIA/alpine-1.8.3-i386.tar.gz rm /media/$LBU_MEDIA/alpine-1.8.3-i386.tar.gz.sha1 rm -rf /media/$LBU_MEDIA/alpine-new
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.