Can't gzip initrd.img from PVE7 iso

Kan

Renowned Member
Dec 21, 2016
89
5
73
56
Hello,

I try to add PVE7 to my PXE. I followed a tutorial that worked well for PVE4 to 6.
My problem is that I can't uncompress initrd.img (renamed first as initrd.org.img) from iso with this error :

# gzip -d -S ".img" ./initrd.org.img
gzip: ./initrd.org.img: not in gzip format

I downloaded twice the iso from Proxmox official website in case of corrupted file but no chance.

How can I decompress it please ?
 
Last edited:
the newer kernels are able to decompress initrd images prepared with zstd so the PVE iso switched to using this - try decompress with `zstd -d`

I hope this helps!
 
Thx for the command but it fails then when using cpio command.

# cpio -i -d < ../initrd.org.zst
cpio: Malformed number xxxxxx
(long list of errors like this)
 
Thx for the command but it fails then when using cpio command.

# cpio -i -d < ../initrd.org.zst
cpio: Malformed number xxxxxx
(long list of errors like this)
how did you decompress the image? - this works here:
Code:
zstd -d initrd.img -o initrd.unc
mkdir tmp
cd tmp/
cpio -i -d < ../initrd.unc

also consider checking the `unmkinitramfs` man-page - this might do these things correctly and automatically (if it's in a recent enough version)

I hope this helps!