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

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

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

Post 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

Last edited by Jasper on Sat Jun 17, 2023 10:09 am, edited 1 time in total.
User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

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

Post 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.

Attachments
Edit-Initrdgz-1.4.pet
(6.73 KiB) Downloaded 31 times
User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

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

Post 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

User avatar
mikewalsh
Moderator
Posts: 6156
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 793 times
Been thanked: 1979 times

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

Post 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. ;)

Attachments
0_pupbuild_tools_2.tar.gz
Utility suite for working with ISOs and the initrd.gz...
(3.93 KiB) Downloaded 41 times
User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

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

Post by Jasper »

@mikewalsh

Thank you very much as always :thumbup2:

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

one
Posts: 244
Joined: Sun Jul 12, 2020 7:53 am
Has thanked: 16 times
Been thanked: 59 times

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

Post by one »

Hi @Jasper,

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

peace

Attachments
Edit-Initrdgz-1.5.pet
(11.29 KiB) Downloaded 39 times
User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

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

Post 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.

User avatar
rockedge
Site Admin
Posts: 6539
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2748 times
Been thanked: 2620 times
Contact:

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

Post 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

Attachments
modify_initrd_gz.sh.gz
Remove the Fake "gz"
(1.72 KiB) Downloaded 31 times
User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

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

Post 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.

Post Reply

Return to “Users”