Page 1 of 1

Edit and repacking the Initrd file/directory ?? [Solved]

Posted: Sat Jun 17, 2023 8:19 am
by Jasper

Hi there

I was wondering if it is possible to edit this directory and change the components?

I have added some updates but cannot figure how to repack it.

Gzip works with single files ............ Tar & Gzip in combination will work with a directory.

However, the original Initrd is a directory just packed as a *.gz file.

If someone would be kind enough to point me in the right direction, I would be appreciative :thumbup:

**EDIT**

I realised if I clicked on the file it would give me an option to extract the directory ............ added my new components and clicking on it again, repacked it automatically.

Rebooted with the new file and got a what I found was a hilarious message informing me that the Initrd file was "tainted" :lol: but it did give me a suggestion/alternative.

Not as easy as I thought hahahahha

Back to the drawing board and testing a binary at a time :D


Re: Edit and repacking the Initrd file/directory ??

Posted: Sat Jun 17, 2023 9:04 am
by amethyst

I use this, works well. Attached .pet. Don't know about components, my initrd.gz generally just contains scripts which can be edited but I suppose if you have "components/files" included too it may still be possible to add it before the last step of repacking it.


Re: Edit and repacking the Initrd file/directory ??

Posted: Sat Jun 17, 2023 10:08 am
by Jasper

@amethyst

Thanks for sharing :thumbup:

The contents of the file attached. I had planned to update a few of the component binaries in the BIN directory.

Trial and error in this endeavour :D


Re: Edit and repacking the Initrd file/directory ?? [Solved]

Posted: Sat Jun 17, 2023 11:34 am
by mikewalsh

@Jasper :-

You might find these useful.

It's a set of tools jrb developed several years ago, specifically for use when working on ISOs and the initrd.gz. They're no longer available from the link on the old forum, but I downloaded them a while back - before the link died - and have used them myself for a few years.

They still work as well today as they ever did. Make sure to read the "ReadMe" inside when you first unpack them!

Mike. ;)


Re: Edit and repacking the Initrd file/directory ?? [Solved]

Posted: Sat Jun 17, 2023 11:44 am
by Jasper

@mikewalsh

Thank you very much as always :thumbup2:

Watching the Ashes atm .... so will play around with this later on today :thumbup:


Re: Edit and repacking the Initrd file/directory ?? [Solved]

Posted: Sat Jun 17, 2023 11:50 am
by one

Hi @Jasper,

there is also a newer version of edit-initrdgz.pet available - credit to @taersh (LazY Puppy).

peace


Re: Edit and repacking the Initrd file/directory ?? [Solved]

Posted: Sun Jun 18, 2023 8:00 am
by Jasper

@one

Thanks for sharing this :thumbup:

I have tried the application using FP64Low but they appear to lock up the system. Will try again on FP64-95.


Re: Edit and repacking the Initrd file/directory ?? [Solved]

Posted: Sun Jun 18, 2023 7:27 pm
by rockedge

From @wiak this should work as well to decompress and edit the initrd.gz then compress it again.

Usage: ./modify_initrd_gz.sh initrd.gz


Re: Edit and repacking the Initrd file/directory ?? [Solved]

Posted: Mon Jun 19, 2023 5:35 pm
by Jasper

@rockedge thanks for this :thumbup2: && @wiak

Apologises for the late reply ....... sport on TV and it's summer ..... plus been messing around with some other projects.

I got it working and replaced some binaries contained within.

Image

Unfortunately, upon reboot it complained of being "tainted" and failed to progress further.