[SOLVED] Cannot convert 64bit module from lzm to xzm

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
att
Contributor
Contributor
Posts: 137
Joined: 28 Dec 2010, 17:09

[SOLVED] Cannot convert 64bit module from lzm to xzm

Post#1 by att » 08 Apr 2011, 12:11

Hello,
I have a problem converting one lzm module to xzm. I always get an error from mksquashfs, saying "unable to create", or somesuch.
The module in question is "nzbperl_64bitaddon.lzm" from my own repository (which is on Usenet).
I have depacked the file from Slax-Remix v09 and made a TAR file :
http://ompldr.org/vODY2ZA/nzbperl64bitaddon.tar

If you can convert this to a normal xzm module (with main directory /usr to where it belongs) please let me know, and let me know how to do it.
Last edited by att on 20 Apr 2011, 11:18, edited 1 time in total.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Cannot convert 64bit module from lzm to xzm

Post#2 by Hamza » 08 Apr 2011, 13:21

Try these commands:

1.

Code: Select all

mkdir /tmp/wrk
2.

Code: Select all

lzm2dir /path/to/module.lzm /tmp/wrk
3.

Code: Select all

dir2xzm /tmp/wrk /tmp/mymodule.xzm
NjVFQzY2Rg==

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Cannot convert 64bit module from lzm to xzm

Post#3 by fanthom » 08 Apr 2011, 21:14

@att
try 'lzm2xzm' cli utility - works always for me.
add [SOLVED] if solved.
Please add [Solved] to your thread title if the solution was found.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Cannot convert 64bit module from lzm to xzm

Post#4 by Hamza » 08 Apr 2011, 21:15

try 'lzm2xzm' cli utility - works always for me.
@fanthom , I forgotten this script.
NjVFQzY2Rg==

att
Contributor
Contributor
Posts: 137
Joined: 28 Dec 2010, 17:09

Re: Cannot convert 64bit module from lzm to xzm

Post#5 by att » 19 Apr 2011, 09:36

Pleeeaaase help, I discovered that "dir2xzm" has a bug!

I am still trying to make a module out of my directory in /tmp, which contains all the files necessary:

root@porteus:/tmp# cd
root@porteus:~# dir2xzm /tmp/lib64_nzbperl /tmp/mymod.xzm
mksquashfs: invalid option

SYNTAX:mksquashfs source1 source2 ... dest [options] [-e list of exclude
dirs/files]

Filesystem build options:
-comp <comp> select <comp> compression
Compressors available:
gzip
lzma
lzo
xz (default)
-b <block_size> set data block to <block_size>. Default 131072 bytes
-no-exports don't make the filesystem exportable via NFS
-no-sparse don't detect sparse files
-no-xattrs don't store extended attributes
-xattrs store extended attributes (default)
-noI do not compress inode table
-noD do not compress data blocks
-noF do not compress fragment blocks
-noX do not compress extended attributes
-no-fragments do not use fragments
-always-use-fragments use fragment blocks for files larger than block size
-no-duplicates do not perform duplicate checking
-all-root make all files owned by root
-force-uid uid set all file uids to uid
-force-gid gid set all file gids to gid
-nopad do not pad filesystem to a multiple of 4K
-keep-as-directory if one source directory is specified, create a root
directory containing that directory, rather than the
contents of the directory

Filesystem filter options:
-p <pseudo-definition> Add pseudo file definition
-pf <pseudo-file> Add list of pseudo file definitions
-sort <sort_file> sort files according to priorities in <sort_file>. One
file or dir with priority per line. Priority -32768 to
32767, default priority 0
-ef <exclude_file> list of exclude dirs/files. One per line
-wildcards Allow extended shell wildcards (globbing) to be used in
exclude dirs/files
-regex Allow POSIX regular expressions to be used in exclude
dirs/files

Filesystem append options:
-noappend do not append to existing filesystem
-root-becomes <name> when appending source files/directories, make the
original root become a subdirectory in the new root
called <name>, rather than adding the new source items
to the original root

Mksquashfs runtime options:
-version print version, licence and copyright message
-recover <name> recover filesystem data using recovery file <name>
-no-recovery don't generate a recovery file
-info print files written to filesystem
-no-progress don't display the progress bar
-processors <number> Use <number> processors. By default will use number of
processors available
-read-queue <size> Set input queue to <size> Mbytes. Default 64 Mbytes
-write-queue <size> Set output queue to <size> Mbytes. Default 512 Mbytes
-fragment-queue <size> Set fragment queue to <size> Mbytes. Default 64 Mbytes

Miscellaneous options:
-root-owned alternative name for -all-root
-noInodeCompression alternative name for -noI
-noDataCompression alternative name for -noD
-noFragmentCompression alternative name for -noF
-noXattrCompression alternative name for -noX

Compressors available and compressor specific options:
gzip (no options)
lzma (no options)
lzo (no options)
xz (default)
-Xbcj filter1,filter2,...,filterN
Compress using filter1,filter2,...,filterN in turn
(in addition to no filter), and choose the best compression.
Available filters: x86, arm, armthumb, powerpc, sparc, ia64
-Xdict-size <dict-size>
Use <dict-size> as the XZ dictionary size. The dictionary size
can be specified as a percentage of the block size, or as an
absolute value. The dictionary size must be less than or equal
to the block size and 8192 bytes or larger. It must also be
storable in the xz header as either 2^n or as 2^n+2^(n+1).
Example dict-sizes are 75%, 50%, 37.5%, 25%, or 32K, 16K, 8K
etc.
error building compressed image
root@porteus:~#

So you see, I always get the error "mksquashfs: invalid option".
I get the same error when I use the Dolphin filemanager and right-click to make a module.

What do I do now?

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Cannot convert 64bit module from lzm to xzm

Post#6 by Hamza » 19 Apr 2011, 09:38

Try with

Code: Select all

mksquashfs /tmp/lib64_nzbperl /tmp/mymod.xzm -b 256K
NjVFQzY2Rg==

att
Contributor
Contributor
Posts: 137
Joined: 28 Dec 2010, 17:09

Re: Cannot convert 64bit module from lzm to xzm

Post#7 by att » 19 Apr 2011, 09:46

It is strange, I just discovered that if I call "mksquashfs" myself instead of create_module, then it seems to work: Look at this:

root@porteus:/tmp# mksquashfs lib64_nzbperl test1.xzm
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on test1.xzm, block size 131072.
[====================================================================================================================================================================================-] 315/315 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 875.54 Kbytes (0.86 Mbytes)
24.30% of uncompressed filesystem size (3602.89 Kbytes)
Inode table size 3180 bytes (3.11 Kbytes)
25.69% of uncompressed inode table size (12376 bytes)
Directory table size 3072 bytes (3.00 Kbytes)
37.35% of uncompressed directory table size (8224 bytes)
Number of duplicate files found 15
Number of inodes 385
Number of files 311
Number of fragments 18
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 74
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)

-------> seems to work, doesn't it ?

Now the same with Create_module, from the script :

root@porteus:/tmp# create_module lib64_nzbperl ttt.xzm
mksquashfs: invalid option

SYNTAX:mksquashfs source1 source2 ... dest [options] [-e list of exclude
dirs/files]

Filesystem build options:
-comp <comp> select <comp> compression
Compressors available:
gzip
lzma
lzo
xz (default)
-b <block_size> set data block to <block_size>. Default 131072 bytes
-no-exports don't make the filesystem exportable via NFS
-no-sparse don't detect sparse files
-no-xattrs don't store extended attributes
-xattrs store extended attributes (default)
-noI do not compress inode table
-noD do not compress data blocks
-noF do not compress fragment blocks
-noX do not compress extended attributes
-no-fragments do not use fragments
-always-use-fragments use fragment blocks for files larger than block size
-no-duplicates do not perform duplicate checking
-all-root make all files owned by root
-force-uid uid set all file uids to uid
-force-gid gid set all file gids to gid
-nopad do not pad filesystem to a multiple of 4K
-keep-as-directory if one source directory is specified, create a root
directory containing that directory, rather than the
contents of the directory

Filesystem filter options:
-p <pseudo-definition> Add pseudo file definition
-pf <pseudo-file> Add list of pseudo file definitions
-sort <sort_file> sort files according to priorities in <sort_file>. One
file or dir with priority per line. Priority -32768 to
32767, default priority 0
-ef <exclude_file> list of exclude dirs/files. One per line
-wildcards Allow extended shell wildcards (globbing) to be used in
exclude dirs/files
-regex Allow POSIX regular expressions to be used in exclude
dirs/files

Filesystem append options:
-noappend do not append to existing filesystem
-root-becomes <name> when appending source files/directories, make the
original root become a subdirectory in the new root
called <name>, rather than adding the new source items
to the original root

Mksquashfs runtime options:
-version print version, licence and copyright message
-recover <name> recover filesystem data using recovery file <name>
-no-recovery don't generate a recovery file
-info print files written to filesystem
-no-progress don't display the progress bar
-processors <number> Use <number> processors. By default will use number of
processors available
-read-queue <size> Set input queue to <size> Mbytes. Default 64 Mbytes
-write-queue <size> Set output queue to <size> Mbytes. Default 512 Mbytes
-fragment-queue <size> Set fragment queue to <size> Mbytes. Default 64 Mbytes

Miscellaneous options:
-root-owned alternative name for -all-root
-noInodeCompression alternative name for -noI
-noDataCompression alternative name for -noD
-noFragmentCompression alternative name for -noF
-noXattrCompression alternative name for -noX

Compressors available and compressor specific options:
gzip (no options)
lzma (no options)
lzo (no options)
xz (default)
-Xbcj filter1,filter2,...,filterN
Compress using filter1,filter2,...,filterN in turn
(in addition to no filter), and choose the best compression.
Available filters: x86, arm, armthumb, powerpc, sparc, ia64
-Xdict-size <dict-size>
Use <dict-size> as the XZ dictionary size. The dictionary size
can be specified as a percentage of the block size, or as an
absolute value. The dictionary size must be less than or equal
to the block size and 8192 bytes or larger. It must also be
storable in the xz header as either 2^n or as 2^n+2^(n+1).
Example dict-sizes are 75%, 50%, 37.5%, 25%, or 32K, 16K, 8K
etc.
root@porteus:/tmp#

I also cannot find the file for "create_module" or "liblinuxlive", which is weird. Any suggestions ?

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Cannot convert 64bit module from lzm to xzm

Post#8 by Hamza » 19 Apr 2011, 09:56

Please don't change anything in liblinuxlive , because , if you change a "vital" thing in it , you can crash your system , and you can loose your data.

You can use a shell script

Code: Select all

#!/bin/bash

x=$1 
y=$2

mksquashfs $x $y -b 256K

Save this code in text file , and make it executable (chmod +x) , after just execute it

root@porteus:~# ./make_module /tmp/lib64_nzbperl /tmp/test1.xzm
NjVFQzY2Rg==

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Cannot convert 64bit module from lzm to xzm

Post#9 by fanthom » 19 Apr 2011, 15:46

@att
no matter how hard i try, dir2xzm always work.
did you modify /usr/lib/liblinuxlive?
this is a 'tar' archive (not tgz)
http://ompldr.org/vODY2ZA/nzbperl64bitaddon.tar
so unpack it first and then use dir2xzm

@Hamza
mksquashfs $1 $2 -b 256K
will work as well :)
Please add [Solved] to your thread title if the solution was found.

att
Contributor
Contributor
Posts: 137
Joined: 28 Dec 2010, 17:09

Re: [SOLVED] Cannot convert 64bit module from lzm to xzm

Post#10 by att » 20 Apr 2011, 11:19

Well, I have no idea what is wrong with my liblinuxlive, but I will investigate.
In the meantime, using "mksquashfs" seems to fix these issues. Thanks for the advice!

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: [SOLVED] Cannot convert 64bit module from lzm to xzm

Post#11 by Hamza » 20 Apr 2011, 11:52

This topic is solved
NjVFQzY2Rg==

Post Reply