Karmic 9.10: cannot uncompress initrd.lz
Trying to uncompress initrd.lz with "unlzma -c -S .lz initrd.lz | cpio -id" always fails.
Instead I get the following error message unlzma: Decoder error.
Is this a bug? If not please advice
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu casper Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- gi-minni
- Solved:
- 2009-11-09
- Last query:
- 2009-11-09
- Last reply:
- 2009-11-09
Delan Azabani (azabani) said : | #1 |
First of all, it's "/initrd.gz", not "/initrd.lz". Why are you trying to uncompress this anyway? This is an important system file for linux and is handled internally by the kernel. You shouldn't have a need to touch it.
gi-minni (minniti) said : | #2 |
1) Karmic 9.10 use initrd.lz instead of initrd.gz
2) I need to change some casper init scripts in a live-cd context
gi-minni (minniti) said : | #3 |
I found a solution by myself!
1) Install p7zip-full via synaptic package manager
2) Create a subdirectory to preserve the init subdirectory tree
3) Decompress initrd.lz with "7z e -so ../initrd.lz | cpio -id"
To compress it again go to the init subdirectory and execute:
4) find | cpio -o -H newc > ../newinitrd
5) go up one directory
6) 7z a -m0=lzma:a=1 initrd-mod.lz newinitrd
gi-minni (minniti) said : | #4 |
See comment above
Colin Ian King (colin-king) said : | #5 |
To uncompress and
gunzip < initrd.gz | cpio -i
and then to recompress I'd use:
find . | cpio -o -H newc | gzip -9 > newinitrd.gz
gi-minni (minniti) said : | #6 |
Hi Colin,
thx for your reply. Indeed your statements are right for Jaunty not for Karmic.