The time now is Thu 28 Jan 2021, 07:17
All times are UTC - 4 |
Author |
Message |
LazY Puppy

Joined: 21 Nov 2014 Posts: 2007 Location: Germany
|
Posted: Wed 14 Jan 2015, 18:15 Post subject:
Editing the initrd Subject description: Unpack and repack the files initrd, initrd.gz and initrd.xz |
|
Hi.
This Program is a new improved version of Edit-Initrdgz-1.4.pet including its right-click version, Edit-Initrdgz-rtc-0.3.pet.
I have combined them and updated this for the use of initrd.xz (like in Lighthouse64) and for the use of initrd (like in FatDog64). Both, GUI and right-click Action, are now able to unpack and repack the files initrd, initrd.gz and initrd.xz.
Edit-Initrdgz-1.4.pet has been downloaded 994 Times and Edit-Initrdgz-rtc-0.3.pet has been downloaded 453 Times by now. Looks like these have been very useful Tools in the past.
Since I'm owning now a 64 bit machine, I'm currently testing some of the available 64 bit Puppies and trying to do some work on these. For this to do I've had needed first a tool to unpack and repack the different types of the initrd file.
So here it is: Edit-Initrdgz-1.5.pet
The initrd file will be expanded to /root/Init_rd_tmp.
 |
Description |
Unpack and repack the files initrd, initrd.gz and initrd.xz
|

Download |
Filename |
Edit-Initrdgz-1.5.pet |
Filesize |
11.29 KB |
Downloaded |
746 Time(s) |
_________________ RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0)
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! 
Last edited by LazY Puppy on Thu 15 Jan 2015, 11:15; edited 1 time in total
|
Back to top
|
|
 |
LazY Puppy

Joined: 21 Nov 2014 Posts: 2007 Location: Germany
|
Posted: Thu 15 Jan 2015, 11:12 Post subject:
|
|
stemsee wrote: | @LazyPuppY
initrd.img? DebianDog also initrd1.img .xz.gz |
He wrote this in the FatDog Topic, which I won't hijack, so I put this here.
There is also initrd.lzo, used by rufwoof and probably some more. I'm willing to extend and to update this again, but I need code examples of how to pack and unpack:
- .xz.gz
- .img
- .lzo
Just post some code examples for it and I will include it into the next version of Edit-Initrdgz package.
_________________ RSH
"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0)
No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! 
|
Back to top
|
|
 |
Dry Falls
Joined: 16 Dec 2014 Posts: 616 Location: Upper Columbia
|
Posted: Fri 16 Jan 2015, 03:27 Post subject:
initrd-edit |
|
There's also this within the initrd.xz and on Lighthouse development tools:
Quote: | http://www.murga-linux.com/puppy/viewtopic.php?p=242509&sid=b4115deab479577bad71a7c91bd84060
Initrd.gz isn't actually a compressed filesystem anymore (definitely since 3.00, possibly since 2.17). It's now a compressed cpio archive. To extract it, do something like this:
[Updated 110922] Lighthouse 64 5.13+ uses xz to compress instead of gzip:
Code: |
mkdir initrd-tree; cd initrd-tree/; xzcat ../initrd.xz | cpio -d -i -m |
That assumes you're using a terminal in the same place as the initrd.xz file.
It dumps the innards into a directory named initrd-tree/ in that location.
To put it back together, run these from inside that initrd-tree/ directory:
Code: | mv ../initrd.xz ../initrd.xz.`date +"%Y.%m.%d_%T" | ` # to save prior version
Code: | find . | cpio -o -H newc | xz --check=crc32 --x86 --lzma2=dict=512KiB > ../initrd.xz |
|
ps, I really liked LazyPuppy -- my second pup after lupu5.28 and a great learning tool. Thanks.
df
|
Back to top
|
|
 |
rufwoof

Joined: 24 Feb 2014 Posts: 3725
|
Posted: Fri 16 Jan 2015, 05:10 Post subject:
|
|
It's similar to unpack a lzo
mkdir initrd-tree
cd initrd-tree
lzopcat ../initrd.lzo | cpio -id
to repack
find | cpio -o -H newc | lzop -c1 >../initrd.lzo.new
(assuming level 1 compression, which I find to be about the best all-rounder. Not so tight on fast (level 1) compression, but still decent (around 20% larger than gzip). But (much) quicker on decompression speed - typically > x2 faster. i.e. would you rather have one person with 10 boxes to open that averages 10 seconds per box, or another person with 12 boxes to open that averages less than 5 seconds per box).
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|