Hi guys...

from trying to be a Linux admin... i have ended up being a technical writer and off late i have been writing a small tips section that deals with Linux.. something you can do on a Linux machine... something apart from being totally server administrator!

All the mails that come in here are DNS, Sendmail, Apache tomcat etc.. etc.. querries! which gives an impression that most of you guys use Linux only at office and not at home! With so much change in linux starting changes in library files and then Xorg replacing Xfree86... there has been problems installing simple things such as multimedia players. 99% chances are that you may end up with dependencies! I tried to work around with YUM.. and with so many ppl saying so many different things (online; on net).. i failed to grasp how to set it up! all i could do is get xmms up and running using RPM installer and mplayer configured to run from Konsole (shell.. i mean) i was incapable  or should i say i tried and couldnt understand y i couldnt configure without dependencies! for example, i ran configure script for mplayer with gui switch but it failed bcos it wanted glib to be > 2.4 so i downloaded and installed both glib 2.6.4 and gtk+ 2.6.4, yet the mplayer failed with the same error!! Anyways.. i shall try and figure a way out.... and when i do i shall write down how to do it.

My suggestion is that we should sometime post on issues other than the "network-server flavour" you will agree that there is more to linux than just this! Just write in your experience or a how-to when you have done something that has some 'work around' and was a learning experience.

I had a good experience trying to use cdrecord command on fedora core 3 running on AMD 64 (socket 754) with 1GB RAM and Nvidia GeForce FX 5950 AGP. The hard disk was IDE PATA 40GB Baracuda and had a DL DVD writer from LiteON.

I thought this would be a piece of cake and that i shall finish this task in just a few minute! but that wasn't the case! cdrecord gave weird errors. i couldnt understand anything and i am sure many who have seen that error will agree that "Its CRAP". I started Googling around for help.. and a few things from a couple of site amde me realise the problem. The problem is that we need to perform IDE-SCSI emulation. I wonder y it didnt do it own its own especially bcos cdrecord is built in tool!
anyways, without any delay i am copy pasting here what i had done to get the command working!

Using cdrecord

 

Most Linux distributions have a built-in command line CD burning tool called 'cdrecord'. Using this tools isn't as simple as it was in Redhat 9 shrike. Few things need to be configured before you can proceed with the steps to record a CD. First, type the command cdrecord -scanbus at the shell prompt, if the output shows your CD/DVD writer on 1,x,x or 2,x,x then we have work on our hands. But if the output displays the drive on 0,x,x (ideally 0,0,0) then skip to MKISOFS step. The steps involved are:

  1. Identifying your drive's device driver
  2. Loading ide-scsi emulation
  3. MKISOFS
  4. CDRECORD for CD-R
  5. CDRECORD for CD-RW

 

Identifying your drive's device driver:

It is advisable to use CD/DVD writer as secondary master be it Windows or Linux or any OS for that matter. In our example, DVD writer is connected as secondary master and the device driver then becomes /dev/hdc. To know this without flirting with the hardware type dmesg |grep -i CD on the shell prompt. The output will be similar to this:

- Added public key 6ECDA687281A73E5

hdc: LITE-ON DVDRW SHM-165P6S, ATAPI CD/DVD-ROM drive

 

Loading ide-scsi emulation:

 (Redhat 9 or below users need not do this). Just follow the following instructions:

Change to root user, and run /sbin/insmod -p ide-scsi <ENTER>; if you get an error then we have to make a few changes in a few important files. First create a file under /etc named modules.conf if it doesn't already exist and add the line:

 alias scsi_hostadapter ide-scsi

Save and close the file. Also, you can add the following command to /etc/rc.local so that it is executed at every boot:

/sbin/insmod ide-scsi

Now comes the critcal part of boot loader. Many people use grub but some use Lilo. Grub users should open the file /etc/grub.conf using vi editor; take the cursor to the line: 'kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet'

and add 'hdc=ide-scsi' at the end of it (without quotes).

Lilo users should open lilo.conf located under /etc using vi editor or any text editor of your preference and add append="hdc=ide-scsi" to it. Note that hdc is the secondary master on the IDE cable that connects your CD/DVD drive to the motherboard of your system. Lastly, run lilo at the shell prompt to effect the changes. Grub users need not run any command. Now reboot the system to initiate all changes. Login as root or switch to root using su command and run /sbin/insmod -p ide-scsi to check if the settings have worked. You should not get error. Or try #cdrecord -scanbus; the output should now show your CD/DVD drive on:

0,0,0     0) 'LITE-ON ' 'DVDRW SHM-165P6S' 'MS0C' Removable CD-ROM

We have successfully loaded ide-scsi emulation!

 

MKISOFS:

To burn a disc using cdrecord command, we have to create ISO filesystem containing all the files you want on your CD. To make ISO file:

#mkisofs -v -o isofilename.iso file1 file2 file3.... <ENTER>

Or create a folder, say /tmp/Disc, and dump all the files you want to copy to a CD into this folder. Change directory to Disc (here:/tmp/Disc) and then use the same command as:

#mkisofs -v -o isofilename.iso * <ENTER>

OR BETTER #mkisofs -v -o isofilename.iso -J -R /tmp/Disc <ENTER>

-J for Joliete extension (for Windows support) and -R for RockRidge extesion. We now have a file (isofilename.iso) that contains all the files we want to write to a CD. Even downloaded ISO files or the one created in Windows will work. The last stage is to use the cdrecord command with necessary switches.

 

CDRECORD for CD-R:

You must know the speed of your drive; in our case it is 48x24x48 and also the speed that CD-R is capable to handle. If CD-R is 52x and drive is capable of 40x  then you should burn at a max speed of 40x. And, if drive is 52x and CD-R is 32x then max speed should be 32x when using cdrecord. The command with best preferred switches, as per our opinion is:

# cdrecord dev=0,0,0 gracetime=2 fs=8m driveropts=burnfree,noforcespeed -v speed=24 -sao -eject /tmp/isofilename.iso <ENTER>

 

What the Switches mean:

dev=x,x,x is the target drive.

gracetime is the time interval within which you can cancel the execution of burn command

fs=# is the size on FIFO buffer. Number followed with 'm' gives size in MB

driveropts= options: there are many options of which we feel burnfree and noforcespeed are useful

burnfree turns ON Buffer Underrun protection

noforcespeed: Some drive force a selected speed even if the media is poor thus resulting in poor write quality. This options allows variable writing speed depending on the quality of the medium.

-v displays progress of disc writing

-sao is same as -dao i.e. Disc-At-Once

-eject ejects the tray on completion or the writing process.

 

CDRECORD CD-RW

There isn't much difference in dealing with CD-RW except that you can erase the content of the media and the max writing speed doesn't exceed 24x. So, check if the CD-RW media contains any important data before you proceed to erase it. To erase disc:

# cdrecord dev=0,0,0 blank=fast <ENTER> is the fastest and most common usage. Alternate switches (blank=) are:

all – erases entire disc, takes along time

track – erases a track

session – erases the last session

unclose – open the last session

In order to write data into CD-RW follow the instructions used in CD-R but care should be taken about the writing speed. Check your Rewritable media for the maximum rewriting speed possible.



adios
~ anup

I may have made a mistake in stating that drives need to be emulated to IDE. Am I correct in saying that? or is it the other way round.. what does IDE-SCSI emulation mean? From IDE to SCSI or vice versa or both !?!



--
whosoever shall say unto this mountain, Be thou removed,
and be thou cast into the sea; and shall not doubt in his heart,
but shall believe that those things which he saith shall come to pass;
he shall have whatever he saith.
                                        -- MARK 11:23

***Archives:
http://groups.yahoo.com/group/linuxvadapav/messages

***Group Usage Guidelines (Please Read):
http://groups.yahoo.com/group/linuxvadapav/files/mailing_rules




SPONSORED LINKS
Linux software Linux operating system Linux
Hosting linux unix web Unix operating system Unix vs linux


YAHOO! GROUPS LINKS




Reply via email to