Posted by: isaraffee | August 9, 2009

One Tray, Two Separate Mount Points

HAVING ONE TRAY BUT YOU WANT TO HAVE SEPARATE MOUNT ENTRIES FOR YOUR DRIVE

In /dev directory

Rename the cdrom to cdrom.old

#mv cdrom cdrom/old

Make the following soft links. Notice that cdrom and cdrw, both point to the same device scd0. This is because you have only one device for reading and burning data.

[root@venus /dev]# ln -s scd0 cdrom

[root@venus /dev]# ln -s scd0 cdrw

# cd /dev

[root@venus /dev]# ll cd*

lrwxrwxrwx 1 root root 4 Aug 3 15:42 cdrom -> scd0

lrwxrwxrwx 1 root root 3 Apr 23 2005 cdrom.old -> hdc

lrwxrwxrwx 1 root root 4 Aug 3 14:37 cdrw -> scd0

brw-rw—- 1 root disk 15, 0 Apr 14 2001 cdu31a

brw-rw—- 1 root disk 24, 0 Apr 14 2001 cdu535

Next you must add the cdrw entry in the /etc/fstab something like this:

mnt/cdrw /mnt/cdrw supermount fs=iso9660,dev=/dev/scd0 0 0

and your cdrom entry will look like this:

/mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/scd0 0 0

Your /etc/fstab file will look like this:

[root@venus /dev]# more /etc/fstab

/dev/hda4 / ext2 defaults 1 1

none /dev/pts devpts mode=0620 0 0

/dev/hda5 /home ext2 defaults,usrquota,grpquota 1 2

/mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/scd0 0 0

/mnt/floppy /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0

/dev/hda1 /mnt/windows vfat user,exec,umask=0,codepage=850,iocharset=iso8859-1 0 0

none /proc proc defaults 0 0

/dev/hda3 swap swap defaults 0 0

/mnt/usbking /mnt/usbking supermount fs=vfat,dev=/dev/sda 0 0

/mnt/cdrw /mnt/cdrw supermount fs=iso9660,dev=/dev/scd0 0 0

With this, you can eject and close the CD tray using a combination of commands:

[root@venus /root]# eject

[root@venus /root]# eject -t /dev/cdrw

[root@venus /root]# eject

[root@venus /root]# eject -t /dev/cdrom

[root@venus /root]# eject /dev/cdrw

[root@venus /root]# eject -t

[root@venus /root]# eject /dev/cdrom

[root@venus /root]# eject -t

[root@venus /root]#__

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: