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. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-02-2009, 04:15 PM
|
#1
|
LQ Newbie
Registered: Dec 2008
Posts: 18
Rep:
|
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,
Chris
|
|
|
02-04-2009, 01:38 AM
|
#2
|
LQ Newbie
Registered: Apr 2008
Posts: 28
Rep:
|
device files are not physical objects thay are more like an idea, u cant copy them thay have to be made.
|
|
|
02-04-2009, 12:59 PM
|
#3
|
LQ Newbie
Registered: Dec 2008
Posts: 18
Original Poster
Rep:
|
Thanks. Currenty I am creating these devices manually. Any idea copying/compressing those char/block devices.
Thanks
Chris
|
|
|
02-04-2009, 03:24 PM
|
#4
|
Member
Registered: Aug 2004
Location: Palo Alto, CA
Distribution: Fedora 8/9, Ubuntu
Posts: 50
Rep:
|
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.
|
|
|
02-04-2009, 08:50 PM
|
#5
|
LQ Newbie
Registered: Dec 2008
Posts: 18
Original Poster
Rep:
|
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?
Thanks
Chris
|
|
|
All times are GMT -5. The time now is 11:28 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|