|

Thursday April 07, 2005
Writing iso CD's in Solaris
A friend of mine who I got using Solaris 10a few months ago mailed and asked me how to burn cds on Solaris today. He is generally a mac user at home, and windows as a development platform in work (for J2EE apps), and only deploys apps on Unix rather than developing them there, so he is somewhat used to using gui tools for tasks such as writing cd's.
However he has moved his home x86 box to Solaris 10 as he is using the Sun Java Enterprise System Application Server as his primary deployment platform these days, with Netbeans as his development environment, and he wanted to familarise himself with Solaris 10 as an underlying OS. Anyway a thirty second tutorial on writing cd's in Solaris was needed, so for those not familar with how to do this I figured I would post a quick example here.
The two commands that you need to read up on are cdrw(1) and mkisofs(8) [1], with a handy confirmation step involving lofiadm(1M) if you are so inclined (lofiadm requires root privleges).
Okay, so first off create a directory with all the files you want to burn to cd, lets say /tmp/foo, and go
from there
[fintanr@dhcp-ack03-200-118 tmp] $ mkisofs /tmp/foo > /tmp/foo.iso
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 8000
221 extents written (0 MB)
Optional stage, confirm that its all okay by mounting the iso image (as root).
Sun Microsystems Inc. SunOS 5.10.1 snv_09 October 2007
# lofiadm -a /tmp/foo.iso
/dev/lofi/1
# mount -F hsfs -o ro /dev/lofi/1 /mnt
# cd /mnt
# ls
foo.zip
#
Okay, so this is all okay, lets burn the file to cd.
[fintanr@dhcp-ack03-200-118 tmp] $ cdrw -i /tmp/foo.iso
Looking for CD devices...
Initializing device...done.
Writing track 1...done.
Finalizing (Can take several minutes)...done.
And voila, all done. I belive there is a tool in gnome for doing this as well, but I haven't checked.
[1] Not sure how mkisofs ended up in section 8 of the manpages, but I'll try to find out.
(2005-04-06 20:41:55.0)
Permalink
Trackback URL: http://blogs.sun.com/fintanr/entry/writing_iso_cd_s_in
|
The reason is probably a bit historical.
Most installations wouldn't allow non-superusers to access the raw CD-ROM device in read-write mode. Thus, cdrtools (of which mkisofs was a part) ended up in section 8, because "only administrators could write CD-ROMs and that's where administrator commands should be".
Creating ISO images with mkisofs is, of course, very useful for non-superusers too, so I wholeheartedly agree that it should be in section 1.
Posted by Giorgos Keramidas on April 07, 2005 at 12:26 PM IST #
Posted by fintanr on April 08, 2005 at 12:43 AM IST #