-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting root filesystem failed #55
Comments
Currently, FirmAE uses binwalk 2.3.3. Please check your binwalk version. |
I had the same problem, and I'm sure my binwalk is version 2.3.3 |
Installed in ununtu20.04 can be used normally |
I can't reproduce the situation on the cleanly installed system in ubuntu 20.04. The current version of the binwalk can be checked in the If the version is not correct, please re-install the binwalk using this command (https://github.com/pr0v3rbs/FirmAE/blob/master/install.sh#L25-L31) The binwalk need to be installed in the |
Hey @pr0v3rbs, the binwalk repo has file deps.sh, which is corrupted due to a change of repo ubi_reader, hence that file cannot work properly. I modified the install.sh file of FirmAE a bit so it can install binwalk and work properly Result of diff: --- install.sh 2023-05-29 11:48:56.740200200 +0700
+++ install_modified.sh 2023-05-29 12:03:27.027966600 +0700
@@ -26,13 +26,19 @@
wget https://github.com/ReFirmLabs/binwalk/archive/refs/tags/v2.3.3.tar.gz && \
tar -xf v2.3.3.tar.gz && \
cd binwalk-2.3.3 && \
- sed -i 's/^install_unstuff//g' deps.sh && \
- echo y | ./deps.sh && \
- sudo python3 setup.py install
+ sudo python3 setup.py install && \
+ sudo apt-get install build-essential liblzma-dev liblzo2-dev zlib1g-dev && \
+ git clone https://github.com/devttys0/sasquatch && \
+ cd sasquatch/patches && \
+ wget https://github.com/devttys0/sasquatch/files/7776843/M1-Kali.patch.txt && \
+ patch patch0.txt M1-Kali.patch.txt && \
+ cd .. && \
+ echo "y" | ./build.sh && \
+ cd .. && \
+ rm -rf sasquatch && \
+ cd ..
sudo apt-get install -y mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract fusecram cramfsswap squashfs-tools sleuthkit default-jdk cpio lzop lzma srecord zlib1g-dev liblzma-dev liblzo2-dev unzip
-cd - # back to root of project
-
sudo cp core/unstuff /usr/local/bin/
python3 -m pip install python-lzo cstruct ubi_reader |
I solved this issue using the following command
|
root@attifyos:/home/iot/tools/firmAE/FirmAE# ./run.sh -c dlink /home/iot/tools/firmware-analysis-toolkit/DIR816.img
[*] /home/iot/tools/firmware-analysis-toolkit/DIR816.img emulation start!!!
General Error: Cannot open file --run-as=root (CWD: /tmp/tmpuhbydzva) : [Errno 2] No such file or directory: '--run-as=root'
General Error: Cannot open file --preserve-symlinks (CWD: /tmp/tmpuhbydzva) : [Errno 2] No such file or directory: '--preserve-symlinks'
Traceback (most recent call last):
File "./sources/extractor/extractor.py", line 446, in extract
File "/usr/local/lib/python3.6/dist-packages/binwalk/init.py", line 10, in scan
objs = m.execute()
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 784, in execute
obj = self.run(module)
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 803, in run
obj = self.load(module, kwargs)
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 834, in load
argv.update(self.dependencies(module, argv['enabled']))
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 866, in dependencies
raise ModuleException("Failed to load " + dependency.name + " module")
binwalk.core.exceptions.ModuleException: Failed to load General module
General Error: Cannot open file --run-as=root (CWD: /tmp/tmpmm1kal4s) : [Errno 2] No such file or directory: '--run-as=root'
General Error: Cannot open file --preserve-symlinks (CWD: /tmp/tmpmm1kal4s) : [Errno 2] No such file or directory: '--preserve-symlinks'
Traceback (most recent call last):
File "./sources/extractor/extractor.py", line 446, in extract
File "/usr/local/lib/python3.6/dist-packages/binwalk/init.py", line 10, in scan
objs = m.execute()
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 784, in execute
obj = self.run(module)
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 803, in run
obj = self.load(module, kwargs)
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 834, in load
argv.update(self.dependencies(module, argv['enabled']))
File "/usr/local/lib/python3.6/dist-packages/binwalk/core/module.py", line 866, in dependencies
raise ModuleException("Failed to load " + dependency.name + " module")
binwalk.core.exceptions.ModuleException: Failed to load General module
[-] Extracting root filesystem failed!
root@attifyos:/home/iot/tools/firmAE/FirmAE#
The text was updated successfully, but these errors were encountered: