Mkisofs: How to create an empty ISO9660 image

Mkisofs: How to create an empty ISO9660 image

Post by Otto Wy » Sat, 02 Sep 2000 06:21:19


I've gone twice through mkisofs its help but still haven't checked how
to create an empty 650MB ISO image possibly with Joliet and RockRidge
extensions. I'd like to mount this image through the loop device.

O. Wyss

 
 
 

Mkisofs: How to create an empty ISO9660 image

Post by John E. Garrott S » Sat, 02 Sep 2000 06:28:25



> I've gone twice through mkisofs its help but still haven't checked how
> to create an empty 650MB ISO image possibly with Joliet and RockRidge
> extensions. I'd like to mount this image through the loop device.

> O. Wyss

From the CD-Writing-HOWTO,

        mkisofs -r -o cd_image private_collection

where cd_image will be your iso9660 file and
private_collection is the directory you are
copying.

Then to see it,
mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom

where cd_image is the file above, and /cdrom is
your mounting directory.  Of course you may supply
another empty directory in place of /cdrom.

Sometimes it takes an example to make it all clear.

Good luck,

John

 
 
 

Mkisofs: How to create an empty ISO9660 image

Post by Dave Bro » Sat, 02 Sep 2000 09:15:30



>I've gone twice through mkisofs its help but still haven't checked how
>to create an empty 650MB ISO image possibly with Joliet and RockRidge
>extensions. I'd like to mount this image through the loop device.

>O. Wyss

I presume the problem is that if you do a mksiofs of an empty directory,
the image you get is quite small.  Then if you mount it, the loop device
doesn't allow the size to increase...  I don't remember if this is the
case

I'm not sure how you might do this.  I think I might experiment with
creating a 650 mb file with all zeros in it (using dd and /dev/zero,
specifying a block size and count).  Then put that in a directory by
itself and doing a mkisofs of that directory.  That will get you the
size that you want. Then you should be able to mount it and erase the
650 file you created and replace it with stuff you want to be in the
image....

--
Dave Brown  Austin, TX

 
 
 

Mkisofs: How to create an empty ISO9660 image

Post by Villy Kru » Sat, 02 Sep 2000 16:11:20



>I've gone twice through mkisofs its help but still haven't checked how
>to create an empty 650MB ISO image possibly with Joliet and RockRidge
>extensions. I'd like to mount this image through the loop device.

What would the purpose be?   iso9660 file system is a read-only file system,
so what would you do with an empty read-onoy file system

Villy

 
 
 

Mkisofs: How to create an empty ISO9660 image

Post by Andres Sool » Sat, 02 Sep 2000 16:44:44



> I've gone twice through mkisofs its help but still haven't checked how
> to create an empty 650MB ISO image possibly with Joliet and RockRidge
> extensions. I'd like to mount this image through the loop device.

It would be pointless--ISO 9660 file systems are not easily writable.
The file system is designed to be written just once and to be efficient
(well, sort of) when written just once.  The main cause is that the
directories are all located after the data and, when data is added
or removed, all the directories should be relocated (and recalculated).

Also, the image takes the room minimally required--there is no notion
of empty space.  A really empty image--containing only a root directory
--would be about 50KB in length.

If you want to actively modify the file system before burning a CD, you
could use ext2, for example.  Or, you could actively modify a tree and
then create a ready image from it--not many OSes are able to read
CDs with other file systems than ISO 9660.

--

I have come up with a sure-fire concept for a hit television show,
which would be called `A Live Celebrity Gets Eaten by a Shark'.
                -- Dave Barry

 
 
 

Mkisofs: How to create an empty ISO9660 image

Post by Grant Edwar » Sun, 03 Sep 2000 02:19:09



>>I've gone twice through mkisofs its help but still haven't
>>checked how to create an empty 650MB ISO image possibly with
>>Joliet and RockRidge extensions. I'd like to mount this image
>>through the loop device.

>What would the purpose be?

As a portible, easy-to-distribute index of well-designed
Microsoft products?

 or...

[insert your favorite "world's shortest book" joke here]

--
Grant Edwards                   grante             Yow!  Could I have a drug
                                  at               overdose?
                               visi.com            

 
 
 

Mkisofs: How to create an empty ISO9660 image

Post by Otto Wy » Mon, 04 Sep 2000 09:43:28


Quote:> >to create an empty 650MB ISO image possibly with Joliet and RockRidge

> I presume the problem is that if you do a mksiofs of an empty directory,
> the image you get is quite small.  Then if you mount it, the loop device
> doesn't allow the size to increase...  I don't remember if this is the
> case

Yes, or at least I haven't found out how.

Quote:> I'm not sure how you might do this.  I think I might experiment with
> creating a 650 mb file with all zeros in it (using dd and /dev/zero,
> specifying a block size and count).  Then put that in a directory by
> itself and doing a mkisofs of that directory.  That will get you the
> size that you want. Then you should be able to mount it and erase the
> 650 file you created and replace it with stuff you want to be in the
> image....

Thanks I'm going to try it.

I just thought there must have been a switch in mkisofs which allows to
specify the size of the image.

O. Wyss

 
 
 

Mkisofs: How to create an empty ISO9660 image

Post by Otto Wy » Mon, 04 Sep 2000 09:43:32


Quote:> >to create an empty 650MB ISO image possibly with Joliet and RockRidge

> What would the purpose be?   iso9660 file system is a read-only file system,
> so what would you do with an empty read-onoy file system

Mounted through the loop device, it is just as writeable as anything
what's laying physically on a harddisk.

I want to organize my backup that way. Dropping anything to backup on
this image and burning it to CDR  when it's full. I know I could to the
same with a backup directory except it's much easier to see when the
image is full.

O. Wyss