sometimes initrd.img is a compressed file (generally gzipped) and
the uncompressed file could be a cpio archive or a (an ext2) filesystem
To find out the type, run this command
if it's a gzipped file, run
Code:
zcat initrd.img > /tmp/initrd.img
then run
Code:
file /tmp/initrd.img
If it's a cpio archive you can extract it with cpio, if it's
an ext2 filesystem you need to mount it (with the option -o loop)
You'll probably to run this as root
1st case, it's a cpio archive, then
Code:
mkdir /tmp/initrd_img
cd /tmp/initrd_img
zcat <path_to_your_initrd.img> | cpio -iumdv
Here, you should repace <path_to_your_initrd.img> by the path to your file
(e.g., if it's in your home directory, it could be ~/initrd.img)
In the second case, you just run (as root) on the uncompressed file
Code:
mkdir -p /mnt/tmp
mount -o loop initrd.img /mnt/tmp