I download firmware


I extract with binwalk

sudo apt-get install -y binwalk'
binwalk -eM Sx220-R1.1.4.1.bin
cd _Sx220-R1.1.4.1.bin-0.extracted/_vmlinux_org.bin.extracted/_28A000.extracted/cpio-root

I work with sqfs.img, want mount or extract

See file command

$ file sqfs.img
sqfs.img: data

I try mount

$ sudo mount -o loop sqfs.img sqfs
mount: cpio-root/sqfs: wrong fs type, bad option, bad superblock on 
/dev/loop2, missing codepage or helper program, or other error.

See fdisk -l

$ fdisk -l sqfs.img
Disk sqfs.img: 5 MiB, 5193728 bytes, 10144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

See parted

$ sudo parted sqfs.img
GNU Parted 3.2
Using cpio-root/sqfs.img
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: cpio-root/sqfs.img: unrecognised disk
Model:  (file)
Disk cpio-root/sqfs.img: 5194kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

I read

How to extract N150R firmware from .img file

I try dd

 $ dd if=sqfs.img of=file.squashfs bs=192 skip=1
 27049+1 records in
 27049+1 records out
 5193536 bytes (5.2 MB, 5.0 MiB) copied, 0.0968263 s, 53.6 MB/s

I try mount again

 $ sudo mount file.squashfs sqfs/
 mount: _Sx220-R1.1.4.1.bin-0.extracted/_vmlinux_org.bin.extracted/_28A000.extracted/cpio-root/sqfs: wrong fs type, bad option, bad superblock on /dev/loop2, missing codepage or helper program, or other error.

I try sasquatch

$ sasquatch file.squashfs
SquashFS version [40316.27519] / inode count [-143619237] suggests a SquashFS image of a different endianess
Non-standard SquashFS Magic: ▒<W▒
Reading a different endian SQUASHFS filesystem on file.squashfs
Filesystem on file.squashfs is (31901:32619), which is a later filesystem version than I support!

What can try next?

1 Answer 1


Using binwalk v2.1.2b, after unpacking the cpio archive 28A000, the squashfs-root file system is available as a directory on my machine.

_Sx220-R1.1.4.1.bin.extracted/_vmlinux_org.bin.extracted/_28A000.extracted $ ls
5CB1A0.squashfs  CDFB8.squashfs  squashfs-root  squashfs-root-0   <----------------

Within this directory were folders named cgi and cgi-bin, which contain several MIPS Linux ELF32 binaries. I assume this is what you are interested in.

_Sx220-R1.1.4.1.bin.extracted/_vmlinux_org.bin.extracted/_28A000.extracted/squashfs-root/home/web $ ls
cgi  cgi-bin  css  extHelp  help  home.html  html  images  index.html  js  lang  login.html  logo  mime.types  tmp

_Sx220-R1.1.4.1.bin.extracted/_vmlinux_org.bin.extracted/_28A000.extracted/squashfs-root/home/web $ ls cgi/
get.cgi  httprestorecfg.cgi  httpuploadbakcfg.cgi  httpuploadlang.cgi  httpuploadruncfg.cgi  login.cgi  set.cgi

Please check your version of binwalk; if it is older than v2.1.2b you need to uninstall your older version and install the current version.

The current version can be installed by first cloning the binwalk repository on github and then following the installation instructions.

Note that you may also need to install sasquatch.

  • 1
    I cloned, installed deps, and installed binwalk... Binwalk v2.1.2-00dd062, Do I need to check out a branch? I did not get the same results you did...
    – Roman
    Commented Aug 25, 2019 at 6:56
  • what command did you issue to binwalk?
    – Roman
    Commented Aug 25, 2019 at 6:58
  • @Roman I used the same command as you, -eM, to extract everything at once
    – julian
    Commented Aug 25, 2019 at 6:59
  • Is that the same commit hash as you?
    – Roman
    Commented Aug 25, 2019 at 7:07
  • @Roman Your version is now up to date. If there is still a problem with the squashfs data, try installing sasquatch and unpacking the firmware again
    – julian
    Commented Aug 25, 2019 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.