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’ve been using DBMail as my own personal mail server for a long while now. I’ve known the software ever since it’s 1.x release, and been using it for its great benefits – Quick and accessible large IMAP folders (and I have over 60,000 items in there). DBMail is a filtering backend for server based…
This is not a simple task, as there are few things which should actually happen for it to work. First – the switch port should support vlan tagging (of course, right?) I have used vlan2 for “external” network, and vlan3 for “internal” network. My configuration looks like this: ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes ISALIAS=no…
This is a very technical and a limited solution to Cisco AnyConnect issue with unknown certificate on Linux (Ubuntu 22.04). AnyConnect version is 4.10. I hope this post will help others with a similar problem. The issue is around SAML authentication (an embedded web browser attempting to complete the authentication process), and its failure to…
Well, tricks is not the right word to describe advanced shell scripting usage, however, it does make some sense. These two topics are relevant to Bash version 4.0 and above, which is common for all modern-enough Linux distributions. Yours probably. These ‘tricks’ are for advanced Bash scripting, and will assume you know how to handle…
Installing VirtualBox on Ubuntu 18 (same as for modern Fedora Core) with SecureBoot will result in the following error when running the command /sbin/vboxsetup The error message would be something like this: There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root. If your system is using EFI Secure Boot…
Let’s say you have old shelves of either EMC or NetApp with SAS or SATA disks in them. And let’s say you want to connect them via FC to a Linux machine and have some nice ZFS machine/cluster, or whatever else. There are few things to know, and to attend in order for it 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!