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
I have described in this post how to setup RHCS (Redhat Cluster Suite) for ZFS services, however – this is rather outdated, and would work with RHEL/Centos version 6, but not version 7. RHEL/Centos 7 use Pacemaker as a cluster infrastructure, and it behaves, and configures, entirely differently. This is something I’ve done several times,…
The simple scripts in /etc/xen/scripts which manage networking are fine for most usages, however, when your server is using bonding together with VLAN tagging (802.11q) you should consider an alternative. A PDF document written by Mark Nielsen, GPS Senior Consultant, Red Hat, Inc (I lost the original link, sorry) named “BOND/VLAN/Xen Network Configuration” as a…
This is a rather common knowledge now that on RHEL4 you need to state inside /etc/modprobe.conf the following line, when you want more than one bonding interfaces: options bonding max_bonds=2 Then you attempt to use a trick to address different bonding devices with their name (aka, bond0 and bond1, and maybe bond2, etc), using an…
As an administrator, I am responsible for many setups and configurations, sometimes hand tailored to supply an answer to a set of given demands. As a human, I err, and the common method of verifying that you have avoided error is by answering this simple rule: “Does it work after these changes?” In the world…
I am working on an article which will describe the procedures required to extend LUN on Linux storage clients, with and without use of multipath (device-mapper-multipath) and with and without partitioning (I tend to partition storage disks, even when this is not exactly required). Also – it will deal with migration from MBR to GPT…
I’ve been using a WordPress Docker for some time now. My Docker is invoked through the docker-compose toolset, and it generally functions well. However, at times, specific configurations are needed. For instance, when adjusting the PHP file size limitation or adding mod_headers to address CORS issues on WordPress. The key is to override the Docker…
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!