Upgrading Porteus

Post tutorials, HOWTO's and other useful resources here.
rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Upgrading Porteus

Post#1 by rych » 06 Oct 2023, 09:29

Upgrading/updating Porteus from 5.0 to 5.01, with a roll-back option:

1. Get a Porteus-OPENBOX-v5.01-x86_64.iso, for example, and mount it.

2. I use grub which is a signed boot loader allowing to load unsigned kernels for compatibility with Secure Boot enabled UEFI systems. From the Porteus-OPENBOX-v5.01-x86_64.iso/boot/syslinux we then only need 2 files: vmlinuz and initrd.xz
2a. In case you customized your previous initrd, typically linuxrc or finit, you need to get those checked in into the new initrd. I use Meld for merging the differences. Then, I assemble my version of initrd using

Code: Select all

/opt/porteus-scripts/makeinitrd -z
The resulting initrd.xz->initrd501.zst along with the simply renamed vmlinuz->vmlinuz501 are added to your /mnt/sda1/boot/syslinux on your first FAT32 partition used for UEFI booting.
2b. Add a menu entry into /mnt/sda1/boot/grub/grub.cfg pointing to the new initrd501 and vmlinuz501

3. Now, an awkward step of replacing the /mnt/sda2/porteus/base and backing-up the /mnt/sda2/porteus/changes. We shouldn't try to do it while it's live of course.
3a. For that I boot into my PorteuX which I actually have on the same USB, and access those folders on the porteus's partition which is not live anymore. Rename base->base50, and copy changes->changes50 as backup.
3b. Copy /Porteus-OPENBOX-v5.01-x86_64.iso/porteus/base --> /mnt/sda2/porteus/

4. Now it's time to try and boot into the new Porteus 5.01 thus prepared, that is using:
1) Amended: boot loader,
2) New: initrd501, vmlinuz501; base,
3) Old: modules, optional; changes

We keep the original base50 and changes50 to roll back to.

I now boot into the new Porteus 5.01. It works without a problem and feels like an incremental update that did not break anything. I'll post here any problems when/if they appear

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Upgrading Porteus

Post#2 by Rava » 24 Oct 2023, 11:50

Would it not also work moving /mnt/sda2/porteus/ onto, e.g. /mnt/sda2/Porteus5.0/porteus/ and adjust the bootloader?
Meaning, you have brand new 5.01 files in /mnt/sda2/porteus/ and also a working and bootable 5.0 in /mnt/sda2/Porteus5.0/porteus/

Since I use porteus.cfg my setup e.g. looks like so - I use dedicated folders for all of my Porteus boots (so no longer a simple /mnt/sda1/porteus/ ):

Code: Select all

LABEL xfceRava5.01
MENU LABEL 5.01 newest 00[12]- RavaStyle
KERNEL vmlinuz
APPEND initrd=initrd.xz from=UUID:CoReCt-UuId/Porteus_5.01 ramsize=10% zram=8% timezone=Europe/Berlin volume=75% kmap=de lang=de fsck 3
TEXT HELP
    Run Porteus the Rava way:
    always fresh - telinit 3 (or 
    "without starting X")
ENDTEXT

LABEL xfceRava5.0
MENU LABEL 5.0 newest updated 00[12]- RavaStyle
KERNEL vmlinuz
APPEND initrd=initrd.xz from=UUID:CoReCt-UuId/Porteus_5.0 ramsize=10% zram=8% timezone=Europe/Berlin volume=75% kmap=de lang=de fsck 3
TEXT HELP
    Run Porteus the Rava way:
    always fresh - telinit 3 (or 
    "without starting X")
ENDTEXT
And of course the folder hierarchy is not - presuming the UUID corresponds with /mnt/sda1 - like this:

Code: Select all

/mnt/sda1/Porteus5.01/
/mnt/sda1/Porteus5.01/base/
/mnt/sda1/Porteus5.01/modules/
/mnt/sda1/Porteus5.01/optional/
but like this:

Code: Select all

/mnt/sda1/Porteus5.01/
/mnt/sda1/Porteus5.01/porteus/
/mnt/sda1/Porteus5.01/porteus/base/
/mnt/sda1/Porteus5.01/porteus/modules/
/mnt/sda1/Porteus5.01/porteus/optional/
including a /mnt/sda1/Porteus5.01/porteus/porteus-v5.0-x86_64.cfg
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Upgrading Porteus

Post#3 by Ed_P » 24 Oct 2023, 16:13

:hmmm: So what are you booting that displays your porteus.cfg file? Do you make the same porteus.cfg changes to each of the Porteus installs? In other words you can boot Porteus 5.0 from booting the Porteus 5.01 system?
Rava wrote:
24 Oct 2023, 11:50
but like this:

Code: Select all

/mnt/sda1/Porteus5.01/
/mnt/sda1/Porteus5.01/porteus/
/mnt/sda1/Porteus5.01/porteus/base/
/mnt/sda1/Porteus5.01/porteus/optional/
I like your folder hierarchy and it's naming convention. But shouldn't it include a /mnt/sda1/Porteus5.01/porteus/modules, /mnt/sda1/Porteus5.01/boot and /mnt/sda1/Porteus5.01/EFI folders?
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Upgrading Porteus

Post#4 by Rava » 24 Oct 2023, 19:22

Ed_P wrote:
24 Oct 2023, 16:13
I like your folder hierarchy and it's naming convention. But shouldn't it include a /mnt/sda1/Porteus5.01/porteus/modules, /mnt/sda1/Porteus5.01/boot and /mnt/sda1/Porteus5.01/EFI folders?
I don't use a porteus/modules folder, but create one when you use one.

I don't use /mnt/sda1/Porteus5.01/boot because many of my different folders use the same kernel and the same initrd.
Therefore these are all in /mnt/sda1/boot and named e.g. like so:

Code: Select all

/mnt/sda1/boot/syslinux/vmlinuz_Porteus_5.4.30_x86_64
/mnt/sda1/boot/syslinux/vmlinuz_Porteux_6.5.7_x86_64
/mnt/sda1/boot/syslinux/initrd.xz2020-04-11
and are addressed via
e.g.

Code: Select all

KERNEL vmlinuz_Porteus_5.4.30_x86_64
or

Code: Select all

APPEND initrd=initrd.xz2020-04-11
I left that out in my above example to make it more easy.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Upgrading Porteus

Post#5 by Ed_P » 24 Oct 2023, 19:53

Rava wrote:
24 Oct 2023, 19:22
I don't use a porteus/modules folder, but create one when you use one.
But the people reading your posting example might want to know. And where do you load your browser from? Optional?!
Rava wrote:
24 Oct 2023, 19:22

Code: Select all

/mnt/sda1/boot/syslinux/vmlinuz_Porteus_5.4.30_x86_64
/mnt/sda1/boot/syslinux/vmlinuz_Porteux_6.5.7_x86_64
/mnt/sda1/boot/syslinux/initrd.xz2020-04-11
The problem I keep stumbling on is a USB drive won't boot with this config but this thread isn't about USB drives it's about versions of the Porteus system installed to the hard drive and booted from a working Porteus install. :hammer:
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Upgrading Porteus

Post#6 by Rava » 24 Oct 2023, 20:06

Ed_P wrote:
24 Oct 2023, 19:53
But the people reading your posting example might want to know. And where do you load your browser from? Optional?!
You are correct, I will edit my above post and add porteus/modules folder

I load all my standard loaded modules via base/ even when that is not the normal way doing things.

Added in 3 minutes 4 seconds:
Ed_P wrote:
24 Oct 2023, 19:53
The problem I keep stumbling on is a USB drive won't boot with this config but this thread isn't about USB drives it's about versions of the Porteus system installed to the hard drive and booted from a working Porteus install.
yeah, it is confusing that at times it needs to be like this

Code: Select all

/mnt/sda1/boot/syslinux/vmlinuz_Porteus_5.4.30_x86_64
/mnt/sda1/boot/syslinux/initrd.xz2020-04-11
and at other times like this:

Code: Select all

/mnt/sda1/boot/vmlinuz_Porteus_5.4.30_x86_64
/mnt/sda1/boot/initrd.xz2020-04-11
I do not really understand why it is like this.
Cheers!
Yours Rava

Post Reply