VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: [SOLVED] Read RootFS  (Read 641 times)

roarde

  • Vectorian
  • ****
  • Posts: 589
  • move the needle
[SOLVED] Read RootFS
« on: November 05, 2014, 01:06:25 pm »

Given an on-disk /boot/vmlinuz-3.x.x, is there a way to look at the files in its RootFS, or at least list them?
« Last Edit: November 07, 2014, 06:31:40 pm by roarde »
Logged
Robert
VL Light RC 1.9

roarde

  • Vectorian
  • ****
  • Posts: 589
  • move the needle
Re: [SOLVED] Read RootFS
« Reply #1 on: November 07, 2014, 06:39:13 pm »

OK, found a script in kernel source's scripts/ directory that decompresses the kernel itself. It does this by looking for the header of the compressed portion, which is found and identified by a few characters, similar to (same as?) "file magic". Starting at that location, the file is tailed through a pipe to the proper decompression program.

I'm sure that, having that decompressed kernel, one could just follow the same process but look for cpio's unique signature. Only added difficulty would be finding the end; or maybe cpio will still output despite trailing "garbage". Haven't checked. Mainly needed a firm idea that it was possible, and looks like it is.

Haven't actually tried this, but for my purposes it's solved.
Logged
Robert
VL Light RC 1.9