The officially official Devuan Forum!

You are not logged in.

#1 2020-03-30 03:21:43

aus9
Member
Registered: 2020-03-24
Posts: 37  

[SOLVED]How do I unpack our intrd.img

Hi

I want to do some exploring of our initrd.img

I found a simple command that appeared to work but it only unpacks microcode

eg  all commands done as root

cp /boot/initrd.img-4.19.0-8-amd64 /tmp
cd /tmp
cpio -i -F initrd.img*
ls -al (culling older timestamps) 
kernel 

and the kernel has sub dirs to lead to your amd or intel or both microcodes.

I am aware that we have a file as follows

file initrd.img-4.19.0-8-amd64 
initrd.img-4.19.0-8-amd64: ASCII cpio archive (SVR4 with no CRC)

I found a hit after changing my search to ask why I could only see a kernel  got this
https://unix.stackexchange.com/question … ely-kernel

new root commands

mkdir /tmp/unpack
cp /boot/initrd.img-4.19.0-8-amd64 /tmp/unpack
cd /tmp/unpack
(cpio -id; zcat | cpio -id) < initrd.img-4.19.0-8-amd64

ls
bin  conf  cryptroot  etc  init  initrd.img-4.19.0-8-amd64  kernel  lib  lib64	run  sbin  scripts  usr

Last edited by aus9 (2020-03-30 06:28:41)

Offline

#2 2020-04-21 17:59:49

dgrif
Member
From: Colorado USA
Registered: 2020-02-05
Posts: 3  

Re: [SOLVED]How do I unpack our intrd.img

Almost easier is to use the programs found in the package "initramfs-tools-core". In particular lsinitramfs and unmkinitramfs work really well for me. I build a custom kernel and initramfs to have a router system that runs completely within memory once booted, no disk or usb stick
access.

Offline

#3 2020-04-22 01:41:34

aus9
Member
Registered: 2020-03-24
Posts: 37  

Re: [SOLVED]How do I unpack our intrd.img

Thanks will check out later

Offline

Board footer