Created
May 20, 2018 19:42
-
-
Save grahamc/f6792b0e3b2a96d464454db0481ce4c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```[nix-shell:~/aarch]# gunzip < /var/www/result/c1-large-arm/initrd > initrd.decomp | |
[nix-shell:~/aarch]# file initrd.decomp | |
initrd.decomp: ASCII cpio archive (SVR4 with no CRC) | |
[nix-shell:~/aarch]# binwalk initrd.decomp | grep squashfs | |
20184808 0x133FEE8 ASCII cpio archive (SVR4 with no CRC), file name: "nix-store.squashfs", file name length: "0x00000013", file size: "0x00000038" | |
20185116 0x134001C ASCII cpio archive (SVR4 with no CRC), file name: "nix/store/avli4nwxn5x0fdyyw6ask0qzgr7kpi6r-squashfs.img", file name length: "0x00000038", file size: "0x16ACC000" | |
[nix-shell:~/aarch]# dd if=./initrd.decomp bs=20184808 skip=1 > squash-cpio | |
18+1 records in | |
18+1 records out | |
380421400 bytes (380 MB, 363 MiB) copied, 0.11741 s, 3.2 GB/s | |
[nix-shell:~/aarch]# file squash-cpio | |
second-cpio: ASCII cpio archive (SVR4 with no CRC) | |
[nix-shell:~/aarch]# mkdir extract | |
[nix-shell:~/aarch]# cd extract/ | |
[nix-shell:~/aarch/extract]# cpio -id < ../squash-cpio | |
743010 blocks | |
[nix-shell:~/aarch/extract]# ls | |
nix nix-store.squashfs proc sys | |
[nix-shell:~/aarch/extract]# ls -la nix-store.squashfs | |
lrwxrwxrwx 1 root root 56 May 15 00:15 nix-store.squashfs -> /nix/store/avli4nwxn5x0fdyyw6ask0qzgr7kpi6r-squashfs.img | |
[nix-shell:~/aarch/extract]# file ./nix/store/avli4nwxn5x0fdyyw6ask0qzgr7kpi6r-squashfs.img | |
./nix/store/avli4nwxn5x0fdyyw6ask0qzgr7kpi6r-squashfs.img: Squashfs filesystem, little endian, version 4.0, 380419179 bytes, 81956 inodes, blocksize: 1048576 bytes, created: Mon May 14 13:05:26 2018 | |
[nix-shell:~/aarch/extract]# mkdir extract-squash | |
[nix-shell:~/aarch/extract]# cd extract-squash/ | |
[nix-shell:~/aarch/extract/extract-squash]# unsquashfs ../nix/store/avli4nwxn5x0fdyyw6ask0qzgr7kpi6r-squashfs.img | |
Parallel unsquashfs: Using 8 processors | |
65595 inodes (66101 blocks) to write | |
[==========================================================================================-] 66101/66101 100% | |
created 52496 files | |
created 16363 directories | |
created 13097 symlinks | |
created 0 devices | |
created 0 fifos``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment