PINE64
debugging issue realted to iso image wth extra data eror - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Manjaro on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=130)
+---- Thread: debugging issue realted to iso image wth extra data eror (/showthread.php?tid=19153)



debugging issue realted to iso image wth extra data eror - penguins_rule - 03-21-2024

Hi all-

I work with the ai.

I ran this line:
dd if=shared.disk-image.img of=shared.disk-image.iso

I get this error:

Code:
/c/msys64/mingw64/bin/7z x /c/Users/myuser/Downloads/is02/shared.disk-image.iso 7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20 Scanning the drive for archives: 1 file, 5250048 bytes (5127 KiB) Extracting archive: C:\Users\myuser\Downloads\is02\shared.disk-image.iso 0.Firmware (Tow-Boot).img ERRORS: There are data after the end of archive -- Path = C:\Users\myuser\Downloads\is02\shared.disk-image.iso Type = GPT Physical Size = 5250048 ID = E0CA6E57-39B2-4482-9838-21E2785CD93D ---- Path = 0.Firmware (Tow-Boot).img Size = 4194304 File System = 67401509-72E7-4628-B1AF-EDD128E4316A Characteristics = Sys Offset = 8192 ID = CE8F2026-17B1-4B5B-88F3-3E239F8BD3D8 -- Path = 0.Firmware (Tow-Boot).img Type = gzip ERRORS: There are data after the end of archive Offset = 617544 Physical Size = 3149 Tail Size = 3573611 Headers Size = 10 Streams = 1 ERROR: There are some data after the end of the payload data : 0.Firmware (Tow-Boot) Sub items Errors: 1 Archives with Errors: 1 Open Errors: 1 Sub items Errors: 1

so the issue was per ai to check and see if the file is corrupted so i with the ai help came up with this:

Quote:python.exe test.py
  File "/c/Users/myuser/Downloads/is02/test.py", line 5
    p = subprocess.Popen(["PYTHONPATH=$PYTHONPATH:/c/msys64/usr/bin", 'python", "/usr/bin/binwalk", "-e", "shared.disk-image.img"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                                                                      ^
SyntaxError: unterminated string literal (detected at line 5)
mycomputer@name MSYS /c/Users/myuser/Downloads/is02
$ python.exe test.py
Traceback (most recent call last):
  File "/c/Users/myuser/Downloads/is02/test.py", line 5, in <module>
    p = subprocess.Popen(["PYTHONPATH=$PYTHONPATH:/c/msys64/usr/bin", "python", "/usr/bin/binwalk", "-e", "shared.disk-image.img"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1953, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'PYTHONPATH=$PYTHONPATH:/c/msys64/usr/bin'

mycomputer@name MSYS /c/Users/stealth_droid/Downloads/is02
$ python.exe test.py
Exit code: 0

#!/usr/bin
import subprocess

# Execute the Binwalk command
p = subprocess.Popen([ "python", "/usr/bin/binwalk", "-e", "shared.disk-image.img"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

# Communicate with the Binwalk command and get the output and error messages
output, error = p.communicate()

# Check the exit code of the Binwalk command
exit_code = p.returncode

# Print the exit code
print("Exit code:", exit_code)
so the issue then becomes 0 error code no error.


the output is a file named:
0.Firmware (Tow-Boot)

what other outputs would i expect after unpacking the tow-boot with 7zip?

thanks for any input.

jim


RE: debugging issue realted to iso image wth extra data eror - penguins_rule - 03-21-2024

(03-21-2024, 03:28 PM)penguins_rule Wrote: Hi all-

I work with the ai.

I ran this line:
dd if=shared.disk-image.img of=shared.disk-image.iso

I get this error:

Code:
/c/msys64/mingw64/bin/7z x /c/Users/myuser/Downloads/is02/shared.disk-image.iso 7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20 Scanning the drive for archives: 1 file, 5250048 bytes (5127 KiB) Extracting archive: C:\Users\myuser\Downloads\is02\shared.disk-image.iso 0.Firmware (Tow-Boot).img ERRORS: There are data after the end of archive -- Path = C:\Users\myuser\Downloads\is02\shared.disk-image.iso Type = GPT Physical Size = 5250048 ID = E0CA6E57-39B2-4482-9838-21E2785CD93D ---- Path = 0.Firmware (Tow-Boot).img Size = 4194304 File System = 67401509-72E7-4628-B1AF-EDD128E4316A Characteristics = Sys Offset = 8192 ID = CE8F2026-17B1-4B5B-88F3-3E239F8BD3D8 -- Path = 0.Firmware (Tow-Boot).img Type = gzip ERRORS: There are data after the end of archive Offset = 617544 Physical Size = 3149 Tail Size = 3573611 Headers Size = 10 Streams = 1 ERROR: There are some data after the end of the payload data : 0.Firmware (Tow-Boot) Sub items Errors: 1 Archives with Errors: 1 Open Errors: 1 Sub items Errors: 1

so the issue was per ai to check and see if the file is corrupted so i with the ai help came up with this:

Quote:python.exe test.py
  File "/c/Users/myuser/Downloads/is02/test.py", line 5
    p = subprocess.Popen(["PYTHONPATH=$PYTHONPATH:/c/msys64/usr/bin", 'python", "/usr/bin/binwalk", "-e", "shared.disk-image.img"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                                                                      ^
SyntaxError: unterminated string literal (detected at line 5)
mycomputer@name MSYS /c/Users/myuser/Downloads/is02
$ python.exe test.py
Traceback (most recent call last):
  File "/c/Users/myuser/Downloads/is02/test.py", line 5, in <module>
    p = subprocess.Popen(["PYTHONPATH=$PYTHONPATH:/c/msys64/usr/bin", "python", "/usr/bin/binwalk", "-e", "shared.disk-image.img"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1953, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'PYTHONPATH=$PYTHONPATH:/c/msys64/usr/bin'

mycomputer@name MSYS /c/Users/stealth_droid/Downloads/is02
$ python.exe test.py
Exit code: 0

#!/usr/bin
import subprocess

# Execute the Binwalk command
p = subprocess.Popen([ "python", "/usr/bin/binwalk", "-e", "shared.disk-image.img"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

# Communicate with the Binwalk command and get the output and error messages
output, error = p.communicate()

# Check the exit code of the Binwalk command
exit_code = p.returncode

# Print the exit code
print("Exit code:", exit_code)
so the issue then becomes 0 error code no error.


the output is a file named:
0.Firmware (Tow-Boot)

what other outputs would i expect after unpacking the tow-boot with 7zip?

thanks for any input.

jim
------------------------------------------------------------------------------------------------
The output files from tow-boot should include a boot.img file, a recovery.img file, and a vbmeta.img file.
Hi all, I didn't get all 3 of those. So I don't know if this is a side issue.

I can see that it 'possibly' got hung. This recovery.img file is important it is a double cascading failure
notwithstanding I used tow-boot instead of leaving the firmware alone in this case for spi.

thanks for anyone that can fix things at least going forward if i read this right.
jim

thanks,
jim



RE: debugging issue realted to iso image wth extra data eror - zed_pm - 03-31-2024

It was indeed a faulty image and I got a new image that works better.
SORRY!


RE: debugging issue realted to iso image wth extra data eror - waderatke - 06-18-2024

Quote:zed_pmIt was indeed a faulty image and I got a new image that works better.
https://forum.pine64.org/showthread.php?tid=19153 basketball stars
SORRY!

What is the image you are looking for? can you share? I also have this problem and need a solution