LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-14-2006, 11:20 AM   #1
lymae
LQ Newbie
 
Registered: Dec 2006
Distribution: Various LiveCd's, used to be *BSD
Posts: 14

Rep: Reputation: 0
Viewing compressed fs's


Hey

I just want to ask if there's a way to decompress and mount a compressed filesystem as the kernel does after bootload, while already having loaded another distro.

Let's say that I'm already running a LiveDVD Distro *** and I want to view the /boot/initrd.gz in a temporary mount-form so I can take a look at the linuxrc script.

Well, is it a hard one?
 
Old 12-14-2006, 11:31 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You need to know the format of the file

Depending on the type, you can uncpio or mount it as a loop.

So what type is it:
file /boot/initrd.gz
 
Old 12-14-2006, 12:44 PM   #3
lymae
LQ Newbie
 
Registered: Dec 2006
Distribution: Various LiveCd's, used to be *BSD
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nx5000
So what type is it:
file /boot/initrd.gz
This is what I get:

minirt.gz: gzip compressed data, was "miniroot.img", from Unix, last modified: Sun May 14 23:01:35 2006, max compression


I just realized the name was minirt.gz and not inird.gz, but that's not the point now, is it

And BTW, why are they called loop devices? Do you always need them to mount .img or .iso?
 
Old 12-15-2006, 07:08 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Arg sorry
file -z /boot/initrdxxx

Some files are just archive. Others are a complete filesystem so you need to create a loop device or dm to see and modify them (isos can be also seen without mounting but can't be modified)
 
Old 12-15-2006, 04:10 PM   #5
lymae
LQ Newbie
 
Registered: Dec 2006
Distribution: Various LiveCd's, used to be *BSD
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nx5000
Arg sorry
file -z /boot/initrdxxx

Some files are just archive. Others are a complete filesystem so you need to create a loop device or dm to see and modify them (isos can be also seen without mounting but can't be modified)
Thanks for the info
 
Old 12-18-2006, 07:43 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Well, I was about to give you more info if you had given me the result of the command
In case it says cpio archive, you can extract like this:

mkdir /tmp/initrd
cd /tmp/initrd
zcat /boot/initrdxxx | cpio -idv

If its not a cpio archive, then you probably need a loop device. This is explained everywhere on internet.
http://www-128.ibm.com/developerwork.../l-initrd.html

Last edited by nx5000; 12-18-2006 at 07:47 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to migrate NTFS drives to Linux FS's mikepg Fedora 3 10-09-2006 06:49 PM
Compressed andersonfobr Linux - Kernel 1 07-05-2006 12:53 PM
Compressed Albums balayhashi Linux - Software 2 11-10-2005 02:46 PM
compressed printing dreamsshinu Linux - Software 2 12-23-2004 09:51 AM
using compressed kernel blistfix Linux - Newbie 2 08-22-2001 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:39 PM.

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
Open Source Consulting | Domain Registration