[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1307
  • Last Modified:

cdrom mount error: disk is write protected enter correct file system

hi I have RHEL 4 installed on Vmware on windows host.
I am trying to mount the cdrom by issuing
mount /dev/hdc
as well as
mount /dev/cdrom
but it gives error like:
the device is write protected mounting read only and mount:you must specify the file system.
.... i have cpio files in the cdrom...i wish to install 10gApplication serv er on this machine.

Thanks in advance
0
aman_greval
Asked:
aman_greval
  • 7
  • 5
  • 4
  • +1
1 Solution
 
ravenplCommented:
Sure the cdrom is installed as /dev/hdc?
Sure CD is connected to the VM (or is connected at VM startup)?
also try:
mount -t iso9660 /dev/hdc /mnt/cdrom # or /media/cdrecorder or whatever
0
 
aman_grevalAuthor Commented:
how to check whether the cdrom is installed on hdc?
i tried fstab ..there /dev/hdc was mentioned in front of /media/cdrom

on vmware i created a virtual machine n installed linux on that VM. when i check hardware list of virtual machine...(Ctrl+D) it  shows the cdrom and if i click there i gives me two option..1 through E: that is my cdrom drive and other option is through iso images on my harddisk. i installed linux thru iso images stored on my windows based hard drive.. (D:) Now the software of the App. Server that i wish to install (cpio) files are there on (d:) hard disk.  I wish to access that. Only way i know is through mounting the cd drive and selecting iso images option box n selecting cpio files from d: drive.  but  i m not able to mount cd rom as it is giving this error:
the device is write protected mounting read only and mount:you must specify the file system.


i tried the command mentioned above....this is giving same error....bad fstype..bad option...write protected..etc...
0
 
PhreonxCommented:
Hello,
"how to check whether the cdrom is installed on hdc?"

try:
   dmesg | grep ROM

this covers both CD-ROM drives and DVD-ROM drives. You should get something like:

hdc: DVDROM <Virtual CD/> at... Use the hdc entry and mount the drive as ravenpl suggested. I will simply quote his words:

  mount -t iso9660 /dev/hdc /mnt/cdrom

If the /mnt/cdrom does not exist, create it or create a mountpoint wherever you wish:

  mkdir /home/dvd
  mount -t iso9660 /dev/hdc /home/dvd

Hope that helped ;)
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
aman_grevalAuthor Commented:
Thanks Mr. genious , it works...

:-)

But
surely i will come here with a new problem soon....
0
 
rindiCommented:
The "Write Protected" message you get is correct for CD and DVD drives, and that also suggests you are using the correct /dev/hdc for it. What does your /etc/fstab show? Probably you just need to make sure that the iso9660 is correct in there (The above mount command of raven should allow you to mount it, but I'd edit the fstab file so it is correctly set. Usually you can also replace iso9660 with auto, which will give you more options.
0
 
PhreonxCommented:
Glad it works ;) Please close this question and allocate the points as you see fit.

Thanks
0
 
aman_grevalAuthor Commented:
hi phreonx and rindi
 I m reopening this...as the same command to mount the cdrom that worked last day is giving same error today..
wrong fstype bad option bad superblock on /dev/hdc

i m issuing
mount -t iso9660 /dev/hdc /media/cdrom

As this was what i issued last time.. n my fstab also displays the same
that is
hdc   /media/cdrom


Pls help
0
 
PhreonxCommented:
Hello,
that is odd. Try creating an iso image of your cd. Place the CD into the CDROM tray and type the following:

  dd if=/dev/hdc of=TempCD.iso

and as root try mount it like this:

  mount -t iso9660 -o loop /path/to/TempCD.iso /media/cdrom

See if that works for you.
0
 
rindiCommented:
Edit the fstab to have the following entries:

/dev/hdc    /media/cdrom    auto    users,noauto     0 0

and then just try mount /dev/hdc
0
 
aman_grevalAuthor Commented:
the entry in fstab is:
/dev/hdc /media/cdrom pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
shd i change it
0
 
rindiCommented:
between the /media/cdrom and the pamconsole add some spaces, then add auto and then some more spaces. Auto should select the correct filesystem (you can also use iso9660 but auto will be able to mount others as well) after that it should work. Make sure there is no other entry for /dev/hdc inside fstab!
0
 
PhreonxCommented:
Hello aman_greval,
did you try implement my solution or is it not what you're after? If that's the case then rindi's pointing you to the right direction.
0
 
aman_grevalAuthor Commented:
hi rindi,
i tried this fstab has none other entry of dev/hdc
now my fstab entry looks like
/dev/hdc          /media/cdrom        auto      pamconsole     0  0
Is this ok
then i tried
mount -t iso9660 /dev/hdc /media/cdrom

It says..
media is write protected mounting read only
mount: bad option,bad superblock on /dev/hdc, wrong fs type or too many mounted file systems...


Phreonx
I tried ur solution
after issuing  dd if=/dev/hdc of=TempCD.iso
it shows me some no. of blocks..
then
 mount -t iso9660 -o loop /path/to/TempCD.iso /media/cdrom
it says
path no such directory

I m in root user at / dir


0
 
PhreonxCommented:
First try umounting:

  umount -f /media/cdrom

which since nothing is mounted will return an error. But just to be on the safe side. Then mount like this:

  mount -t tmpfs /dev/hdc /media/cdrom
0
 
rindiCommented:
first try unmounting like phroenix says, then use the mount command like this:

mount /dev/hdc

without any other options, as these are now included inside fstab.
0
 
PhreonxCommented:
I just noticed what you posted:
"then
 mount -t iso9660 -o loop /path/to/TempCD.iso /media/cdrom
it says
path no such directory"

First, you were supposed to replace the "/path/to/TempCD.iso" with the actual path that contains the .iso image you created with the command
  dd if=/dev/hdc of=TempCD.iso

That's why it returned "path no such directory"

Second, if the mount -t tmpfs /dev/hdc /media/cdrom does not work either then [and I apologise to rindi for this] comment out the entry:

  /dev/hdc          /media/cdrom        auto      pamconsole     0  0 like this
#  /dev/hdc          /media/cdrom        auto      pamconsole     0  0

from your fstab. Restart your vm and try to mount manually using the technique we pointed out earlier:
 
  mount -t iso9660 /dev/hdc /media/cdrom
0
 
PhreonxCommented:
To add on my previous comment, I'm proposing to comment out the entry from fstab and mount manually because you reported:

mount: bad option,bad superblock on /dev/hdc, wrong fs type or too many mounted file systems...
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 7
  • 5
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now