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…
Following my experience with OracleVM, I am adding my post-install steps for your pleasure. These steps are not mandatory, by design, but will help you get up and running faster and easier. These steps are relevant to Oracle VM 2.2, but might work for older (and newer) versions as well. Define bonding You should read…
I’ve acquired a new server which is to supply services to a certain group. On most cases, I would have used PREROUTE chain in my IPTABLES on my router for prerouting, based on a rule such as this: iptables -t nat -I PREROUTING -i <external_Interface_name> -p tcp -s <Some_IP_address> –dport 80 -j DNAT –to-destination <New_server_internal_IP>:80…
A disclaimer: I use OEL for server-use when I can. A long support window, an enterprise environment, and yes, a very low rate of changes within the life cycle of the operating system makes it a very good candidate to hold services I do not want to fuss around, correcting configuration files on update or…
I have had a problem with my IBM X41 – ever since I have started using Ubuntu 7.10 (after a nice upgrade from 7.04), whenever the lid was closed, and reopened – the display would have flickered for a short while (while the lid is up) and then blank completely. My (ugly) workaround was to…
Using iptables to achieve poor man’s load balancing for a single server
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…
Following my experience with OracleVM, I am adding my post-install steps for your pleasure. These steps are not mandatory, by design, but will help you get up and running faster and easier. These steps are relevant to Oracle VM 2.2, but might work for older (and newer) versions as well. Define bonding You should read…
I’ve acquired a new server which is to supply services to a certain group. On most cases, I would have used PREROUTE chain in my IPTABLES on my router for prerouting, based on a rule such as this: iptables -t nat -I PREROUTING -i <external_Interface_name> -p tcp -s <Some_IP_address> –dport 80 -j DNAT –to-destination <New_server_internal_IP>:80…
A disclaimer: I use OEL for server-use when I can. A long support window, an enterprise environment, and yes, a very low rate of changes within the life cycle of the operating system makes it a very good candidate to hold services I do not want to fuss around, correcting configuration files on update or…
I have had a problem with my IBM X41 – ever since I have started using Ubuntu 7.10 (after a nice upgrade from 7.04), whenever the lid was closed, and reopened – the display would have flickered for a short while (while the lid is up) and then blank completely. My (ugly) workaround was to…
Using iptables to achieve poor man’s load balancing for a single server
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…
Following my experience with OracleVM, I am adding my post-install steps for your pleasure. These steps are not mandatory, by design, but will help you get up and running faster and easier. These steps are relevant to Oracle VM 2.2, but might work for older (and newer) versions as well. Define bonding You should read…
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!