Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-02-2009, 04:15 PM   #1
LQ Newbie
Registered: Dec 2008
Posts: 18

Rep: Reputation: 0
Problem decompressing block/char devices

Hi, I have a compressed .tgz file, say sample.tgz, which contains the block/char devices which are under /dev folder.
If I do "gunzip -c sample.tgz | tar xvf -", all the files and block/char devices are displayed in the console but the block/char devices are not copied/created under the working directory.

For creating the .tgz file, I used the following steps:
1. tar cvf sample.tar *
2. gzip -c sample.tar >> sample.tgz

Any help?

Thanks in Advance,
Old 02-04-2009, 01:38 AM   #2
LQ Newbie
Registered: Apr 2008
Posts: 28

Rep: Reputation: 16
device files are not physical objects thay are more like an idea, u cant copy them thay have to be made.
Old 02-04-2009, 12:59 PM   #3
LQ Newbie
Registered: Dec 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks. Currenty I am creating these devices manually. Any idea copying/compressing those char/block devices.

Old 02-04-2009, 03:24 PM   #4
Registered: Aug 2004
Location: Palo Alto, CA
Distribution: Fedora 8/9, Ubuntu
Posts: 50

Rep: Reputation: 18
What do you mean "compress char/block devices"?

Why do you want to do this?

Entries (inodes) under /dev do not represent files. There is no data associated with them. tar records data for files.

The /dev inode entry contains two pieces of information: a major device number and a minor device number. In general, the major device number tells the kernel what kind of a device it is, say, disk, printer, or tty. The kernel uses this to select the driver for that device. The minor device number tells the driver which individual device of this type the inode refers to.

I believe that cpio will record the inode info, even if there is no data.
Old 02-04-2009, 08:50 PM   #5
LQ Newbie
Registered: Dec 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Hi Eager,

Actually I am creating a Live CD and I am able to boot from the CD. Now it is the time build the root file system for the target. I have created all the required directories (/bin, /sbin, /etc, /dev, /usr, /lib and etc) and copied all the requried files under each dirs. I am trying to compress these folders and decompress under /dev/hda. ( Is it the right way? ) When I do the "lilo -r /disk" (disk is the mount point for /dev/hda), I am getting error message as the /dev/hda is not available. Anyway, now am creating the nodes manually and installing the linux.

Is there anyway to automate creating the nodes?



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
Problem decompressing kernel galapogos Linux - Kernel 8 01-21-2009 08:31 PM
I think that is problem with convertin char to const char* shifter Programming 8 10-04-2008 07:00 AM
Problem on decompressing files satimis Fedora 2 08-23-2006 11:33 AM
what is the different btw raw devices and block devices yenonn Linux - General 2 02-10-2006 10:34 PM
Problem decompressing large archive JohnKFT Slackware 8 10-14-2005 07:06 PM > Forums > Linux Forums > Linux - Software

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

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