|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
|
| News | Mounting CDROM in Solaris | Recommended Links | Man pages | Reference | Etc |
| cdrecord (now cdrtools) | mkisofs |
Burn CDs With the Solaris[TM] 8 Operating Environment
CD-ROM drives are commonly used for duplicating existing CDs, and for making CD data backups of hard disk files. This article demonstrates how both tasks can be accomplished using cdrecord on the Solaris[TM] Operating Environment.
A simple command line program, cdrecord, means burning CDs using Solaris software is quick, simple, and cost-effective. The cdrecord program, which works for both SPARC[TM] and Intel Architecture systems, is included on the Solaris Software Companion CD, and is also available for free download from cdrecord 1.9 SPARC 8 or cdrecord 1.9 INTEL 8 (also cdrecord 1.9 SPARC 9 )
Cdrecord is installed in /opt/sfw (/opt/sfw/bin/cdrecord). Blastwave.org has a Solaris cdrecord package (www.blastwave.org/packages.php/cdrtools). Most SCSII CD drves are compatible with solaris (for more information see Cdrecord-2.0 drive compatibility list)
While optional, configuring a cdrecord startup file, /etc/default/cdrecord, will save time in the future. This startup configuration file can hold information that cdrecord will need every time it's used, such as the CD recorder's speed, device name, the preferred buffer size, and so on. Alternately, these options can be entered into the command line before every use.
To discover the CD recorder and CD-ROM drive device names you can use cdrecord -scanbus at the root prompt. The command output should be similar to:
The device ID is the first three numbers listed in each entry -- in this case, device 2,4,0 is the CD recorder, for example. The configuraiton file can also include a recording speed (for example, 8 times), and a buffer size (for example, 8 megabytes) to help avoid under runs. To create the configuration file, located in /etc/default/cdrecord, type:# cdrecord -scanbus cdrecord 1.9 (i386-pc-solaris2.8) Copyright (C) 1995-2000 1,0,0 100) 'CREATIVE' 'CD5233E ' '1.00' Removable CD-ROM 2,4,0 204) 'PLEXTOR' 'CD-R PX-R820T' '1.05' Removable CD-ROM# cat /etc/default/cdrecord CDR_FIFOSIZE=8m CDR_SPEED=8 CDR_DEVICE=USCSI:2,4,0The cdrecord program startup configuration file is now set up for the future!CD to CD
To duplicate an existing CD, insert the CD into the CD-ROM drive. (Remember, duplicating CDs might require certain copyright and license permissions!) Then:
Determine the controller and target numbers. These are listed in the cdrecord -scanbus output (from before): 1,0,0 100) 'CREATIVE' 'CD5233E ' '1.00' Removable CD-ROM . The first number is the controller number, and the second number is the target number. In this case, they are one and zero, respectively. Also note that in the Solaris 8 platform, the IDE CD-ROM drive device names are very similar to SCSI device names -- both contain target numbers.
Choose an output file with sufficient free hard disk space (at least 700 megabytes recommended). For this example, the free space is located in the /local file system.
Capture an ISO image file of the CD by typing (at root prompt):
# dd if=/dev/dsk/c1t0d0p0 of=/local/mycdromfile.isoIt will take about five to ten minutes to copy the entire CD image file to disk. After inserting a blank CD into the CD-ROM drive, burn the image from disk onto a second CD by typing:
# cdrecord -v /local/mycdromfile.isoThis should take about 15 to 30 minutes, depending on the speed of the CD burner. In the above command, -v displays each step with extra information, just in case something isn't successful.
Data to CD
Many users also utilize CD-ROM drives to create data backups on CD of a system's home directory and files. The Solaris 8 Operating Environment includes a very useful command for this, mkisofs, which creates an image file when pointed at a system directory. To make an image file of a home directory, for example /home/neal, type:
# mkisofs -l -L -r -o /local/mycdromfile2.iso /home/nealThis will take all the files in the /home/neal directory and create a CD-ROM ISO image file at /local/mycdromfile2.iso.
When this is finished, insert a blank CD into the CD-ROM drive, and type:
# cdrecord -v /local/mycdromfile2.isoThis will copy the data image onto the blank CD, and should take about 15 to 30 minutes depending on the speed of the burner. More information about the mkisofs command, including all its configurable options, can be found by typing man mkisofs at a shell prompt.
For additional software and hardware information, documentation, source code, and a list of supported CD recorders for cdrecord (an open source project), visit the Freshmeat Web site. To learn more about the Solaris Operating Environment, please visit www.sun.com/solaris.
|
For burning CDRs on Solaris:
- stop the volume manager daemon
vold, because it blocks the CD recorder device
/etc/init.d/volmgt stop
- Burn the CD using
cdrecord
- Restart the daemon
/etc/init.d/volmgt start
This paper documents a method for building and using a recovery CD for the Solaris Operating System. This CD can be used to restore root file systems without having to install the OS on an alternate boot disk or configure and use a Solaris JumpStart server (as described in the BigAdmin Community-Submitted document "Restoring the Solaris OS From VERITAS NetBackup Software").The BigAdmin Community-Submitted article "UberJS: A More Flexible Solaris JumpStart System" provided much of the information regarding the modification of the Solaris installation CD that is used in this process. If for some reason this process does not work in your environment, I would suggest reviewing these documents, as well as the documents they reference, for ideas.
The basic idea is to build a bootable CD that will allow the installation of the VERITAS NetBackup client software. Since some of the files in
/etcdirectory will remain "read only", it is necessary to add entries that the NetBackup client installation won't be able to customize. To provide a file system to install the NetBackup client software, the host's swap partition will be formatted withnewfsand mounted as/usr/openv.This process assumes a fairly basic NetBackup configuration with a single NetBackup master server that is also the only media server as well. This process is not suited for situations where the target server is also a NetBackup media server although other ways to make it work may exist in this situation as well.
Issues and methods stated in this article are outdated. Reading it may still help understand the problems.
You might want to check out the PDF from Sun Blueprints for a much easier way of doing things these days.
http://www.sun.com/software/solutions/blueprints/0301/BuildBoot.pdfPreface:
I have been trying to customize a Solaris install CDROM to my own needs. After several searches without any usable results, I ran into some really good explanations on this topic on the SunManagers Mailinglist Archive.
The work of Victoria Lau (vlau@msmail2.hac.com) 'Log file to customize the Solaris 2.5 boot cdrom' and a paper of James Hutchinson (lsharp@taz.hutch.org) 'Summary: How to build a Solaris bootable CDROM' helped alot, but these documents are Solaris 2.5 specific. Sun changed the CD-Layout from 2.5 to 2.6 :=)
In this document, I will explain how the Sun boots off the CDROM and how this CDROM could be customized to fit someones needs. This paper refers to the Solaris 2.6 HW 5/98 CDROM. The new Solaris 2.7 CDROM seems to share the same layout.
This document is structured in several sections:
1. Introduction to the Sun CDROM layout
2. How is the machine booting off the CDROM and where does the installation begin.
3. Altering the CDROM
3.1 The VTOC explained
3.2 Two possible methods for changing the CD
This was originally developed (and is still maintained) as a Usenet newsgroup FAQ. If you'd like to check out the newsgroups, point your news reader at the following (or go to http://groups.google.com/ and read them with your web browser):
[ PDF]
Building a Bootable JumpStart™ Installation CD-ROM
File Format: PDF/Adobe Acrobat -
View as HTML
[PDF]
Performing Network Installations Without a Local Boot Server
Burning a bootable CDRom for Solaris
cdrtools-mkisofs now supports Solaris x86 boot CDs - Talk Root - PC Hardware & Software Talk
|
cdrtools/mkisofs now supports Solaris
x86 boot CDs
The new mkisofs now supports to create Solaris x96 boot CDs ASs it allows to create more slices than the original Sun CDs use there are even more possibble usage scenarios. Please check the new sources at ftp://ftp.berlios.de/pub/cdrecord/alpha |
Wanke Matthias Matthias.Wanke at itellium.com
Thu Mar 27 11:10:24 EST 2003
- Previous message: SUMMARY: Password Composition/Complexity and Auto-lockout
- Next message: SUMMARY: JFS on solaris?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I had the following question to the List: To: Sun Managers Subject: Using SUNs ISO Images without toasting cd's to install solaris 9! ? Hi, i wanted to use the ISO images downlodable from SUN to setup an installserver of Solaris 9 12/02. I am able to mount the CD's with the help of lofi but this will give me just the first slice (s0) which is hsfs, the other slices are ufs and can't seem to be accesses via lofi. Has aynone tried to disassamble the images in a way the with the help of dd etc. one can acces all data in the images without actually burning one or more cd's? My goal is beeing able to do an "setup_install_server" from the images; but even in the first step the script needs to access slice 1 which contains the miniroot for jumpstart... Cheers, Mat. Thanks for you answers; i was able to solve my problem and go ahead with installation! tkevans [tkevans at tkevans.com] his has worked for me: mount -F hsfs -o ro `lofiadm -a /path/to/iso/image` /mnt Vberg Mats [mats.oberg at tietoenator.com] Hi, I was able to do what you are trying to do by following the instructions on http://www.bolthole.com/solaris/mount-cdrom.html <http://www.bolthole.com/solaris/mount-cdrom.html> Steve Wills [steve at stevenwills.com] http://www.bolthole.com/solaris/mount-cdrom.html <http://www.bolthole.com/solaris/mount-cdrom.html> (This Link didn't work for me!) some source ;-) told me that one can look at the first block of the ISO Image and use the info there to extract the second slice which in turn can be mounted with lofi as ufs; have a look at the other links to get more details! #!/bin/ksh INPUT=$1 S1=`dirname $1`/slice1_`basename $1` set -A vtoc `od -D -j 452 -N 8 < sol-9-u2-sparc-v1.iso | nawk ' $2 !~ /^$/ { print $2*640,$3*1 }'` dd if=$INPUT of=$S1 bs=512 skip=${vtoc[0]} count=${vtoc[1]} #_________________________________________ sunmanagers mailing list sunmanagers at sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers <http://www.sunmanagers.org/mailman/listinfo/sunmanagers> _______________________________________________ sunmanagers mailing list sunmanagers at sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers
CD-Writer
Author: arpsamApr 14, 2003 10:57 AM Hi there, I just installed Solaris 9 on my HP Vectra machine, I have a Mitsumi CD Writer , is there something like cd writing under solaris, if yes then how can one write a cd in solaris, and where can we find drivers and softwares for burnig cd's under solaris.
Samir
Messages: 1
Registered: May 2004
Location: Great Falls, VirginiaHi,
I have a SUN Ultra 10 with TEAC CD Writer. I tried cdrw command to blank a cd and in fact it works. I can write a cd. But when I attempted to create a bootable CD, I am frustrated. I tried cdrecord, BurnIT (unfortunately they all have only source versions and when I try to build I get all kinds of hurdles). So I followed NetBSD's instructions and they seemed very straight forward as seen in
http://www.netbsd.org/Documentation/bootcd.html#sparc64image
But sunbootcd.sh uses sunlabel and I got stuck there. I could create a CD with solaris 10 .iso file and boot.sh, but without sunlabel, I cannot use that CD to boot.
Any suggestions?I found this, may be usefull for you:
"The first step is to identify the cd recorder device name, which can be found by scanning the device buses. In order to scan the devices, however, the volume management must be turned off.
Log in as root
Turn off volume management by typing /etc/init.d/volmgt stop
Discover the CD recorder and CD-ROM drive device names by typing cdrecord -scanbus at the root prompt. The command output should be similar to:
# cdrecord -scanbus
cdrecord 1.9 (i386-pc-solaris2.8) Copyright (C) 1995-2000
1,0,0 100) 'CREATIVE' 'CD5233E ' '1.00' Removable CD-ROM
2,4,0 204) 'PLEXTOR' 'CD-R PX-R820T' '1.05' Removable CD-ROM
The device ID is the first three numbers listed in each entry -- in this case, device 2,4,0 is the CD recorder, for example. The configuraiton file can also include a recording speed (for example, 8 times), and a buffer size (for example, 8 megabytes) to help avoid under runs. To create the configuration file, located in /etc/default/cdrecord, type:
# cat /etc/default/cdrecord
CDR_FIFOSIZE=8m
CDR_SPEED=8
CDR_DEVICE=USCSI:2,4,0
The cdrecord program startup configuration file is now set up for the future!
After inserting a blank CD into the CD-ROM drive, burn the image from disk onto a second CD by typing:"
# cdrecord -v /local/mycdromfile.iso
I've used this to create my Solaris express CD's an work fine.
Good luck !
Name: Glenn Moores
Date: December 11, 2001 at 02:45:54 Pacific
Subject: Installing scsi CDROM into Ultra30Hi,
I'm from a software background and so dont often get into this HW install stuff, so I need some guidence.....
I've got an Ultra 30 which I need to build, but it has no CDROM so I'm installing a standard Tosh scsi 40x.
At OK prompt, probe-scsi finds it on Target 3, but "boot cdrom" doesnt find a boot file and complains device not ready. I'm assuming this is because the std cdrom alias is for target 6? I've tried variations on boot but to no avail.
Any clues?
Response Number 1 Subject: Installing scsi CDROM into Ultra30
Hi mate, if the cdrom alias is for target 6, then I guess you can either try to change the target number of the drive by the jumpers/pins on the back of it, or you could use the openboot commands to create an alias...at ok prompt:
show-devs
will show you devices .. basically look for your cdrom drive device + target on there and use devalias to create the alias for it.
it's prob set to:
/iommu/sbus/espdma@f,400000,esp@f,800000/sd@6,0:d
you could do
devailias mycdrom /iommu/sbus/espdma@f,400000,esp@f,800000/sd@3,0:d
and type boot mycdrom - however devalias is only a temporary thing and will be erased upon reboot or powerdown. you can use nvalias instead for a permanent setting. (if you can't change the scsi target ID then just change the cdrom alias as necessary)..
Hope this helps.
Sun Managers Mailing List Archives
Thanks to the following individuals: Alan Reichert David Foster Jon Kump Wolf Shaefer Moti Levy James Lick Mark Hargrave Michael Hills Chris Marble Consensus says that Sun does not make its own. Experiences with cd-rom burners: PlexWriter 12 SCSI drive (Linux box) YAMAHA CRW4416SX (TATUNG UltraSparc 10 running Solaris 2.6) Ricoh MP7120A drive hp 9600 scsi (solaris) Yamaha burners (SCSI interface) Helpful URLs cdrom writing: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html http://www.fadden.com/cdrfaq/ http://www.hycd.com http://www.sun.com/software/solutions/blueprints/0301/BuildBoot.pdf http://www.freshmeat.net Recording CDROMs Joerg Schilling's cdrecord http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html http://www.fokus.gmd.de/nthp/employees/schilling/cdrecord.html webCDwriter : Web-based Java client for network multi-user cd-writes http://www.uni-bielefeld.de/~jhaeger/webCDwriter/ SCG and FBK drivers (necessary for CDRecord on Solaris) ftp://ftp.fokus.gmd.de/pub/unix/kernel/scg/ Joerg Schilling's other links: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/ Andy McFadden's CD-Recordable FAQ http://www.fadden.com/cdrfaq Sun CDROM FAQ http://saturn.tlug.org/suncdfaq/ Note: Option for freeware is to use "cdrecord" or "cdrw". "cdrw" is a Sun product which is included in Solaris 8 10/00 or higher David Foster also handed down some scripts if anyone wants. bye, Daniel
freshmeat.net Project details for cdrtools
cdrtools (formerly cdrecord) creates home-burned CDs with a CDR/CDRW recorder. It works as a burn engine for several applications. It supports CD recorders from many different vendors; all SCSI-3/mmc- and ATAPI/mmc-compliant drives should also work. Supported features include IDE/ATAPI, parallel port, and SCSI drives, audio CDs, data CDs, and mixed CDs, full multi-session support, CDRWs (rewritable), TAO, DAO, RAW, and human-readable error messages. cdrtools includes remote SCSI support and can access local or remote CD writers.Author:
Jörg Schilling [contact developer]
The speed is usually 12 or 16, you should know this already.cdrecord -vv dev=x,x,x speed=x filename.iso
CDR_DEVICE=0,0,0 CDR_SPEED=16
How to create a bootable Solaris x86 cdrom
Intention
Some weeks (December 2003) ago I had to create a bootable cdrom for and with Solaris x86. I wanted to boot an Intel system from a cdrom and then do some things like copying files to harddisk and so on. Unfortunately it looks like I'm the only one interested in doing this. A lot of googling did not help. That's why I think the following recipe will help you a lot.Preconditions
Since I do not want and am not allowed to distribute Solaris, you need an orginal "Solaris9 Software 1of2" cdrom. All the parts to assemble a new ISO-image are grabbed from this disk. Put this cdrom into your drive and execute following commands in a directory where you have 1GB free space:
Now you can modify the directory news1 to all your needs. If you need more space to add your own software you could remove the installation packages in news1/Solaris_9/Product .
- mount -r -F hsfs /dev/dsk/c1t0d0p0 /mnt
- mkdir news1
- ( cd /mnt; find . | cpio -o ) | ( cd news1; cpio -imdv )
- umount /mnt
- dd if=/dev/dsk/c1t0d0p0 of=p0firstBlocks count=64
- dd if=/dev/dsk/c1t0d0p0 of=news1/boot.img count=4
- dd if=/dev/dsk/c1t0d0s0 of=s0
To execute your own script while booting from the cdrom, the best way is to alter the image s0. Take a hex editor and search the string "# Make sure all configuration necessary is completed in order". Start overwriting at # with something like "exec /cdrom/my_action.sh" Do not forget the newline after ".sh"! The script my_action.sh has to be placed in the directory news1.
Now let's create a new ISO image that can be burned to a cdrom:
Burn the new ISO image ./newsol9.iso to a CD-R and boot it!
- ( cd news1; mkisofs -no-emul -r -b boot.img -c .catalog -o ../news1.img .)
- PADDING=`ls -l news1.img | awk '{print 506880 -($5/512)}'`
- dd if=p0firstBlocks > ./newsol9.iso
- dd if=news1.img skip=64 >> ./newsol9.iso
- dd if=/dev/zero count=${PADDING} >> ./newsol9.iso
- dd if=s0 >> ./newsol9.iso
- dd if=/dev/zero count=600 >> ./newsol9.iso
All the steps described above are tested on a Solaris9-x86 system. They probably will work as well on a Linux system if the paths to the cdrom device are changed appropriate.
Internals
EL-Torito bootblock
The process described above creates a new ISO image as similar to the original Solaris cdrom as I could. One difference is, that the El-Torito bootblock on the new cdrom is not exactly where it is on the original one. There is a nice tool disktype available which shows, that the bootblock on the original cdrom starts at sector 0 of the ISO filesystem. I do not know how to do this with mkisofs, since I did not find any option to do this. That's why the first 4 blocks of the original cdrom are copied as a new file into the ISO filesystem and referenced with a path as an option for mkisofs.
VTOC
It looks like the first block and perhaps a few following blocks are not only the bootblocks for El-Torito but also contain the Solaris VTOC. If they are not copied from the original cdrom, Solaris will not be able to mount s1.
Space
Perhaps somebody knows about the two topics described in chapter EL-Torito and VTOC above. This would make it poissible to alter the Solaris VTOC or whatever to have more free space for the ISO filesystem to play with.
EL-Torito bootblock
If somebody could tell me how to alter the mkisofs command or how to patch the image to use the original bootblock startng at sector 0?
Links
Just found a very useful link. This could have saved me WEEKS! http://www.talkroot.com/archive/topic/1487-1.html
Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: June 05, 2008