Problem with activating XZM in changes directory

Post here if you are a new Porteus member and you're looking for some help.
tom2238
Black ninja
Black ninja
Posts: 49
Joined: 15 Nov 2018, 14:52
Distribution: Porteus MATE v5.0 x86_64
Location: Czechia

Problem with activating XZM in changes directory

Post#1 by tom2238 » 12 Mar 2020, 12:06

Hi all.

I have this problem:
When I use kernel from distribution iso (4.9.0 from 3.2.2 version and 4.16.3 from 4.0 version), I can activate XZMs which is located anywhere. If I compile custom kernel (eg. 4.9.162 and 4.9.216) using mkKernel, then I can activate only XZMs which is located out of AUFS union.

When activating XZM module in AUFS union follows some errors (custom kernel 4.9.216-porteus):
In GUI - Can't insert module to union
In CLI

Code: Select all

# activate /home/guest/XZM/u-boot-tools-2017.01-i586-1_slonly.xzm 
Quiet mode: off
mount: / not mounted or bad option					// mount return error code 32

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
u-boot-tools-2017.01-i586-1_slonly.xzm: Can't insert module to union
In dmesg

Code: Select all

kern  :err   : [Thu Mar 12 12:50:36 2020] aufs test_add:272:mount[4914]: /mnt/live/memory/images/u-boot-tools-2017.01-i586-1_slonly.xzm is overlapped
My AUFS kernel config:

Code: Select all

# zcat /proc/config.gz | grep AUFS
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=y
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
CONFIG_AUFS_SBILIST=y
CONFIG_AUFS_HNOTIFY=
CONFIG_AUFS_HFSNOTIFY=y
CONFIG_AUFS_EXPORT=y
CONFIG_AUFS_INO_T_64=y
CONFIG_AUFS_XATTR=y
# CONFIG_AUFS_FHSM is not set
CONFIG_AUFS_RDU=y
CONFIG_AUFS_DIRREN=y
# CONFIG_AUFS_SHWH is not set
# CONFIG_AUFS_BR_RAMFS is not set
CONFIG_AUFS_BR_FUSE=y
CONFIG_AUFS_POLL=y
# CONFIG_AUFS_BR_HFSPLUS is not set
CONFIG_AUFS_BDEV_LOOP=y
# CONFIG_AUFS_DEBUG is not set
What is different in your kernel and my kernel? Is this feature normal? And how to solve this problem (bug)?

Yes, I can move XZMs to another directory, but sometimes I'd like to activate modules in my home.

burdi01
Shogun
Shogun
Posts: 201
Joined: 18 Aug 2013, 12:09
Distribution: Slackware PartedMagic Xubuntu
Location: The Netherlands

Problem with activating XZM in changes directory

Post#2 by burdi01 » 13 Mar 2020, 16:34

Running:

Code: Select all

modprobe configs
gunzip < /proc/config.gz > config
as root will give you the "porteus" kernel config. Comparing then is up to you ...
:D

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Problem with activating XZM in changes directory

Post#3 by roadie » 13 Mar 2020, 19:22

tom2238,

When you compiled the kernel, which patches were applied? I think the loopback patch may have something to do with this. I found the same thing when I compiled my current kernel, and patches were not applying properly.

tom2238
Black ninja
Black ninja
Posts: 49
Joined: 15 Nov 2018, 14:52
Distribution: Porteus MATE v5.0 x86_64
Location: Czechia

Problem with activating XZM in changes directory

Post#4 by tom2238 » 13 Mar 2020, 20:59

So, in dmesg is too:

Code: Select all

[83378.170165] aufs au_warn_loopback:123:loop96[18623]: you may want to try another patch 
for loopback file on ext4(0xef53) branch
For kernel compilation I used mkKernel-20-02-10-xz-noarch.xzm and proceed with default options without any user patches.

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Problem with activating XZM in changes directory

Post#5 by roadie » 13 Mar 2020, 22:51

tom2238 wrote:
13 Mar 2020, 20:59
So, in dmesg is too:

Code: Select all

[83378.170165] aufs au_warn_loopback:123:loop96[18623]: you may want to try another patch 
for loopback file on ext4(0xef53) branch
For kernel compilation I used mkKernel-20-02-10-xz-noarch.xzm and proceed with default options without any user patches.



According to the readme for aufs-loopback.patch, the application of the loopback patch is necessary only when you get that dmesg error. I had no success using the mkKernel application. The reasons, I don't know, probably my usage.

I ended up patching the kernel by hand and was able to get a combination that worked. I found the best way was to apply the minimum number of patches needed to work. I also used only the base patches, nothing else.

tom2238
Black ninja
Black ninja
Posts: 49
Joined: 15 Nov 2018, 14:52
Distribution: Porteus MATE v5.0 x86_64
Location: Czechia

Problem with activating XZM in changes directory

Post#6 by tom2238 » 14 Mar 2020, 12:25

roadie wrote:
13 Mar 2020, 22:51
I ended up patching the kernel by hand and was able to get a combination that worked. I found the best way was to apply the minimum number of patches needed to work. I also used only the base patches, nothing else.
Top
By hand do you mean manually edit c and h kernel files (add patch diffs)?

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Problem with activating XZM in changes directory

Post#7 by roadie » 14 Mar 2020, 16:08

tom2238 wrote:
14 Mar 2020, 12:25
roadie wrote:
13 Mar 2020, 22:51
I ended up patching the kernel by hand and was able to get a combination that worked. I found the best way was to apply the minimum number of patches needed to work. I also used only the base patches, nothing else.
Top
By hand do you mean manually edit c and h kernel files (add patch diffs)?



Yes, I downloaded the kernel source and ran patch in it, any files that failed to take the patch were edited by hand. I was able to get a lot of information by reading Neko's posts in the Kernel Builder thread.

I'm surprised that the 4.9 kernel is giving problems, I had thought that the patch problems were solved with it, the biggest problem was that patches were not available when the kernel source was released.

When using the mkKernel application, are there any logs to check, or error messages? It's very possible that the patches aren't the problem.

tom2238
Black ninja
Black ninja
Posts: 49
Joined: 15 Nov 2018, 14:52
Distribution: Porteus MATE v5.0 x86_64
Location: Czechia

Problem with activating XZM in changes directory

Post#8 by tom2238 » 14 Mar 2020, 22:48

Thanks roadie for your ideas.
I follow this steps:
1 - Run mkKernel
2 - Select location, kernel version, arch, download, expand & patch => click OK and wait
3 - Add aufs4-loopback.patch manually
4 - Modify kernel config using make menuconfig & save
5 - Run mkKernel again
6 - Select location, kernel version, arch, compile, crippled_sources, 000-kernel, without ZSTD compress => click OK and wait
7 - Use xzm2dir for 000-kernel.xzm
8 - Add firmware
9 - Use dir2xzm to create 000-kernel.xzm with firmware
10 - Copy vmlinuz to boot directory & copy 000-kernel.xzm to porteus/base
11 - Modify syslinux config
12 - Try to boot with new kernel from USB stick
13 - Success :celebrate3:
14 - Now is possible to activate module from home (changes) directory

Thank you roadie. Now is time to test kernel for some time. Problem was in aufs4-loopback.patch (not applied in default)

roadie
Full of knowledge
Full of knowledge
Posts: 400
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Problem with activating XZM in changes directory

Post#9 by roadie » 15 Mar 2020, 03:21

Excellent, glad to see you got it figured out.

Post Reply