How to install Persistent Porteus with Ventoy

Here you can post about non-standard installation methods
(for example when using grub4dos).
ydyote
White ninja
White ninja
Posts: 7
Joined: 15 Mar 2023, 19:09
Distribution: porteus 5 lxde

How to install Persistent Porteus with Ventoy

Post#1 by ydyote » 14 Oct 2023, 19:43

Hello,

this is a short guide how I use porteus with ventoy on my 64gb flash drive

Ventoy: https://www.ventoy.net/
"Ventoy is an open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files. With ventoy, you don't need to format the disk over and over, you just need to copy the ISO/WIM/IMG/VHD(x)/EFI files to the USB drive and boot them directly."

This way you can just have 1 flash drive/USB drive for porteus and also other tools/ISOs/systems


I found out that the best way is to have everything embedded in the porteus ISO, I tried using ventoy plugin for replacing porteus.cfg file but that didn't work on some PCs


1. Get a device (flash drive or other) which you want to use for this
2. Install ventoy based on their current tutorial (at the time of writing it was just download their tool, start it, click install; now I have ventoy-1.0.96 and the "Ventoy" partition is NTFS for me)
3. Download Porteus ISO from a mirror porteus.org/porteus-mirrors.html which one you want (right now I have Porteus-LXDE-v5.01-x86_64.iso)
4. Download all updates from a mirror porteus.org/porteus-mirrors.html the updates which you need for your iso are listed in the updates.txt file in a mirror e.g. https://www.mirrorservice.org/sites/dl. ... pdates.txt
5. Get a tool which can make/edit ISO files, I used AnyBurn
6. Prepare porteus.cfg file which will replace the original \boot\syslinux\porteus.cfg in the ISO file, you can edit what you want and add your custom boot options; main ones of mine are:

Code: Select all

LABEL GRAPHICAL_CUSTOM_WITH_MOUNTED_STORAGE
MENU LABEL GUI enc stor realtime
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
APPEND changes=LABEL:Ventoy/_Porteus/Storage/main_storage_encrypted.dat
TEXT HELP
    Mounted encrypted main_storage_encrypted.dat as WRITE
    SAVE realtime to usb (a lot of writes to flash)
ENDTEXT

LABEL GRAPHICAL_CUSTOM_WITH_MOUNTED_STORAGE_READONLY
MENU LABEL [8gbRAM+] GUI RO enc stor
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
APPEND changes=LABEL:Ventoy/_Porteus/Storage/main_storage_encrypted.dat changes-ro
TEXT HELP
    Mounted encrypted main_storage_encrypted.dat as READONLY
ENDTEXT

LABEL GRAPHICAL_CUSTOM_WITH_MOUNTED_STORAGE_WRITE_ON_EXIT
MENU LABEL [8gbRAM+] GUI enc stor EXIT
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
APPEND changes=EXIT:LABEL:Ventoy/_Porteus/Storage/main_storage_encrypted.dat
TEXT HELP
    Mounted encrypted main_storage_encrypted.dat as WRITE
    SAVE ON EXIT to usb (less writes to flash)
ENDTEXT

explanation could be found in the "cheatcodes.txt" in the ISO or right now here: http://www.porteus.org/tutorials/26-gen ... -them.html
in short:
a) GRAPHICAL_CUSTOM_WITH_MOUNTED_STORAGE - changes are read/written to partition with label "Ventoy" at path /_Porteus/Storage/main_storage_encrypted.dat
b) GRAPHICAL_CUSTOM_WITH_MOUNTED_STORAGE_READONLY - data are read from partition with label "Ventoy" at path /_Porteus/Storage/main_storage_encrypted.dat and its only read only
c) GRAPHICAL_CUSTOM_WITH_MOUNTED_STORAGE_WRITE_ON_EXIT - data are read/written to partition with label "Ventoy" at path /_Porteus/Storage/main_storage_encrypted.dat and "EXIT" means that the data will be written during shutting down of the system

PS: I had a lot of issues with EXIT and using chrome, it didn't save my chrome profile maybe my fault but I'd guess it might have been 4gb ram not enough for everything so it might just ignore some stuff? not sure



7. Open anyburn and replace the porteus.cfg file and "install" all the updates in the order they appear in the updates folder by overwriting the proper files and save the ISO file on your main Ventoy partition which should contain ISO files
8. First boot select boot option which doesn't use the "changes" option you will have to create it from Porteus (e.g. "Always Fresh")
9. In porteus (LXDE) click top left -> System Tools -> Porteus SaveFile Manager; and create a savefile, I created encrypted one at path "/_Porteus/Storage/main_storage_encrypted.dat" on the "Ventoy" partition
10. Reboot and boot via one of the custom boot options to enjoy your system
Last edited by ydyote on 14 Oct 2023, 19:56, edited 1 time in total.

ydyote
White ninja
White ninja
Posts: 7
Joined: 15 Mar 2023, 19:09
Distribution: porteus 5 lxde

How to install Persistent Porteus with Ventoy

Post#2 by ydyote » 14 Oct 2023, 19:47

Oh and don't forget to check out some other resources on how to use Porteus, like choosing your browser and so on


I also then have multiple other files on the "Ventoy" partition some bootable ISOs for fixing PCs like grml and so on
and also some other utilities, you can customize ventoy a bit

Then I also have a script which checks the integrity of the flash drive which runs on Porteus boot and after verifying integrity (it has multiple levels because its increcibly slow if hashes should be calculated and compared but also that one is in the script) only then the internet is turned on

I disabled network by using the "nonetwork" cheatcode saving that and then turning it on from the script

ydyote
White ninja
White ninja
Posts: 7
Joined: 15 Mar 2023, 19:09
Distribution: porteus 5 lxde

How to install Persistent Porteus with Ventoy

Post#3 by ydyote » 14 Oct 2023, 19:55

My ventoy.json file

Code: Select all

{
    "control":[
        { "VTOY_DEFAULT_MENU_MODE": "1" },
        { "VTOY_TREE_VIEW_MENU_STYLE": "1" },
        { "VTOY_DEFAULT_SEARCH_ROOT": "/_Bootable" }
    ],
    "theme":{
        "display_mode": "CLI"
    }
}
I had some issues on some hardware with the GUI mode

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

How to install Persistent Porteus with Ventoy

Post#4 by Ed_P » 14 Oct 2023, 23:09

Thanks for the guide. I boot ISOs all the time but from my harddrive rather than my USB drives.
ydyote wrote:
14 Oct 2023, 19:43
the "Ventoy" partition is NTFS for me
I do not recommend NTFS for USB drives. It's a journeling format and slows down the USB drive. If you don't plan on using the USB drive on UEFI systems format the drive as exFAT.
ydyote wrote:
14 Oct 2023, 19:43
Get a tool which can make/edit ISO files, I used AnyBurn
I use Porteus to edit my ISOs. To add modules I create folders on the drive, named Modules and Optional, and use a extramod= cheatcode when booting to point Porteus to the Modules folder. Easier than tweaking the ISO repeatedly.

Rapha_
Shogun
Shogun
Posts: 248
Joined: 12 Jun 2021, 21:59
Distribution: Xfce 4.12 - 5.rc3 - x86_64
Location: France

How to install Persistent Porteus with Ventoy

Post#5 by Rapha_ » 15 Oct 2023, 01:31

On the same subject (in French) : :D
Ventoy, Porteus et Syslinux...

(but I have to change the path configuration : "/dev/sdb1" to ---> "UUID:STrING-0F-ChARACtERS"
for greater robustness with my other computers)

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

How to install Persistent Porteus with Ventoy

Post#6 by Ed_P » 15 Oct 2023, 06:11

Rapha_ wrote:
15 Oct 2023, 01:31
I have to change the path configuration : "/dev/sdb1" to ---> "UUID:STrING-0F-ChARACtERS"
for greater robustness with my other computers
An excellent approach. :good:

rych
Warlord
Warlord
Posts: 768
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

How to install Persistent Porteus with Ventoy

Post#7 by rych » 17 Oct 2023, 09:35

Ed_P wrote:
14 Oct 2023, 23:09
I do not recommend NTFS for USB drives. It's a journeling format and slows down the USB drive.
The current Porteus NTFS driver (ntfs-3g I guess which slower but more reliable than ntfs3?) is slow regardless it's on USB or persistent storage. So much that an ext4 partition on my USB 3.1 NVMe SSD is faster than the system NTFS through ntfs-3g). Just a couple of comments :)

ydyote
White ninja
White ninja
Posts: 7
Joined: 15 Mar 2023, 19:09
Distribution: porteus 5 lxde

How to install Persistent Porteus with Ventoy

Post#8 by ydyote » 24 Oct 2023, 16:23

Thanks for the comments

Ed_P wrote:
14 Oct 2023, 23:09
I do not recommend NTFS for USB drives. It's a journeling format and slows down the USB drive. If you don't plan on using the USB drive on UEFI systems format the drive as exFAT.
I know ntfs is not great but I wanted the flexibility, also I have the usb flash on my keys so I use it as true portable system so no matter which PC I use it should somewhat work (ofc not on trully ancient hw tho)
Ed_P wrote:
14 Oct 2023, 23:09
I use Porteus to edit my ISOs. To add modules I create folders on the drive, named Modules and Optional, and use a extramod= cheatcode when booting to point Porteus to the Modules folder. Easier than tweaking the ISO repeatedly.
makes sense, but in my case I wanted something selfcontained with nothing external, so my modules folder is within porteus savedat file and the modules are activated after the initial file verification is done

Rapha_ wrote:
15 Oct 2023, 01:31
On the same subject (in French) : :D
Ventoy, Porteus et Syslinux...

(but I have to change the path configuration : "/dev/sdb1" to ---> "UUID:STrING-0F-ChARACtERS"
for greater robustness with my other computers)

oh I see, I used "LABEL" not "UUID" because I was lazy but UUID might be just better because it should most likely be unique, mine could collide with some other partition on the pc which is being used


and also I had to edit the iso only because so I have "integrated updates" and the porteus.cfg file I only edited within iso because when I had it outside as Rapha_ has it then it didn't work with UEFI64 or I have no idea what else could be the issue, ventoy just didn't take the file so I "embedded it into the iso"

nanZor
Shogun
Shogun
Posts: 469
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.1 Alpha XFCE

How to install Persistent Porteus with Ventoy

Post#9 by nanZor » 25 Sep 2024, 04:39

I just tested the latest Ventoy 1.0.99 with three different setups and thought I'd report. Tested Porteus 5.01, Nemesis 24-08, and PorteuX 1.6. All the LXQT flavor.

If you need Ventoy for some reason (for me it would be to register keys on a locked-down box), and don't mind a bit of manual stick-shifting, it isn't too bad. Objective was not to become a ventoy expert, but get somewhat productive without a lot of hassle, but things aren't *too* annoying if it isn't all automated. For me, this beats trying to rewrite an iso.

SAVEFILES: I created and used savefiles separately for each on the same Ventoy stick's first partition. Which is exFAT. Glad that worked!

Boot Notes

Porteus 5.01 - the default "normal" boot only resulted in a locked up, scraggly screen. Had to use GRUB2 mode, which dropped me into the text menu's for porteus. Then it would boot normally. BUT, this means I can't edit in any cheatcodes, such as the location of the savefile.

Nemesis 24-08 - solid in the default "normal" mode. Boot menus were up and easy to manually edit the cheatcodes for where the savefile lived.

PorteuX 1.6 - solid in the default "normal" mode. Just keep finger ready to hit ESC so you can manually edit the cheatcode for the savefile location. Using the app-store to download one of the apps, of course it can't write to the location like normal, so it played nice and informed me that it dropped the app into /tmp instead. Cool - what I did was to copy that to the root of the Ventoy stick. So if I need that app, I can manually activate it from there.


PROGRAMS / APPS - in this Ventoy environment, I just copied the app that barfed on not being able to be written and the system kindly notified me it put it into /temp where I can deal with it manually. (I haven't checked if Nemesis does the same from the repositories if it gives up and drops to /temp... maybe later..)

So yeah, if you don't mind manually TAB'ing to edit your boot cheatcodes every time you boot, and putting your downloaded apps somewhere else manually (the first partition of the Ventoy stick itself had plenty of space to do so), then off you go! With Porteus(X)/Nemesis, there's no stopping it!
That's a UNIX book - cool. -Garth

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

How to install Persistent Porteus with Ventoy

Post#10 by Ed_P » 25 Sep 2024, 05:27

nanZor wrote:
25 Sep 2024, 04:39
Ventoy stick's first partition. Which is exFAT.
Ventoy doesn't work on UEFI systems! :o UEFI requires the 1st partition be FAT32.
nanZor wrote:
25 Sep 2024, 04:39
Had to use GRUB2 mode, which dropped me into the text menu's for porteus. Then it would boot normally. BUT, this means I can't edit in any cheatcodes, such as the location of the savefile.
:%) I boot with GRUB2 and use Porteus cheatcodes with it all the time even when booting USB drives.

Code: Select all

menuentry " Porteus 5.0 USB - AF'" --class slackware   --class user-icon-porteus  {

     set porteus_parms="volume=33 reboot=cold extramod=/Modules"  # changes=EXIT:/changes/porteussave.dat"

     set bootdrv=$root
     search -f /boot/syslinux/vmlinuz --set=root
     if [ $root != $bootdrv ]; then
        linux  /boot/syslinux/vmlinuz $porteus_parms
        initrd /boot/syslinux/initrd.xz
     else
        echo "----------------------------------------"
        echo USB drive NOT found.
        echo
        sleep -v -i 10
     fi
     set root=$bootdrv
     }

nanZor
Shogun
Shogun
Posts: 469
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.1 Alpha XFCE

How to install Persistent Porteus with Ventoy

Post#11 by nanZor » 25 Sep 2024, 08:19

Yeah, it's been a semantic argument for years, but not so. The big deal were the weasel-words in the spec such as "should", "may", "must". Mostly for windows compatability, and perhaps somebody's technical preference. It blew my mind when I found out it was urban legend.

Here's a quickie look at it from a long time ago:
https://askubuntu.com/questions/618244/ ... eason-if-s

Check this out - The Ventoy 16gb stick I boot on my uefi boxes is this for me per gparted: (partition, fs, size, flags)
/dev/sdb1 exfat 14.87gb boot
/dev/sdb2 fat16 32mb esp

If I remember back long enough, I think part of the preference to putting esp at the end, was about alignment being easier/better. But make a bootable stick "backwards" and try it!
That's a UNIX book - cool. -Garth

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

How to install Persistent Porteus with Ventoy

Post#12 by Ed_P » 25 Sep 2024, 13:28

nanZor wrote:
25 Sep 2024, 08:19
Here's a quickie look at it from a long time ago:
https://askubuntu.com/questions/618244/ ... eason-if-s

Check this out - The Ventoy 16gb stick I boot on my uefi boxes is this for me per gparted: (partition, fs, size, flags)
/dev/sdb1 exfat 14.87gb boot
/dev/sdb2 fat16 32mb esp
:o A nice find nanZor. :happy62:

nanZor
Shogun
Shogun
Posts: 469
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.1 Alpha XFCE

How to install Persistent Porteus with Ventoy

Post#13 by nanZor » 26 Sep 2024, 23:09

Thanks but yeah, it's not worth fighting over. I like Rod Smith's reply at the end of it all: unless there is a compelling reason ...

Since it is intended for usb sticks, maybe there is a technical reason for doing that to prolong the life of the usb drive? I'm not that low-level with usb sticks enough to know.

Aside from that, Ventoy may be playing whack-a-mole with really current hardware in regards to registering keys, so sometimes that may not work, but that's a different discussion.
That's a UNIX book - cool. -Garth

nanZor
Shogun
Shogun
Posts: 469
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.1 Alpha XFCE

How to install Persistent Porteus with Ventoy

Post#14 by nanZor » 26 Sep 2024, 23:42

Note that the disk layout for Ventoy is here:
https://www.ventoy.net/en/doc_disk_layout.html

I also believe they supply their own exFAT driver - something other than fuse? Not sure.
Once the disk is made, you can reformat the first partition from exFAT to anything - and nice to see the dev promoting XFS (in addition to ext2/3/4) for linux-only use.

Part of the problem with formatting such that esp is at the end, may have to do with fake usb sticks (or good ones that get totally garbled) that report more space than they really have - and thus won't boot, but WILL if the standard way of formatting with esp at the beginning works!

Getting off on a tangent ...
That's a UNIX book - cool. -Garth

Post Reply