LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can't seem to create an ISO from a folder tree (https://www.linuxquestions.org/questions/linux-software-2/cant-seem-to-create-an-iso-from-a-folder-tree-4175600460/)

SaintDanBert 02-23-2017 02:03 PM

can't seem to create an ISO from a folder tree
 

APOLOGY IN ADVANCE
I know that I've posted several items about ISO images, but I continue to struggle. One reason includes my limited time to play-with/work-on new things at the expense of other "more important" efforts. I hope the moderators will be kind.

I know there is a loose nut in my end-user's chair, so I hope someone here can help me. This is Linux so I suppose that I could take apart the process for making my own distribution ISO, but I hope it does not come to that.

I'm trying to create an ISO file that contains a complete folder tree of files. I can create the tree of folders and files, no problem. I can launch k3b or brassero, but then I can't get a mountable ISO file as results.

One of my complaints is that these tools expect a DVD as output and complain if my folder tree contents are too large. Do I need a blu-ray writer utility?

Another complaint is that (blush) I can't seem to wrap around the options for the command line tools like genisoimage (still blushing).

For those inquiring minds, I have loads of reference material as document files in various formats. Depending on the document format, there may be associated image files. A few documents are "slide shows" with associated images and audio. (gulp) Video is right around the corner. (/gulp)

Thanks in advance,
~~~ 0;-Dan

szboardstretcher 02-23-2017 02:49 PM

If you aren't opposed to using the command line instead of some gui then this process should net you a good iso. We will try it on a small directory to test it out.

Code:

mkdir /mydir
mkdir /mnt/iso_mount
for i in {1..1000}; do dd if=/dev/urandom bs=1 count=10 of=/mydir/file$i; done
genisoimage -o my.iso -V my_volume_label -r /mydir
file my.iso
mount -t iso9660 -o loop my.iso  /mnt/iso_mount/
cd /mnt/iso_mount
ls

Notice the line 'file my.iso'.. that will return this:

Quote:

my.iso: # ISO 9660 CD-ROM filesystem data 'my_volume_label'
Which indicates it is a valid ISO.

SaintDanBert 02-23-2017 03:11 PM

Quote:

Originally Posted by szboardstretcher (Post 5675160)
If you aren't opposed to using the command line instead of some gui then this process should net you a good iso. We will try it on a small directory to test it out.
...

So the for-loop uses dd to create a bunch of 10-block files for the test...

I want to use dd to snarf an entire USB stick or other external drive:
Code:

prompt$ sudo dd bs=4096 if={usb_device}  of=drive.img
Then create an ISO of what I get.

Thanks in advance,
~~~ 0;-Dan

szboardstretcher 02-23-2017 03:21 PM

This is the only line you will need:

Code:

genisoimage -o my.iso -V my_volume_label -r /mydir
The rest was to demonstrate that it works. Here is a breakdown of what this line means:

Code:

# Name the outputted iso my.iso
-o my.iso
# Set the volume label to my_volume_label
-V my_volume_label
# Create the ISO using the files at /mydir
-r /mydir

So you would need to change those variables to fit your need.

Shadow_7 02-23-2017 04:53 PM

Some guy had written a script to do an iso image from any linux install long ago. Or any debian based one it seems. Also seems like a lot of distros have "ways" of doing this in the distro now.

https://en.wikipedia.org/wiki/Remastersys

Which forked to Respin it seems. Although PDK seems more along the lines of what I found many moons ago for this task. Although I never used it, it was a relatively simple bash script at the time. So maybe not pdk which seems to have a lot of python. So many options now. And not as simple as it once was with a new init system and bios options.

https://github.com/64studio/pdk

SaintDanBert 02-24-2017 03:15 PM

Quote:

Originally Posted by szboardstretcher (Post 5675174)
This is the only line you will need:
Code:

genisoimage -o my.iso -V my_volume_label -r /mydir
The rest was to demonstrate that it works.
...
So you would need to change those variables to fit your need.

The part -r /mydir names a folder with a tree of files and folders below it. My previous 'dd' example resulted in a single file, drive.img.

If I name the top level folder -- mount point -- of the usb-device, the ISO will contain all of the file system "data" files and associated folders. Using 'dd' to create 'drive.img' gets all of the device bits in addition to the "data" files and folders. There are only rare times that I care about these extra details, but I need them when I do care.

Follow-up
I'm not a digital music guy, but is this similar or identical to what folks are doing when they talk about "ripping a CD" or otherwise putting CD music into an ISO file?


I guess the short answer says to use the device mount point as input to genisoimage and find a way to process the extra bits as the exception that they really are. That processing might involve making an ISO from a "drive.img" file.

Thanks in advance,
~~~ 0;-Dan

szboardstretcher 02-24-2017 03:26 PM

Quote:

I'm trying to create an ISO file that contains a complete folder tree of files.
An explanation like mine allows you to take a "folder tree of files" and put them into a file called an ISO. This is called 'making an ISO' as far as I know.

Quote:

I'm not a digital music guy, but is this similar or identical to what folks are doing when they talk about "ripping a CD" or otherwise putting CD music into an ISO file?
That is called "ripping a CD" and essentially means take a CDROM and all of its data and make an 'image' of it called an ISO file.

Huge difference between generating an ISO from a file list, and generating an ISO file from a dd image. You can read more about the differences with some google searching. Hope that gets you started in the right direction.

SaintDanBert 02-24-2017 06:12 PM

Well, I think that I found a solution:
Code:

prompt$  # first, install the package acetoneiso
sudo apt-get install acetoneiso
...

prompt$  # get some supporting utilities
prompt$  sudo apt-get install bchunk ccd2iso mdf2iso nrg2iso or sudo aptitude install bchunk ccd2iso mdf2iso nrg2iso
...

prompt$  # then make an ISO from your IMG
prompt$  ccd2iso source.img destination.iso

Once I've had a chance to play with this, I'll report back.
Follow-Up:
It seems that ccd2iso is looking for dot-img files that are something WinXX and Mac specific other than what I can create with
Code:

prompt$  dd ... of=/path/something.img

By the way, there appear to be many more features in acetoneiso. Again, I'll report back.

Thanks to all,
~~~ 0;-Dan


All times are GMT -5. The time now is 03:46 PM.