How to extract modern Ubuntu initramfs
Just to remember, there is an explanation here, from which the following directive can be taken:
(cpio -id; zcat | cpio -id) < /path/to/initrd.img
There is a very nice script for Windows dealing with attaching XenServer USB disk to a guest. It can be found here. This script has several problems, as I see it. The first – this is a Windows batch script, which is a very limited language, and it can handle only a single VDI disk…
I have been struggling with RH Cluster 4 with VMware fencing device. This was also a good experiance with qdiskd, the Disk Quorum directive and utilization. I have several conclusions out of this experience. First, the configuration, as is: <?xml version=”1.0″?> <cluster alias=”alpha_cluster” config_version=”17″ name=”alpha_cluster”> <quorumd interval=”1″ label=”Qdisk1″ min_score=”3″ tko=”10″ votes=”3″> <heuristic interval=”2″ program=”ping vm-server…
Took two steps: openssl x509 -in input.crt -out input.der -outform DER openssl x509 -in input.der -inform DER -out output.pem -outform PEM Related posts: USB Auto mapping to Windows VM under KVM does not work IPSec VPN for mobile devices on Linux Powered by YARPP.
YUM is a nice (and useful, when used correctly) tool to manage packages, using RPM as its engine. APT, the Debian alternative, has this ability, and so does YUM. YUM does not pin a specific version of a package, but rather avoids upgrading it as soon as it was marked. It remains installed, but never…
Every Linux admin is familiar with the long time running through a large directory tree (with hundred of thousands of files and more) can take. Most are aware that if you re-run the same run-through, it will be shorter. This is caused by a short-valid filesystem cache, where the memory is allocated to other tasks,…
I was required to create a self-contained, single DVD to automate the installation of Solaris 10 on x86_64. I could not find any up-to-date straight forward guide which can explain how to do it, so I do it here. This is not an explanation for dummies, so you must know (to some degree, of course)…
This site uses Akismet to reduce spam. Learn how your comment data is processed.
I am working on Lubuntu 22.04, and either the lubuntu team creates the ramdisk differently, or the command is now out of date.
This works for me:
(cpio -id; cpio -id; zstdcat | cpio -id) < /path/to/initrd.img The ramdisk I am working with now has 2x uncompressed CPIO archives, prepending a "Z Standard" compressed main ramdisk.
They can modify it, however – how? Can you run the command ‘file’ on the initrd file? Or ‘lsinitrd’? It will give you a lot of details and insights.
In any case, on Ubuntu 22.0.4 my command works, and there is no reason to assume that this mechanism has changed. Just to be clear – your command failed on my test with the following output:
cpio: Malformed number
and
cpio: premature end of archive
Hi etzion, while I was initially confused by your response, I think I understand where the difference comes from. With my initrd I have 3 CPIO archives, the first 2 being microcode for AMD and Intel CPUs respectively – they each have their own CPIO archive. Then the third archive is the main initial ramdisk, encrypted Z standard encryption.
My ramdisk comes from the Lubuntu ISO. It is the ramdisk used to load the live environment. I assume the ramdisk you are using is for Ubuntu, installed on your computer? It would make sense to me that they would drop one of the first two microcode ramdisks, depending on what is applicable to the machine’s processor.
Thanks for your response, by the way you have some great info on your website. Thanks for what you do!
I understand. You were using the special LiveCD initrd. On systems which are on-disk, the initrd is created per the hardware configuration and layout of the system. Your note is good and important – and it exposes a structure including both microcodes as the same time, for both types of CPUs. When the system is installed on disk, it will integrate only the CPIO image for the relevant microcode. Makes a lot of sense.
I really appreciate the feedback. I have been collecting and sharing (and using it as an extended memory) for a long while. Some of it is still relevant even today 🙂
Thanks!