1

I have a very large bz2 file which I want to convert to a ISO image. Are there any good open source/free programs that can do this WITHOUT having to extract it first?

EDIT: When I mean "without having to extract it first", I mean not having to extract the entire archive to my hard drive and then convert it to ISO.

closed as off-topic by music2myear, n8te, DrMoishe Pippik, Seth, fixer1234 Apr 13 '18 at 0:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – music2myear, n8te, DrMoishe Pippik, Seth, fixer1234
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Do you want to put the bz2 file onto a CD/DVD zipped or unzipped? – Pekka 웃 Dec 31 '09 at 17:32
  • No, what I want to do is create a ISO containing the bz2 archive unzipped (i.e. the contents in the ISO) and then mount the ISO in a Virtual Machine – Kryten Dec 31 '09 at 17:34
  • Ah. Well if you're on Linux, you might be able to put something together with bzip piping its output to a tool that can create an ISO from user input. You could try and check ISO generator tools for what kind of input they accept. – Pekka 웃 Dec 31 '09 at 17:43
  • Anything like that for Windows? – Kryten Dec 31 '09 at 17:49
  • @Alistair: Cygwin provides a unix environment for windows. cygwin.com ... tools like bzip2 and tar and mkisofs/genisofs are available in the package manager. – quack quixote Jan 2 '10 at 1:06
5

When I mean "without having to extract it first", I mean not having to extract the entire archive to my hard drive and then convert it to ISO.

The bad news: you will have to extract it.

The good news: you don't have to extract it to your hard drive, you can do it all by piping to stdin, so it all happens in memory (which is basically what converting would do).

You'll need mkisofs and bzcat (or bzip2 -dc), both can be installed with cygwin. Then it's just a matter of:

bzcat file.bz2 | mkisofs -o image.iso -stream-media-size #

where file.bz2 is your archive and # is the media size in sectors.

If your archive is actually a bzipped TAR archive, something like this would be more appropriate:

tar --to-stdout xjf file.tar.bz2 | mkisofs -o image.iso -stream-media-size #
  • 1
    +1 thanks for dropping a good example of mkisofs. i was a bit slammed earlier and couldn't get to it. – quack quixote Dec 31 '09 at 21:13
2

No!

They are packaged inside a bz2 file therefore part of the conversion process would be to extract.

  • When I mean "without having to extract it first", I mean not having to extract the entire archive to my hard drive and then convert it to ISO. – Kryten Dec 31 '09 at 17:35
  • technically they're packaged inside a TAR file (or other archive format), which is then BZipped. bzip2 doesn't archive files, it's just a stream compression format. – quack quixote Jan 1 '10 at 5:22
0

You're using the wrong verb. You convert between formats with similar purposes. You could convert BZ2 into GZip; you could convert TAR.BZ2 into ZIP or RAR or 7Z. ISO is a filesystem image, so you need a tool that will create that for you.

In this case, you have a BZ2 file and you want an ISO containing that BZ2 file. (Or else you want an ISO containing the file that the BZ2 image contains; it's all dependent on what you want.)

ISO images happen to be the same filesystem that's burned to CDs and DVDs, so almost any CD creator software can make an ISO. (Look for the option to "Save image to drive" when you're ready to burn the files. Don't let Nero make an NRG file for you; it's not the same thing.)

In particular, I recommend:

  • the mkisofs or genisofs Unix tools for command-line use or scripting;

  • ImgBurn, MagicISO, or any of several other popular ISO image creators

Not the answer you're looking for? Browse other questions tagged or ask your own question.