LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mkisofs/cdrecord question (https://www.linuxquestions.org/questions/linux-newbie-8/mkisofs-cdrecord-question-313985/)

matsgl 04-16-2005 06:58 PM

mkisofs/cdrecord question
 
When I use mkisofs to create an image, e.g.
Code:

mkisofs -o foo.iso -r mydir/
and then burn it using cdrecord, e.g.
Code:

cdrecord -v dev=1,0,0 -data foo.iso
the resulting cd will have the contents of mydir/ containing all the files I included in the image, like so:
Code:

[matsgl@localhost matsgl]$ ls /mnt/cdrom
mydir/
[matsgl@localhost matsgl]$

All instructions I've managed to find seem to indicate that one should append files to a directory and then create an image from it... Now, rather than creating the image from one directory, is it possible to create it from a number of files directly so that these files will be at the top-level of the cd (and not in the folder mydir/)?

Cheers,
mgl.

homey 04-16-2005 08:18 PM

If I want to make an image with no parent directory, I use this method...
cd /dir
mkisofs -R -J -hide-rr-moved -o /home/myfiles.iso .

If I want to create the parent directory and have all files in that directory, I use this method...
In this example, I am also piping directly to cdrecord.

cd /mnt/tech
mkisofs -R -J -graft-points "/aclinux=./aclinux" | \
cdrecord -v dev=ATA:1,0,0 -eject -multi -data -

matsgl 04-18-2005 04:31 AM

Homey,

Thanks for that - that was exactly what I was looking for. I tried to find some relevant info in the man pages but obviously mkisofs is a complex app to put it mildly. Could you explain what
Code:

-hide-rr-moved
does in more detail (specifically the -rr-moved option)?

Thanks!
mgl.

homey 04-18-2005 06:20 AM

Actually, I don't even use that command most of the time, just happened to be in that example. Basically, from the man page, it just hides some stuff which may be confusing to some people.

man mkisofs
Quote:

-hide-rr-moved
Rename the directory RR_MOVED to .rr_moved in the Rock Ridge tree. It seems to
be impossible to completely hide the RR_MOVED directory from the Rock Ridge tree.
This option only makes the visible tree better to understand for people who don’t
know what this directory is for. If you need to have no RR_MOVED directory at
all, you should use the -D option. Note that in case that the -D option has been
specified, the resulting filesystem is not ISO9660 level-1 compliant and will not
be readable on MS-DOS. See also NOTES section for more information on the
RR_MOVED directory.

matsgl 04-18-2005 07:48 AM

Seems like I should read the man pages a bit more thoroughly next time :)
Thanks!
mgl.

homey 04-18-2005 08:04 AM

No problem. :)

Amadaeus09 09-04-2005 11:10 AM

You may want to use the -r option instead of -R:

FROM MANPAGE:

-r This is like the -R option, but file ownership and modes are set
to more useful values. The uid and gid are set to zero, because
they are usually only useful on the author's system, and not use_
ful to the client. All the file read bits are set true, so that
files and directories are globally readable on the client. If any
execute bit is set for a file, set all of the execute bits, so
that executables are globally executable on the client. If any
search bit is set for a directory, set all of the search bits, so
that directories are globally searchable on the client. All write
bits are cleared, because the CD-Rom will be mounted read-only in
any case. If any of the special mode bits are set, clear them,
because file locks are not useful on a read-only file system, and
set-id bits are not desirable for uid 0 or gid 0. When used on
Win32, the execute bit is set on all files. This is a result of
the lack of file permissions on Win32 and the Cygwin POSIX emula_
tion layer. See also -uid -gid, -dir-mode, -file-mode and -new-
dir-mode.



All times are GMT -5. The time now is 08:43 AM.