
How to create an appx file for a Porteus install to WSL
- Ed_P
- Contributor
- Posts: 8960
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
How to create an appx file for a Porteus install to WSL
Post#1 by Ed_P » 24 Mar 2024, 05:29

Ed_P
How to create an appx file for a Porteus install to WSL
Post#2 by beny » 26 Mar 2024, 00:21
beny
- Ed_P
- Contributor
- Posts: 8960
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
How to create an appx file for a Porteus install to WSL
Post#3 by Ed_P » 26 Mar 2024, 03:51


Ed_P
How to create an appx file for a Porteus install to WSL
Post#4 by beny » 26 Mar 2024, 13:45
beny
- Ed_P
- Contributor
- Posts: 8960
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
How to create an appx file for a Porteus install to WSL
Post#5 by Ed_P » 26 Mar 2024, 14:22


Ed_P
-
- Contributor
- Posts: 129
- Joined: 03 Feb 2020, 18:51
- Distribution: Debian 12, Porteus 5.01
- Location: Poland
How to create an appx file for a Porteus install to WSL
Post#6 by i3slkiller » 22 May 2024, 11:14

So, I installed Windows 10 on vmware (because it's only hypervisor which supports nested vm on my pc) and WSL2 on it, and I got figuring how to start porteus on it, as a result I am sharing a quickly written way to get it "working".
build kernel
Code: Select all
activate 05-devel.xzm
wget https://github.com/microsoft/WSL2-Linux-Kernel/archive/linux-msft-wsl-5.15.153.1/WSL2-Linux-Kernel-linux-msft-wsl-5.15.153.1.tar.gz
tar -xf WSL2-Linux-Kernel-linux-msft-wsl-5.15.153.1.tar.gz
git clone https://github.com/sfjro/aufs-standalone.git
git -C aufs-standalone checkout aufs5.15.41
cd WSL2-Linux-Kernel-linux-msft-wsl-5.15.153.1
patch -p1 < ../aufs-standalone/aufs5-kbuild.patch
patch -p1 < ../aufs-standalone/aufs5-base.patch
patch -p1 < ../aufs-standalone/aufs5-mmap.patch
patch -p1 < ../aufs-standalone/aufs5-standalone.patch
cp -r ../aufs-standalone/{Documentation,fs} .
cp ../aufs-standalone/include/uapi/linux/aufs_type.h include/uapi/linux
patch -p1 < ../aufs-standalone/vfs-ino.patch
patch -p1 < ../aufs-standalone/tmpfs-idr.patch
cp arch/x86/configs/config-wsl .config
cat << EOF > patch
--- arch/x86/configs/config-wsl 2024-04-23 19:27:59.000000000 +0200
+++ /mnt/vbox/tmp/.config 2024-05-21 19:16:30.573137835 +0200
@@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.15.146.1 Kernel Configuration
+# Linux/x86 5.15.153.1 Kernel Configuration
#
-CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0"
+CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.0"
CONFIG_CC_IS_GCC=y
-CONFIG_GCC_VERSION=110400
+CONFIG_GCC_VERSION=110200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
-CONFIG_AS_VERSION=23400
+CONFIG_AS_VERSION=23700
CONFIG_LD_IS_BFD=y
-CONFIG_LD_VERSION=23400
+CONFIG_LD_VERSION=23700
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
@@ -18,7 +18,7 @@
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
-CONFIG_PAHOLE_VERSION=121
+CONFIG_PAHOLE_VERSION=0
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y
@@ -29,7 +29,7 @@
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
# CONFIG_WERROR is not set
-CONFIG_LOCALVERSION="-microsoft-standard-WSL2"
+CONFIG_LOCALVERSION="-aufs-WSL2"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
@@ -462,7 +462,6 @@
CONFIG_HAVE_LIVEPATCH=y
# end of Processor type and features
-CONFIG_CC_HAS_SLS=y
CONFIG_CC_HAS_RETURN_THUNK=y
CONFIG_SPECULATION_MITIGATIONS=y
CONFIG_PAGE_TABLE_ISOLATION=y
@@ -472,7 +471,6 @@
CONFIG_CPU_IBPB_ENTRY=y
CONFIG_CPU_IBRS_ENTRY=y
CONFIG_CPU_SRSO=y
-# CONFIG_SLS is not set
# CONFIG_GDS_FORCE_MITIGATION is not set
CONFIG_ARCH_HAS_ADD_PAGES=y
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
@@ -749,6 +747,10 @@
# end of GCOV-based kernel profiling
CONFIG_HAVE_GCC_PLUGINS=y
+CONFIG_GCC_PLUGINS=y
+# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set
+# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set
+# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set
# end of General architecture-dependent options
CONFIG_RT_MUTEXES=y
@@ -1363,7 +1365,6 @@
#
# Queueing/Scheduling
#
-# CONFIG_NET_SCH_CBQ is not set
# CONFIG_NET_SCH_HTB is not set
# CONFIG_NET_SCH_HFSC is not set
# CONFIG_NET_SCH_PRIO is not set
@@ -1377,7 +1378,6 @@
# CONFIG_NET_SCH_ETF is not set
# CONFIG_NET_SCH_TAPRIO is not set
# CONFIG_NET_SCH_GRED is not set
-# CONFIG_NET_SCH_DSMARK is not set
# CONFIG_NET_SCH_NETEM is not set
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NET_SCH_MQPRIO is not set
@@ -2445,7 +2445,6 @@
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_SYSCON is not set
-# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
@@ -3390,6 +3389,26 @@
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
CONFIG_EROFS_FS_ZIP=y
+CONFIG_AUFS_FS=y
+# CONFIG_AUFS_BRANCH_MAX_127 is not set
+# CONFIG_AUFS_BRANCH_MAX_511 is not set
+# CONFIG_AUFS_BRANCH_MAX_1023 is not set
+CONFIG_AUFS_BRANCH_MAX_32767=y
+CONFIG_AUFS_SBILIST=y
+CONFIG_AUFS_HNOTIFY=y
+CONFIG_AUFS_HFSNOTIFY=y
+CONFIG_AUFS_EXPORT=y
+CONFIG_AUFS_INO_T_64=y
+CONFIG_AUFS_XATTR=y
+CONFIG_AUFS_FHSM=y
+CONFIG_AUFS_RDU=y
+CONFIG_AUFS_DIRREN=y
+CONFIG_AUFS_SHWH=y
+CONFIG_AUFS_BR_RAMFS=y
+CONFIG_AUFS_BR_FUSE=y
+CONFIG_AUFS_POLL=y
+CONFIG_AUFS_BDEV_LOOP=y
+# CONFIG_AUFS_DEBUG is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
@@ -3549,6 +3568,10 @@
# Memory initialization
#
CONFIG_INIT_STACK_NONE=y
+# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
+# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
+# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set
+# CONFIG_GCC_PLUGIN_STACKLEAK is not set
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
@@ -3926,9 +3949,7 @@
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_DWARF5 is not set
-CONFIG_DEBUG_INFO_BTF=y
-CONFIG_PAHOLE_HAS_SPLIT_BTF=y
-CONFIG_DEBUG_INFO_BTF_MODULES=y
+# CONFIG_DEBUG_INFO_BTF is not set
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=1024
# CONFIG_STRIP_ASM_SYMS is not set
EOF
patch .config < patch
make -j4
clone repo
Code: Select all
git clone https://gitlab.com/i3slkiller/porteus-wsl2
cd porteus-wsl2
optionally create porteus/modules and porteus/modules folders and put additional modules here (must be also zstd*)
create tar package
Code: Select all
tar --owner=0 --group=0 -cf ../wsl2/rootfs.tar --exclude='.git*' --exclude='.empty' .
* - on xz modules spams dmesg with squashfs error messages and throws input/output error
on windows
move bzImage to C:\Users\user
create C:\Users\user\.wslconfig file with these contents
Code: Select all
[wsl2]
kernel=C:\\Users\\user\\bzImage
open command prompt
Code: Select all
> mkdir C:\wsl2
> wsl --import porteus C:\wsl2\porteus Z:\wsl2\rootfs.tar --version 2
> wsl -d porteus
# /linuxrc
porteus# su -l
** - modules to activate must be outside union
i3slkiller
- Ed_P
- Contributor
- Posts: 8960
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
How to create an appx file for a Porteus install to WSL
Post#7 by Ed_P » 22 May 2024, 20:05
I have WSL in my Windows 11 system so I need to skip a step or two. May take a few days to test depending on rl matters.
Ed_P
-
- Warlord
- Posts: 787
- Joined: 04 Jan 2014, 04:27
- Distribution: Porteus 5.0 x64 OpenBox
- Location: NZ
- Contact:
How to create an appx file for a Porteus install to WSL
Post#8 by rych » 23 May 2024, 11:50
rych
-
- Contributor
- Posts: 129
- Joined: 03 Feb 2020, 18:51
- Distribution: Debian 12, Porteus 5.01
- Location: Poland
How to create an appx file for a Porteus install to WSL
Post#9 by i3slkiller » 23 May 2024, 13:15
i3slkiller
- Ed_P
- Contributor
- Posts: 8960
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
How to create an appx file for a Porteus install to WSL
Post#10 by Ed_P » 23 May 2024, 15:19


Ed_P
-
- Contributor
- Posts: 129
- Joined: 03 Feb 2020, 18:51
- Distribution: Debian 12, Porteus 5.01
- Location: Poland
How to create an appx file for a Porteus install to WSL
Post#11 by i3slkiller » 23 May 2024, 16:42
More specifically, WSL2 is a virtual machine, on which as far as I know multiple running distros shares the same linux kernel.
At least in WSL2, you can also use graphical apps (look at the screenshot on #6).
activate, deactivate - works.
Regarding modules there are caveats:
- modules must be zstd-compressed, because (on at least kernel which I built) there are squashfs errors on xz modules (exactly the same modules works without that errors on Porteus)
- modules(xzm files) you want to activate must not be in aufs union (also on at least kernel which I built)
Don't forget to update WSL (wsl --update).
i3slkiller
- Ed_P
- Contributor
- Posts: 8960
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
How to create an appx file for a Porteus install to WSL
Post#12 by Ed_P » 23 May 2024, 23:00
Code: Select all
C:\Users\Ed>wsl --update
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.
C:\Users\Ed>wsl --version
WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3593
C:\Users\Ed>wsl --list --online
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install <Distro>'.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
Ubuntu-24.04 Ubuntu 24.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.5 openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5
openSUSE-Tumbleweed openSUSE Tumbleweed
C:\Users\Ed>
BTW My Windows OS is version 11, surprised to see the WSL version shows Windows 10.
Ed_P