LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 01-16-2009, 07:02 PM   #1
BloodBlight
LQ Newbie
 
Registered: Jul 2008
Posts: 25

Rep: Reputation: 0
Convert a TAR file to an ISO.


This question has been asked before, but Iím not too sure on the answer.

What I have and why I want to do it.

I have a copy of FreeDB and I am looking to convert it into an SQL database. This is being done on a Windows platform, but I do have several Linux systems. I am going to write a program to read all of the files (several million of them), but I estimated that I will need about 80GBs of space to extract a 4.5GB tar file because of the file count & size. This will give my poor Windows server a fit (and make a mess of my FAT table at the same time).

To get around this, I am looking to convert the file to an ISO (another linear file system), and mount the ISO as a drive.

If I am unable to do this, I will try to write in some support for the TAR format and read the file directly. But that takes time, and Iíll have to deal with hard linking... Not something I would look forward to.

I am fairly new to Linux, so an explanation of any commands and piping would also be welcomed with open arms.

Also, will ISO even handle that many files?
 
Old 01-17-2009, 12:47 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
To create an ISO image file, use mkisofs, giving it the name of the output image file, the name of the directory(s) to copy into the image, and options as desired. This will make a decent first cut:
Code:
mkisofs -J -r -o your.iso /name/of/directory/with/your/files/
Naturally, the files in the tarball must first have been extracted to /name/of/directory/with/your/files/.

man mkisofs

--- rod.
 
Old 01-17-2009, 01:19 PM   #3
BloodBlight
LQ Newbie
 
Registered: Jul 2008
Posts: 25

Original Poster
Rep: Reputation: 0
Thanks!

Is there a way to do it without extracting the files from the TAR though? That's the bit I'm trying to avoid.

I'm just thinking out load here, but is there any sort of util that can read though the tar and create a FAT based on what it finds? I ask this because a long time ago I built a CD for a company that had a hybrid partition. One was an ISO format and one was a Mac format (this was a while ago before Mac supported ISO), and both partitions addressed the same locations on the disk (so I could fit about 600MBs rather than 320 & 320).
 
Old 01-17-2009, 04:57 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
By my analysis, no. Since a FAT is really just a list of pointer to places on a disk, I don't see how you can create a FAT without using disk space. You may be able to avoid using double the space by piping the output of tar into mkisofs, but a cursory look at the mkisofs man page doesn't show much promise. This makes sense, since mkisofs takes a whole directory structure rather than a simple linear stream.
My $.02...

--- rod.
 
Old 01-20-2009, 12:40 AM   #5
BloodBlight
LQ Newbie
 
Registered: Jul 2008
Posts: 25

Original Poster
Rep: Reputation: 0
Thanks everyone.

Think I will write a module to handle tar files then. Might post a it here and on sourceforge.

Going to start a thread another thread about it though. Having an issue with the file size being reported incorrectly in the TAR. :/
 
Old 01-20-2009, 12:49 AM   #6
BloodBlight
LQ Newbie
 
Registered: Jul 2008
Posts: 25

Original Poster
Rep: Reputation: 0
Example:

http://img186.imageshack.us/img186/7232/tarerroroc2.jpg

If that doesn't work:
http://img186.imageshack.us/my.php?i...arerroroc2.jpg
 
Old 01-20-2009, 01:02 AM   #7
BloodBlight
LQ Newbie
 
Registered: Jul 2008
Posts: 25

Original Poster
Rep: Reputation: 0
The other thread:
https://www.linuxquestions.org/quest...-file.-698528/
 
  


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
convert an ISO file into an IMG file chris6686 Linux - Newbie 6 12-04-2011 08:11 PM
convert text-file from utf-8 to iso-8859-1 [SOLVED] @ngelot Linux - Server 1 06-12-2007 05:47 AM
How to convert a tar.gz-file to tgz-file ? Knasen Slackware 17 09-05-2006 04:44 AM
convert DVD to ISO file paraiso Linux - Software 7 02-01-2006 01:04 AM
How to convert .deb file to .tar file on redhat? zhu_liheng Linux - Newbie 1 01-15-2004 08:11 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration