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
When I’ve created my setup (displayed below), I took into account the possibility of disconnection, or process fall, and I’ve left pppd to deal with it, by trying to connect just as it has fallen down. It was a good solution for the scenarios where there is a temporary, short timed disconnection. It fails to…
I was surprised at how easy it was. You need to do the following: 1. Find your mouse’s address using ‘hcitool scan‘ 2. Verify that you can pair the two devices using ‘sudo hidd –connect XX:XX:XX:XX:XX:XX‘ 3. Edit /etc/default/bluetooth, uncomment the additional line with the HIDD_OPTIONS and set it to be “–connect XX:XX:XX:XX:XX:XX –server” 4….
It’s been a long while since I’ve written. I get to have, once a while, a period of time dedicated for laziness. I’ve had just one of these for the last few weeks, in which I’ve been almost completely idle. Usually, waking up from such idle time is a time dedicated to self studies and…
IPTables can be tricky. The concept of chains pointing to chains pointing to chains can get complicated. However, understanding the initial flow, the initial “which chain points where”, and the general concept which can allow, later, for easier NAT, or DNAT, or even knowing where to put a single rule is important. Especially if you…
Recently, bonding module requires IPv6 module. There are two possible solutions. The first is to define zeroconf to off, by adding the following line to /etc/sysconfig/network : NOZEROCONF=yes The other method, which actually disables IPv6 is to insert into /etc/modprobe.conf the following line: options ipv6 disable=1 That should do the trick. You will need to…
A while ago, a newer version of Cacti became available through Dag’s RPM repository. An upgrade went without any special events, and was nothing to write home about. A failure in one of my customer’s Cacti system lead me to test the system using “spine” – the “cactid” new generation. I felt as if it…
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!