Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 06 Jul 2015, 03:05
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Editing the initrd
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
LazY Puppy


Joined: 21 Nov 2014
Posts: 519
Location: Germany

PostPosted: 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.
Edit-Initrdgz-1.5.pet
Description  Unpack and repack the files initrd, initrd.gz and initrd.xz
pet

 Download 
Filename  Edit-Initrdgz-1.5.pet 
Filesize  11.29 KB 
Downloaded  119 Time(s) 

_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!

Last edited by LazY Puppy on Thu 15 Jan 2015, 11:15; edited 1 time in total
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 519
Location: Germany

PostPosted: 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
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
Dry Falls

Joined: 16 Dec 2014
Posts: 181
Location: Upper Columbia

PostPosted: 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
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 644

PostPosted: 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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

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
[ Time: 0.0597s ][ Queries: 12 (0.0104s) ][ GZIP on ]