Hi Igor.
I started to notice that 7z fails opening certain initrd files (tested from 9.34 to 15.14)
It fails in a weird way; it does not crash; it opens the file but it shows only one directory containing just a tiny fraction of the real payload.
i.e. from https://www.kali.org/downloads/
kali-linux-light-2016.1-amd64.iso
kali-linux-2016.1-amd64.iso
etc.
in those ISOs the file /live/initrd.img of 36 MBs opens showing only a "kernel" directory containing 12KB; where is the rest of the cpio file?
I have been noticed this issue with other distros too.
In the example Kali is a derivative from Debian but 7z opens i.e. debian-live-8.3.0-amd64-cinnamon-desktop.iso /live/initrd.img file w/o this problem...
Thanks for looking into this.
Last edit: foxpat 2016-02-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Igor,
I'm using the GUI version; I always open the initrd with 7z, first I see one file (the cpio) and clicking over this initial file I get the cpio expanded within the 7z screen; at this point I can see the whole content of the initrd.
With the files I've mentioned before 7z just shows one directory; it is like it never sees a cpio;
Trust me; I have been using 7z cpio capabilities for years when opening initrd files; there's something going on here... please when you have a minute take a look at it;
Sometimes default parser mode is not good.
For example, if some archive is broken, and 7-Zip opens it in parser mode, some user can think that everything is OK, but actually archive is not good.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I shouldn't press any additional thing;
The user is working, opens a file in normal mode, he should be warned that there is additional hidden stuff. If not for every initrd the user opens he has to check if there is additional stuff or not... not cool.
I agree it is not urgent, I'm very happy I'm able to see the content of these weird initrd files but probably you can think of this on a future version.
Thanks Igor.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are many cases when there is some additional data after archive data.
And there are many reports here at forum and bug reports, that users don't like that 7-Zip shows these warnings. Most of another programs just ignore that additional data.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sure; not a warning on a dialog box OK;
I meant turning on a red dot on the GUI somewhere... something not disturbing much but
we should have an alternative to re-open on parser mode every suspicious initrd...
BTW do you know how are these initrd produced? the classic CPIO|GZ approch never gives this crazy stuff right?...
Last edit: foxpat 2016-02-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Igor.
I started to notice that 7z fails opening certain initrd files (tested from 9.34 to 15.14)
It fails in a weird way; it does not crash; it opens the file but it shows only one directory containing just a tiny fraction of the real payload.
i.e. from https://www.kali.org/downloads/
kali-linux-light-2016.1-amd64.iso
kali-linux-2016.1-amd64.iso
etc.
in those ISOs the file /live/initrd.img of 36 MBs opens showing only a "kernel" directory containing 12KB; where is the rest of the cpio file?
I have been noticed this issue with other distros too.
In the example Kali is a derivative from Debian but 7z opens i.e. debian-live-8.3.0-amd64-cinnamon-desktop.iso /live/initrd.img file w/o this problem...
Thanks for looking into this.
Last edit: foxpat 2016-02-14
initrd.img is concatenation of cpio and gz files.
You can unpack initrd.img in 'parser mode'.
Then you can unpack gz and cpio inside gz.
Igor,
I'm using the GUI version; I always open the initrd with 7z, first I see one file (the cpio) and clicking over this initial file I get the cpio expanded within the 7z screen; at this point I can see the whole content of the initrd.
With the files I've mentioned before 7z just shows one directory; it is like it never sees a cpio;
Trust me; I have been using 7z cpio capabilities for years when opening initrd files; there's something going on here... please when you have a minute take a look at it;
I've uploaded one of the problematic initrd for you (33MB)
https://ppp52.sharefile.com/d-s5b04b03c798429d8
Go to 7-zip.org
And type "parser mode 2016" in search box.
OMG... sometimes understanding you is harder than reading your code ;-)
I've used Open archive -> # (OK now I can see everything.)
Could you please tell me why this is not the default mode for opening a file??
I want to open a file seeing everything is in it...
Thanks Igor.
Sometimes default parser mode is not good.
For example, if some archive is broken, and 7-Zip opens it in parser mode, some user can think that everything is OK, but actually archive is not good.
OK I understand,
there's not any way to inform the user that there's additional stuff on a file that was open in "regular" mode?
Thanks Igor.
If you call "test" or "extract" command for that img file, you will see the warning.
Also you can see the warning, if you open that archive, and press "Info" button.
I shouldn't press any additional thing;
The user is working, opens a file in normal mode, he should be warned that there is additional hidden stuff. If not for every initrd the user opens he has to check if there is additional stuff or not... not cool.
I agree it is not urgent, I'm very happy I'm able to see the content of these weird initrd files but probably you can think of this on a future version.
Thanks Igor.
There are many cases when there is some additional data after archive data.
And there are many reports here at forum and bug reports, that users don't like that 7-Zip shows these warnings. Most of another programs just ignore that additional data.
Sure; not a warning on a dialog box OK;
I meant turning on a red dot on the GUI somewhere... something not disturbing much but
we should have an alternative to re-open on parser mode every suspicious initrd...
BTW do you know how are these initrd produced? the classic CPIO|GZ approch never gives this crazy stuff right?...
Last edit: foxpat 2016-02-15