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
Introduction Since Oracle GI version 11.2.0.3, Oracle have provided a clustered file-system called ACFS, based on the underlined technology Oracle ASM. This technology has provided a reliable-enough, although not free from bugs, clustered file-system, while Oracle OCFS2 (which had its own cluster framework: O2CB) has been abandoned and left to die. ACFS was a good-enough…
Using the same installation server as before, my laptop, I was able to install Linux Centos 4.3, with the addition of HP’s drivers for Adaptec SATA raid controller, on my new HP ML110 G3. Using just the same method as before, when I’ve installed Centos 4.3 on IBM x306, but with HP drivers, I was…
I encountered an interesting bug/feature of RHCS on RHEL4. A snip of my configuration looks like this: <resources> <fs device=”/dev/mapper/mpath6p1″ force_fsck=”1″ force_umount=”1″ fstype=”ext3″ name=”share_prd” mountpint=”/share_prd” options=”” self_fence=”0″ fsid=”02001″/> <nfsexport name=”nfs export4″/> <nfsclient name=”all ro” target=”192.168.0.0/255.255.255.0″ options=”ro,no_root_sqush,sync”/> <nfsclient name=”app1″ target=”app1″ options=”rw,no_root_squash,sync”/> </resources> <service autostart=”1″ domain=”prd” name=”prd” nfslock=”1″> <fs ref=”share_prd”> <nfsexport ref=”nfs export 4″> <nfsclient ref=”all ro”/>…
Recently, with the release of a new 8.x version of Dell SrvAdmin tools, the Centos/RHEL5 (and XenServer, by the way) repositories disappeared. It appears that Dell will not support the RHEL5.x brands anymore. The proper solution is to install the last 7 SrvAdmin tools, as can be shown in this site. This solves the problem…
I was required to auto map a USB DoK to a KVM VM (specific VM, mind you!), as a result of connecting this device to the host. I’ve looked it up on the Internet, and the closest I could get there was this link. It was almost a complete solution, but it had a few…
Weird behavior of my Orinoco_pci wireless network interface. On my home 802.11b network, I get performance of about 600KB/s, instead of 1.1MB/s, which should be the approximate speed to expect to. Not only that, but browsing to external websites and the likes (I compare using wget), I get speeds of <7KB/s, and sometimes decreasing to…
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!