Creating /dev/cdrom

Michael D. Setzer II mikes at kuentos.guam.net
Mon Jul 14 16:34:52 UTC 2008


On 14 Jul 2008 at 16:58, Bernhard Fischer wrote:

Date sent:      	Mon, 14 Jul 2008 16:58:00 +0200
From:           	Bernhard Fischer <rep.dot.nop at gmail.com>
To:             	"Michael D. Setzer II" <mikes at kuentos.guam.net>
Copies to:      	busybox at busybox.net
Subject:        	Re: Creating /dev/cdrom

> On Mon, Jul 14, 2008 at 07:51:08AM -0700, Michael D. Setzer II wrote:
> >Is there a process to create /dev/cdrom to point to the cdrom device?
> 
> Sure. Suppose your cdrom lives at hdc, somthing like the following
> should do the trick:
> echo 'hdc root:cdrom 660  *ln -s $MDEV cdrom' >> /etc/mdev.conf
> 
> HTH,
> 

As a quick follow up: Here is a script that I just wrote that seems to do what I 
want, but would only work with a hdx cdrom. It also seems to be more than 
should be required. It just list the hdx devices that were found, and checks to 
see if one isn't listed in the /proc/partitions, and assumes that is the cdrom.



cd /dev
devices=`ls hd?`;
for h in $devices
   do
       	drive=`cat /proc/partitions | grep $h`;
	if [ -z "$drive" ]; then
		ln -s /dev/$h /dev/cdrom ;
        fi
   done

+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes at kuentos.guam.net                            
  mailto:msetzerii at gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC at HOME CREDITS
SETI 5,911,348.7549 | EINSTEIN 1,802,388.6269 | ROSETTA 
554,380.6287




More information about the busybox mailing list