Showing posts with label create iso image. Show all posts
Showing posts with label create iso image. Show all posts

30 December, 2009

Create ISO Image From Directory

Occasionally it's useful to create a CD/DVD ISO image from a list of files contained in a directory. For instance, if you're interested in archiving a bunch of files to be later burned to a CD/DVD.

This can be done by using the mkisofs command which stands for 'make ISO filesystem'.

If you have a list of directories like the following:

user@debian:/media/ehd/tmp$ ls -l
total 2802468
drwxr-xr-x 3 root root 4096 2009-12-29 13:01 disc01
drwxr-xr-x 3 root root 4096 2009-12-29 13:01 disc02
drwxr-xr-x 3 root root 4096 2009-12-29 13:02 disc03
drwxr-xr-x 3 root root 4096 2009-12-29 13:03 disc04
drwxr-xr-x 3 root root 4096 2009-12-29 13:05 disc05
drwxr-xr-x 3 root root 4096 2009-12-29 13:06 disc06
drwxr-xr-x 3 root root 4096 2009-12-29 13:08 disc07
drwxr-xr-x 3 root root 4096 2009-12-29 13:09 disc08
drwxr-xr-x 3 root root 4096 2009-12-29 13:10 disc09
drwxr-xr-x 3 root root 4096 2009-12-29 13:10 disc10
drwxr-xr-x 3 root root 4096 2009-12-29 13:12 disc11
user@debian:/media/ehd/tmp$


You can create individual ISO images for each directory by issuing the following command:

$ mkisofs -o disc02.iso -J disc02


The ISO image will preserve the directory structures and file names found under disc02.

Cheers

14 April, 2009

Creating CD-ROM ISO Image - the cowboy way

I've been investigating installation of Xen for work, in the process I thought it would be useful to rather than run around with the WinXp installation disk to create an ISO image of it for installation purposes.

The utility 'dd' suits the bill, you have to first interface directly with the device driver so the cd cannot be mounted. If the cd is mounted, I'd first recommend finding the device driver reference by issuing the mount command:



$ mount
. . .
/dev/scd0 on /media/cdrom0 . . . ..
$ umount /media/cdrom0


As you can see, this was an external cdrom on /dev/scd0.

Next, issue the appropriate dd command:



$ dd if=/dev/scd0 of=WinXpProInstall.iso

The arguments if=/dev/scd0 tells dd to read from the device in raw format, of=WinXpInstall.iso specifies the output file.

You'll be left with an exact image of what resides on the cd, use at your leisure.