PJ-Singh-001 / Cubic

The Official Web Site for Cubic (Custom Ubuntu ISO Creator) (https://github.com/PJ-Singh-001/Cubic)
823 stars 47 forks source link

Cubic can't extract files from original disk #341

Closed asilnov closed 2 months ago

asilnov commented 2 months ago

Hi, I'm trying to create a custom image with ubuntu 20.04.06 It stucks at "Extracting original disk" step

There is some logs:

  Extract the compressed Linux file system

  • The target file path is................ /home/harddancer/release/custom-root
  • The source file path is................ /home/harddancer/release/source-
                                            disk/casper/filesystem.squashfs
  • Started process thread id.............. 140703572936448
  • Process started by thread id........... 140703556151040
  • The process started at................. 22:43:24.977367
  • Execute asynchronously................. extract-root
                                            /home/harddancer/release/custom-root
                                            /home/harddancer/release/source-
                                            disk/casper/filesystem.squashfs
  • The process id is...................... 6812
  • Error.................................. An exception occurred
  • The process thread id is............... 140703572936448
  • The process stopped at................. 22:43:25.134022
  • The exit status, signal status is...... 1, None
  • The message is......................... SYNTAX: unsquashfs [options]
                                            filesystem [directories or files to
                                            extract]         -v[ersion]
                                            print version, licence and copyright
                                            information         -d[est]
                                            <pathname>      unsquash to
                                            <pathname>, default "squashfs-root"
                                            -q[uiet]                no verbose
                                            output         -n[o-progress]
                                            don't display the progress bar
                                            -no[-xattrs]            don't
                                            extract xattrs in file system
                                            -x[attrs]               extract
                                            xattrs in file system (default)
                                            -u[ser-xattrs]          only extract
                                            user xattrs in file system.
                                            Enables extracting xattrs
                                            -p[rocessors] <number>  use <number>
                                            processors.  By default will use
                                            number of processors available
                                            -i[nfo]                 print files
                                            as they are unsquashed
                                            -li[nfo]                print files
                                            as they are unsquashed with file
                                            attributes (like ls -l output)
                                            -l[s]                   list
                                            filesystem, but don't unsquash
                                            -ll[s]                  list
                                            filesystem with file attributes
                                            (like
                                            ls -l output), but don't unsquash
                                            -lln[umeric]            -lls but
                                            with numeric uids and gids
                                            -lc                     list
                                            filesystem concisely, displaying
                                            only files
                                            and empty directories.  Don't
                                            unsquash         -llc
                                            list filesystem concisely with file
                                            attributes,
                                            displaying only files and empty
                                            directories.
                                            Don't unsquash         -o[ffset]
                                            <bytes>       skip <bytes> at start
                                            of <dest>
                                            Optionally a suffix of K, M or G can
                                            be given to specify
                                            Kbytes, Mbytes or Gbytes
                                            respectively.
                                            Default 0 bytes.         -f[orce]
                                            if file already exists then
                                            overwrite         -ig[nore-errors]
                                            Treat errors writing files to output
                                            as non-fatal         -st[rict-
                                            errors]        Treat all errors as
                                            fatal         -s[tat]
                                            display filesystem superblock
                                            information         -UTC
                                            Use UTC rather than local time zone
                                            when displaying time         -mkfs-
                                            time              display filesystem
                                            superblock time         -fstime
                                            synonym for -mkfs-time         -e[f]
                                            <extract file>    list of
                                            directories or files to extract.
                                            One per line         -da[ta-queue]
                                            <size>    Set data queue to <size>
                                            Mbytes.  Default 256
                                            Mbytes         -fr[ag-queue] <size>
                                            Set fragment queue to <size> Mbytes.
                                            Default
                                            256 Mbytes         -r[egex]
                                            treat extract names as POSIX regular
                                            expressions
                                            rather than use the default shell
                                            wildcard
                                            expansion (globbing)  Decompressors
                                            available:         gzip         lzma
                                            lzo         lz4         xz
                                            zstd
  • The exception is....................... End Of File (EOF). Exception style
                                            platform. <pexpect.pty_spawn.spawn
                                            object at 0x7ff80b81acd0> command:
                                            /usr/bin/pkexec args:
                                            [b'/usr/bin/pkexec',
                                            b'/usr/share/cubic/commands/extract-
                                            root',
                                            b'/home/harddancer/release/custom-
                                            root',
                                            b'/home/harddancer/release/source-
                                            disk/casper/filesystem.squashfs']
                                            buffer (last 100 chars): '' before
                                            (last 100 chars):
                                            'ldcard\r\n\t\t\t\texpansion
                                            (globbing)\r\n\r\nDecompressors avai
                                            lable:\r\n\tgzip\r\n\tlzma\r\n\tlzo\
                                            r\n\tlz4\r\n\txz\r\n\tzstd\r\n'
                                            after: <class
                                            'pexpect.exceptions.EOF'> match:
                                            None match_index: None exitstatus:
                                            None flag_eof: True pid: 6812
                                            child_fd: 19 closed: False timeout:
                                            300 delimiter: <class
                                            'pexpect.exceptions.EOF'> logfile:
                                            None logfile_read: None
                                            logfile_send: None maxread: 2000
                                            ignorecase: False searchwindowsize:
                                            None delaybeforesend: 0.05
                                            delayafterclose: 0.1
                                            delayafterterminate: 0.1 searcher:
                                            searcher_re:     0: re.compile('[0-9
                                            ]{1,3}(\\.[0-9]{2}){0,1}%') message:
                                            SYNTAX: unsquashfs [options]
                                            filesystem [directories or files to
                                            extract]         -v[ersion]
                                            print version, licence and copyright
                                            information         -d[est]
                                            <pathname>      unsquash to
                                            <pathname>, default "squashfs-root"
                                            -q[uiet]                no verbose
                                            output         -n[o-progress]
                                            don't display the progress bar
                                            -no[-xattrs]            don't
                                            extract xattrs in file system
                                            -x[attrs]               extract
                                            xattrs in file system (default)
                                            -u[ser-xattrs]          only extract
                                            user xattrs in file system.
                                            Enables extracting xattrs
                                            -p[rocessors] <number>  use <number>
                                            processors.  By default will use
                                            number of processors available
                                            -i[nfo]                 print files
                                            as they are unsquashed
                                            -li[nfo]                print files
                                            as they are unsquashed with file
                                            attributes (like ls -l output)
                                            -l[s]                   list
                                            filesystem, but don't unsquash
                                            -ll[s]                  list
                                            filesystem with file attributes
                                            (like
                                            ls -l output), but don't unsquash
                                            -lln[umeric]            -lls but
                                            with numeric uids and gids
                                            -lc                     list
                                            filesystem concisely, displaying
                                            only files
                                            and empty directories.  Don't
                                            unsquash         -llc
                                            list filesystem concisely with file
                                            attributes,
                                            displaying only files and empty
                                            directories.
                                            Don't unsquash         -o[ffset]
                                            <bytes>       skip <bytes> at start
                                            of <dest>
                                            Optionally a suffix of K, M or G can
                                            be given to specify
                                            Kbytes, Mbytes or Gbytes
                                            respectively.
                                            Default 0 bytes.         -f[orce]
                                            if file already exists then
                                            overwrite         -ig[nore-errors]
                                            Treat errors writing files to output
                                            as non-fatal         -st[rict-
                                            errors]        Treat all errors as
                                            fatal         -s[tat]
                                            display filesystem superblock
                                            information         -UTC
                                            Use UTC rather than local time zone
                                            when displaying time         -mkfs-
                                            time              display filesystem
                                            superblock time         -fstime
                                            synonym for -mkfs-time         -e[f]
                                            <extract file>    list of
                                            directories or files to extract.
                                            One per line         -da[ta-queue]
                                            <size>    Set data queue to <size>
                                            Mbytes.  Default 256
                                            Mbytes         -fr[ag-queue] <size>
                                            Set fragment queue to <size> Mbytes.
                                            Default
                                            256 Mbytes         -r[egex]
                                            treat extract names as POSIX regular
                                            expressions
                                            rather than use the default shell
                                            wildcard
                                            expansion (globbing)  Decompressors
                                            available:         gzip         lzma
                                            lzo         lz4         xz
                                            zstd
  • The trace back is...................... Traceback (most recent call last):
                                            File "/usr/lib/python3/dist-
                                            packages/pexpect/spawnbase.py", line
                                            166, in read_nonblocking     s =
                                            os.read(self.child_fd, size)
                                            OSError: [Errno 5] Input/output
                                            error  During handling of the above
                                            exception, another exception
                                            occurred:  Traceback (most recent
                                            call last):   File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/expect.py", line
                                            111, in expect_loop     incoming = s
                                            pawn.read_nonblocking(spawn.maxread,
                                            timeout)   File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/pty_spawn.py", line
                                            485, in read_nonblocking     return
                                            super(spawn,
                                            self).read_nonblocking(size)   File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/spawnbase.py", line
                                            171, in read_nonblocking     raise
                                            EOF('End Of File (EOF). Exception
                                            style platform.')
                                            pexpect.exceptions.EOF: End Of File
                                            (EOF). Exception style platform.
                                            During handling of the above
                                            exception, another exception
                                            occurred:  Traceback (most recent
                                            call last):   File "/usr/share/cubic
                                            /cubic/utilities/progressor.py",
                                            line 413, in process_command     if
                                            not done: raise exception   File "/u
                                            sr/share/cubic/cubic/utilities/progr
                                            essor.py", line 408, in
                                            process_command
                                            process.expect(PERCENT_PATTERN)
                                            File "/usr/lib/python3/dist-
                                            packages/pexpect/spawnbase.py", line
                                            340, in expect     return self.expec
                                            t_list(compiled_pattern_list,   File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/spawnbase.py", line
                                            369, in expect_list     return
                                            exp.expect_loop(timeout)   File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/expect.py", line
                                            117, in expect_loop     return
                                            self.eof(e)   File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/expect.py", line
                                            63, in eof     raise EOF(msg)
                                            pexpect.exceptions.EOF: End Of File
                                            (EOF). Exception style platform.
                                            <pexpect.pty_spawn.spawn object at
                                            0x7ff80b81acd0> command:
                                            /usr/bin/pkexec args:
                                            [b'/usr/bin/pkexec',
                                            b'/usr/share/cubic/commands/extract-
                                            root',
                                            b'/home/harddancer/release/custom-
                                            root',
                                            b'/home/harddancer/release/source-
                                            disk/casper/filesystem.squashfs']
                                            buffer (last 100 chars): '' before
                                            (last 100 chars):
                                            'ldcard\r\n\t\t\t\texpansion
                                            (globbing)\r\n\r\nDecompressors avai
                                            lable:\r\n\tgzip\r\n\tlzma\r\n\tlzo\
                                            r\n\tlz4\r\n\txz\r\n\tzstd\r\n'
                                            after: <class
                                            'pexpect.exceptions.EOF'> match:
                                            None match_index: None exitstatus:
                                            None flag_eof: True pid: 6812
                                            child_fd: 19 closed: False timeout:
                                            300 delimiter: <class
                                            'pexpect.exceptions.EOF'> logfile:
                                            None logfile_read: None
                                            logfile_send: None maxread: 2000
                                            ignorecase: False searchwindowsize:
                                            None delaybeforesend: 0.05
                                            delayafterclose: 0.1
                                            delayafterterminate: 0.1 searcher:
                                            searcher_re:     0: re.compile('[0-9
                                            ]{1,3}(\\.[0-9]{2}){0,1}%')
  • Stopped process thread id.............. 140703572936448
  • Raise the exception to thread id....... 140703556151040
  • Do not propagate exception............. exception EOF('End Of File (EOF).
                                            Exception style
                                            platform.\n<pexpect.pty_spawn.spawn
                                            object at 0x7ff80b81acd0>\ncommand:
                                            /usr/bin/pkexec\nargs:
                                            [b\'/usr/bin/pkexec\', b\'/usr/share
                                            /cubic/commands/extract-root\',
                                            b\'/home/harddancer/release/custom-
                                            root\',
                                            b\'/home/harddancer/release/source-d
                                            isk/casper/filesystem.squashfs\']\nb
                                            uffer (last 100 chars): \'\'\nbefore
                                            (last 100 chars):
                                            \'ldcard\\r\\n\\t\\t\\t\\texpansion
                                            (globbing)\\r\\n\\r\\nDecompressors
                                            available:\\r\\n\\tgzip\\r\\n\\tlzma
                                            \\r\\n\\tlzo\\r\\n\\tlz4\\r\\n\\txz\
                                            \r\\n\\tzstd\\r\\n\'\nafter: <class
                                            \'pexpect.exceptions.EOF\'>\nmatch:
                                            None\nmatch_index: None\nexitstatus:
                                            None\nflag_eof: True\npid:
                                            6812\nchild_fd: 19\nclosed:
                                            False\ntimeout: 300\ndelimiter:
                                            <class \'pexpect.exceptions.EOF\'>\n
                                            logfile: None\nlogfile_read:
                                            None\nlogfile_send: None\nmaxread:
                                            2000\nignorecase:
                                            False\nsearchwindowsize:
                                            None\ndelaybeforesend:
                                            0.05\ndelayafterclose:
                                            0.1\ndelayafterterminate:
                                            0.1\nsearcher: searcher_re:\n    0:
                                            re.compile(\'[0-9]{1,3}(\\\\.[0-9]{2
                                            }){0,1}%\')\nmessage: SYNTAX:
                                            unsquashfs [options] filesystem
                                            [directories or files to
                                            extract]\n\t-v[ersion]\t\tprint
                                            version, licence and copyright
                                            information\n\t-d[est]
                                            <pathname>\tunsquash to <pathname>,
                                            default "squashfs-
                                            root"\n\t-q[uiet]\t\tno verbose
                                            output\n\t-n[o-progress]\t\tdon\'t
                                            display the progress
                                            bar\n\t-no[-xattrs]\t\tdon\'t
                                            extract xattrs in file
                                            system\n\t-x[attrs]\t\textract
                                            xattrs in file system
                                            (default)\n\t-u[ser-xattrs]\t\tonly
                                            extract user xattrs in file
                                            system.\n\t\t\t\tEnables extracting
                                            xattrs\n\t-p[rocessors]
                                            <number>\tuse <number> processors.
                                            By default will use\n\t\t\t\tnumber
                                            of processors
                                            available\n\t-i[nfo]\t\t\tprint
                                            files as they are
                                            unsquashed\n\t-li[nfo]\t\tprint
                                            files as they are unsquashed with
                                            file\n\t\t\t\tattributes (like ls -l
                                            output)\n\t-l[s]\t\t\tlist
                                            filesystem, but don\'t
                                            unsquash\n\t-ll[s]\t\t\tlist
                                            filesystem with file attributes
                                            (like\n\t\t\t\tls -l output), but
                                            don\'t
                                            unsquash\n\t-lln[umeric]\t\t-lls but
                                            with numeric uids and
                                            gids\n\t-lc\t\t\tlist filesystem
                                            concisely, displaying only
                                            files\n\t\t\t\tand empty
                                            directories.  Don\'t
                                            unsquash\n\t-llc\t\t\tlist
                                            filesystem concisely with file
                                            attributes,\n\t\t\t\tdisplaying only
                                            files and empty
                                            directories.\n\t\t\t\tDon\'t
                                            unsquash\n\t-o[ffset] <bytes>\tskip
                                            <bytes> at start of
                                            <dest>\n\t\t\t\tOptionally a suffix
                                            of K, M or G can be given to
                                            specify\n\t\t\t\tKbytes, Mbytes or
                                            Gbytes
                                            respectively.\n\t\t\t\tDefault 0
                                            bytes.\n\t-f[orce]\t\tif file
                                            already exists then
                                            overwrite\n\t-ig[nore-errors]\tTreat
                                            errors writing files to output as
                                            non-fatal\n\t-st[rict-errors]\tTreat
                                            all errors as
                                            fatal\n\t-s[tat]\t\t\tdisplay
                                            filesystem superblock
                                            information\n\t-UTC\t\t\tUse UTC
                                            rather than local time zone when
                                            displaying time\n\t-mkfs-
                                            time\t\tdisplay filesystem
                                            superblock
                                            time\n\t-fstime\t\t\tsynonym for
                                            -mkfs-time\n\t-e[f] <extract
                                            file>\tlist of directories or files
                                            to extract.\n\t\t\t\tOne per
                                            line\n\t-da[ta-queue] <size>\tSet
                                            data queue to <size> Mbytes.
                                            Default
                                            256\n\t\t\t\tMbytes\n\t-fr[ag-queue]
                                            <size>\tSet fragment queue to <size>
                                            Mbytes.  Default\n\t\t\t\t256
                                            Mbytes\n\t-r[egex]\t\ttreat extract
                                            names as POSIX regular
                                            expressions\n\t\t\t\trather than use
                                            the default shell
                                            wildcard\n\t\t\t\texpansion
                                            (globbing)\n\nDecompressors availabl
                                            e:\n\tgzip\n\tlzma\n\tlzo\n\tlz4\n\t
                                            xz\n\tzstd') not a BaseException
                                            subclass

But I can extract the filesystem manually using command sudo unsquashfs -d custom-root ./source-disk/casper/filesystem.squashfs

image

asilnov commented 2 months ago

The reason is old version of unsquashfs (4.4). It doesn't support -no-exit-code option.

PJ-Singh-001 commented 2 months ago

The reason is old version of unsquashfs (4.4). It doesn't support -no-exit-code option.

Thanks. I’ll see what I can do about this.

PJ-Singh-001 commented 2 months ago

Fix released in Cubic version 2024.09-89.

Please update Cubic:

sudo apt update
sudo apt install --no-install-recommends cubic