LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-19-2009, 03:12 AM   #1
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Rep: Reputation: 15
cannot extract initrd.gz


Hi guys I need to extract a initrd.gz so i have searched many forums and they say you first need to gunzip the initrd.gz and then user cpio but the problem I am having is when I try to unzip the initrd.gz
Code:
gunzip initrd.gz
I get this error

Code:
gzip: initrd.gz: not in gzip format

please help
 
Old 01-19-2009, 03:18 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta2 on Lenovo Thinkpad W520
Posts: 6,780

Rep: Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117
Type 'gunzip initrd.gz', not 'gzip initrd.gz'.

Output looks strange anyhow.

Type: 'file initrd.gz' to really know which kind of file it is.

If initrd.gz is really a gzippe'd initrd you can do this
Code:
mkdir newdir
cd newdir
cp /path/to/initrd.gz .
gunzip initrd.gz
su
cpio -i < initrd

Last edited by Didier Spaier; 01-19-2009 at 03:27 AM. Reason: Informations added
 
Old 01-19-2009, 03:25 AM   #3
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Didier Spaier View Post
Type 'gunzip initrd.gz', not 'gzip initrd.gz'.

Output looks strange anyhow.

Type: 'file initrd.gz' to really know which kind of file it is.
i have tried

Code:
gunzip initrd.gz

when i type
Code:
file initrd.gz
this is my output

Code:
initrd.gz: Linux rev 1.0 ext2 filesystem data (mounted or unclean)
 
Old 01-19-2009, 03:30 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta2 on Lenovo Thinkpad W520
Posts: 6,780

Rep: Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117
So I really don't know what this file is. How did you get it ? and what is 'ls -l initrd.gz' output ?
 
Old 01-19-2009, 03:35 AM   #5
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Didier Spaier View Post
So I really don't know what this file is. How did you get it ? and what is 'ls -l initrd.gz' output ?
we build images with novell linux point of sale and i need to edit the initrd because i need to add a new network module for a new type of PC


the put of ls -l is
Code:
-rw-r--r-- 1 root root 33554432 2009-01-19 10:01 initrd.gz
 
Old 01-19-2009, 03:43 AM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta2 on Lenovo Thinkpad W520
Posts: 6,780

Rep: Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117
May be your initrd.gz is corrupted or whatever.

Don't you have the script with which this initrd.gz was made ? You could slightly modify it to add the network module.
 
Old 01-19-2009, 08:05 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
http://wiki.linuxquestions.org/wiki/Initrd
Quote:
Initrd - LQWiki
17 Feb 2007 ...
Type file initrd-file to figure out what it is.
If it says Linux Compressed ROM File System data,
it's cramfs:. mount -t cramfs /dev/loop/0 ...
....
Keyword for Google .. mount loop initrd ..
http://www.google.dk/search?hl=da&q=...S%C3%B8g&meta=
....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create new initrd.gz (or initrd.img) file? kkpal Programming 2 12-10-2007 09:38 AM
initrd? icmp_request Linux From Scratch 3 07-22-2007 02:11 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-02-2007 12:24 AM
Initrd????? rm6990 Linux - Software 5 10-15-2004 04:32 AM
initrd tekbuz Debian 2 08-04-2004 01:34 PM


All times are GMT -5. The time now is 04:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration