Upgrade an outdated system

Info, questions, how-to, suggestions
Post Reply
aron
Posts: 88
Joined: Tue Dec 05, 2017 11:06 am

Upgrade an outdated system

Post by aron » Wed Feb 14, 2018 9:59 am

If
  • your system is too old, and probably not compatible with the upstream (please check the "Announcements" topic);
  • or you want to be sure the upgrade face minimal issues
follow this guide.

Prerequisites
This guide requires some special functions on your system. Make sure the following packages are installed, and the system was rebooted since then:
  • pkman
  • wget
Furthermore, you will need a working internet connection (or a working LAN to your mirror, what you prefer).
Finally, your bootloader.ini should be configured to be able to boot from fallback cpio (the original version from the bootloader-bin package will do).

Method
(Do not reboot your system during these steps, unless it is explicitly specified. Also, always double-check the example commands listed below, do not copy&paste the commands automatically. The example commands may or may not fit to your system.)
  1. Change directory to a temporary file-system (this step is not mandatory, but recommended):

    Code: Select all

    # cd /tmp
  2. Download the raw upstream boot init cpio:

    Code: Select all

    # wget http://threos.io/files/vm/x86_64.xz
  3. Remove your old fallback cpio:

    Code: Select all

    # rm /boot/fallback.xz
  4. Copy the new version:

    Code: Select all

    # cp /tmp/x86_64.xz /boot/fallback.xz
  5. Write down your fstab.ini, later you have to mount your file systems

    Code: Select all

    # cd /etc ; cat fstab.ini ; cd /tmp
    ...
    target.vfs_init.env.fstab.00   = "sata0   0 1 /"
    target.vfs_init.env.fstab.10   = "tmpfs   0 - /run"
    target.vfs_init.env.fstab.20   = "sata0   0 0 /boot"
    ...
    
  6. Reboot your system, but boot from the fallback cpio (select the "Fallback (tmpfs)" version with the bs command)
  7. Locally install the pkman and the install-help packages (you can use this command: dev_install install-help)
  8. Mount your file systems, a possible command sequence can be:

    Code: Select all

    # mount --mkdirs /dev/sata0n0 -p 1 /mnt
    # mount --mkdirs /dev/sata0n0 -p 0 /mnt/boot
    
  9. Use the pkstrap tool to upgrade your system:

    Code: Select all

    # ih_pkstrap /mnt -u
    
    Optionally, you can load your original pkman.ini file:

    Code: Select all

    # ih_pkstrap /mnt -u --config /mnt/etc/pkman/pkman.ini
    
    Note: the mkbic post-commit hook will fail, ignore that error (or you can Ctrl-C the hook)
  10. Generate a new boot init cpio (you can add the --nobackup option to prevent the overwrite of the current fallback.cpio):

    Code: Select all

    # ih_mkbic /mnt --nobackup
  11. Sync and reboot:

    Code: Select all

    # sync
    # reboot
    
  12. Done

Post Reply