RHEL-6 (5)
KNOW
YOUR SYSTEM-P5
Under "KNOW YOUR SYSTEM"
CD-DVD
ROM:
How to check the status of CD-ROM in my
system?
How to know the device name of CD-ROM in my
system?
How to know the model name of CD-ROM in my
system?
What is the device format of CD-ROM in my
system?
How to mount CD-ROM in my system?
How to unmount CD-ROM in my system?
How to mount ISO image in my system?
How to unmount ISO image in my system?
[root@rhel6-client1 ~]# cd-drive
cd-drive
version 0.81 x86_64-redhat-linux-gnu
Copyright
(c) 2003, 2004, 2005, 2007, 2008 R. Bernstein
This is
free software; see the source for copying conditions.
There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR
PURPOSE.
The
driver selected is GNU/Linux
The
default device for this driver is /dev/cdrom
Drivers available...
GNU/Linux ioctl and MMC driver
cdrdao (TOC) disk image driver
bin/cuesheet disk image driver
Nero NRG disk image driver
CD-ROM
drive supports MMC 3
==============================O/P
REMOVED===============================
To list
all block devices.
[root@rhel6-client1 ~]# lsblk
NAME MAJ:MIN RM
SIZE RO TYPE MOUNTPOINT
sr0 11:0
1 3.5G 0 rom รงรง
sda 8:0
0 20G 0 disk
├─sda1 8:1
0 500M 0 part /boot
├─sda2 8:2
0 3G 0 part /opt
├─sda3 8:3
0 1G 0 part /home
├─sda4 8:4
0 1K 0 part
├─sda5 8:5
0 1G 0 part [SWAP]
└─sda6 8:6
0 14.6G 0 part /
[root@rhel6-client1 ~]# more /proc/sys/dev/cdrom/info
CD-ROM
information, Id: cdrom.c 3.20 2003/12/17
drive
name: sr0
drive speed: 1
drive #
of slots: 1
Can close
tray: 1
Can open
tray: 1
Can lock
tray: 1
Can
change speed: 1
Can
select disk: 0
Can read
multisession: 1
Can read
MCN: 1
Reports
media changed: 1
Can play
audio: 1
Can write
CD-R: 1
Can write
CD-RW: 1
Can read
DVD: 1
Can write
DVD-R: 1
Can write
DVD-RAM: 1
Can read
MRW: 1
Can write
MRW: 1
Can write
RAM: 1
[root@rhel6-client1 ~]# dmesg |grep -i "cdrom"
ata2.00:
ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33
[root@rhel6-client1 ~]# dmesg |egrep -i "cdrom|dvd"
ata2.00:
ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33
sr0:
scsi3-mmc drive: 1x/1x writer dvd-ram cd/rw xa/form2 cdda tray
[root@rhel6-client1 ~]# ls -l /dev/sr0
brw-rw----+
1 root cdrom 11, 0 Feb 15 00:54 /dev/sr0
[root@rhel6-client1 ~]# ls -l /dev/cdrom
lrwxrwxrwx.
1 root root 3 Feb 15 00:54 /dev/cdrom -> sr0
cdrom
device format= iso9660
[root@rhel6-client1 ~]# ls -ld /media/
drwxr-xr-x.
2 root root 4096 Jun 28 2011 /media/
[root@rhel6-client1 ~]# ls -ltr /media/
total 0
[root@rhel6-client1 ~]# mount -t iso9660 -o ro /dev/cdrom /media/
[root@rhel6-client1 ~]# df -kh
Filesystem Size
Used Avail Use% Mounted on
/dev/sda6 15G 2.6G
12G 20% /
tmpfs 937M 72K
937M 1% /dev/shm
/dev/sda1 485M 37M
423M 8% /boot
/dev/sda3 1008M 34M
924M 4% /home
/dev/sda2 2.9G 69M
2.7G 3% /opt
/dev/sr0 3.5G 3.5G
0 100% /media
[root@rhel6-client1 ~]# umount /media/
OR
[root@rhel6-client1 ~]# umount /dev/cdrom
[root@rhel6-client1 ~]# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 15G 2.6G
12G 20% /
tmpfs 937M 72K
937M 1% /dev/shm
/dev/sda1 485M 37M
423M 8% /boot
/dev/sda3 1008M 34M
924M 4% /home
/dev/sda2 2.9G 69M
2.7G 3% /opt
HOW TO MOUNT
ISO IMAGE:
[root@rhel6-server OS]# mkdir /iso-image
[root@rhel6-server OS]# mount -t iso9660 -o loop
/mnt/hgfs/OS/rhel-server-7.0-x86_64-dvd.iso /iso-image/
[root@rhel6-server /]#
mount -t iso9660 -o loop /comodo_rescue_disk_2.0.261647.1.iso /iso-image/
[root@rhel6-server /]# ls -l /iso-image/
total 11
drwxr-xr-x. 4 anurag anurag 2048 Dec 11 2012 boot
-rw-r--r--. 1 anurag anurag 2633 Jun 3 2011
index.html
-rw-r--r--. 1 anurag anurag 2874 Jun 3 2011
md5sum
-rw-r--r--. 1 anurag anurag 878 Jun
3 2011 README
-rw-r--r--. 1 anurag anurag 1217 Jun 3 2011
style.css
[root@rhel6-server /]# umount
/iso-image/
[root@rhel6-server /]# ls -l /iso-image/
total 0
No comments:
Post a Comment