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: 8374
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.
Ed

Rapha_
Shogun
Shogun
Posts: 238
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: 8374
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:
Ed

rych
Warlord
Warlord
Posts: 622
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"

Post Reply