problem mounting cdrom once linux is running -- more information

problem mounting cdrom once linux is running -- more information

Post by cout.. » Fri, 11 Aug 1995 04:00:00



  ...
  | Finally, Fabien suggested I try executing the following three command
  | sequences with "the unmountable cdrom, you should try the following with no
  | cdrom mounted"
  |      
  |         dd if=/dev/hdc of=/tmp/foo bs=1k count=256 || echo Failed
  |         file /tmp/foo
  |         od -x /tmp/foo | head -10

  | I executed these three commands immediately after the mount command that
  | gave the error message reported ~10 lines above - before I did, however, I
  | ran mount and observed that /cdrom was not listed, and ran umount and was
  | told there was no /cdrom to unmount.  Then, I ran the commands as root using
  | the bash shell.  The first command gave:

  |     256+0 records in
  |     256+0 records out

  | The second command gave:

  |     /tmp/foo: ascii text

  | The third command gave:

  |     0000000 0000 0000 0000 0000 0000 0000 0000 0000
  |     *
  |     0100000 4301 3044 3130 0001 494c 554e 2058 2020
  |     0100020 2020 2020 2020 2020 2020 2020 2020 2020
  |     0100040 2020 2020 2020 2020 4c53 4341 5f4b 3630
  |     0100060 3539 325f 2020 2020 2020 2020 2020 2020
  |     0100100 2020 2020 2020 2020 0000 0000 0000 0000
  |     0100120 0634 0005 0500 3406 0000 0000 0000 0000
  |     0100140 0000 0000 0000 0000 0000 0000 0000 0000
  |     0100160 0000 0000 0000 0000 0001 0100 0001 0100
  |     Broken pipe
  |    
  | Any ideas?

I tried this myself on my system yesterday evening, and I obtained quite
the same starting bytes for a valid mountable cdrom:
        at position 32k, string "\001CD001\001\000"
which leads me to think your cdrom is perfectly good (as you mention too)
and that you must have either a driver problem or your cdrom not detecting
cd changes.

My last chance suggestions:
        + kernel update to the last 1.2.xx
        + try booting with no CD in the drive, if your installation is
          able to boot only with HDs (add "noauto" to the options in
          /etc/fstab for your cdrom line)

  | Thanks.


Good luck,
Fabien.

--

,---------------------------.
| Fabien COUTANT            |
| Steria                    |
| 12, rue Paul DAUTIER      |
| 78140 VELIZY VILLACOUBLAY |
| FRANCE                    |
`---------------------------'

 
 
 

problem mounting cdrom once linux is running -- more information

Post by Keith Fark » Fri, 11 Aug 1995 04:00:00



response to my message about mounting problems once linux has booted.  I
hope some system gurus can shed some light on this very annoying problem.
Many thanks in advance.

In my original message, I wrote that once the system had booted, and entered
multiuser mode, I was able to log in.  Once logged in, the mount command
reported that the cdrom in the cdrom drive had been mounted.  In my post, I
failed to add that I COULD cd to /cdrom (the mount point), view files,
execute them, etc.

In my original message I wrote that I could not then umount this cdrom and
mount another valid cdrom disk. I failed to mention that I knew the second
disk was valid because it would mount just fine if it was in the drive when
I booted the machine.

Following up on one of Fabien's suggestions, I tried the following
experiment:

   Once Linux was up and running, I logged in as root, and umounted the
   cdrom.  Then, without ejecting the disk, I remounted the disk using
   "mount /cdrom". The mount command succeeded, and I was able to cd to
   the disk and do ls.  Then, I again did a "umount /cdrom", but this time,
   I pressed the "eject" button on the cdrom drive, LEFT the just-ejected
   disk in the tray, pressed the "eject" button again, and finally tried a
   "mount /cdrom".  This time, mount did not work, and I got:

        mount: wrong fs type or bad superblock on /dev/hdc

Finally, Fabien suggested I try executing the following three command
sequences with "the unmountable cdrom, you should try the following with no
cdrom mounted"

        dd if=/dev/hdc of=/tmp/foo bs=1k count=256 || echo Failed
        file /tmp/foo
        od -x /tmp/foo | head -10

I executed these three commands immediately after the mount command that
gave the error message reported ~10 lines above - before I did, however, I
ran mount and observed that /cdrom was not listed, and ran umount and was
told there was no /cdrom to unmount.  Then, I ran the commands as root using
the bash shell.  The first command gave:

        256+0 records in
        256+0 records out

The second command gave:

        /tmp/foo: ascii text

The third command gave:

        0000000 0000 0000 0000 0000 0000 0000 0000 0000
        *
        0100000 4301 3044 3130 0001 494c 554e 2058 2020
        0100020 2020 2020 2020 2020 2020 2020 2020 2020
        0100040 2020 2020 2020 2020 4c53 4341 5f4b 3630
        0100060 3539 325f 2020 2020 2020 2020 2020 2020
        0100100 2020 2020 2020 2020 0000 0000 0000 0000
        0100120 0634 0005 0500 3406 0000 0000 0000 0000
        0100140 0000 0000 0000 0000 0000 0000 0000 0000
        0100160 0000 0000 0000 0000 0001 0100 0001 0100
        Broken pipe

Any ideas?

Thanks.



 
 
 

problem mounting cdrom once linux is running -- more information

Post by Keith Fark » Fri, 11 Aug 1995 04:00:00


Quote:>My last chance suggestions:
>    + kernel update to the last 1.2.xx

I am using version 1.2.8 and I had the same trouble with the earlier version
that shipped with the Yggdrasil fall 1994 disks.

I recall reading in the Yggdrasil manual that the idecd device driver would
NOT work with CDROMs which where the master device on an IDE chain.  Am I
remember incorrectly?  Could this fact be the source of my trouble?

Quote:>    + try booting with no CD in the drive, if your installation is
>      able to boot only with HDs (add "noauto" to the options in
>      /etc/fstab for your cdrom line)

I have tried booting with no CD with the same effect, namely, not being able
to mount a CDROM.

I have also noticed the following behavior.

Suppose I boot linux with a CDROM in the drive, and then list the directory
of the cdrom.  Then, without unmounting the cdrom disk, I replace the disk in
the cdrom drive with another valid disk (that is, I don't use umount and
then mount).  If I then list the directory of the cdrom, the same listing as
before comes up.

Obviously, the directory of the first disk is being cached by the operating
system.  My question is whether this caching could be to blame.

thanks.

        -keith

 
 
 

problem mounting cdrom once linux is running -- more information

Post by United Communtcations Systems In » Fri, 11 Aug 1995 04:00:00



: response to my message about mounting problems once linux has booted.  I
: hope some system gurus can shed some light on this very annoying problem.
: Many thanks in advance.

: In my original message, I wrote that once the system had booted, and entered
: multiuser mode, I was able to log in.  Once logged in, the mount command
: reported that the cdrom in the cdrom drive had been mounted.  In my post, I
: failed to add that I COULD cd to /cdrom (the mount point), view files,
: execute them, etc.

: In my original message I wrote that I could not then umount this cdrom and
: mount another valid cdrom disk. I failed to mention that I knew the second
: disk was valid because it would mount just fine if it was in the drive when
: I booted the machine.

: Following up on one of Fabien's suggestions, I tried the following
: experiment:

:    Once Linux was up and running, I logged in as root, and umounted the
:    cdrom.  Then, without ejecting the disk, I remounted the disk using
:    "mount /cdrom". The mount command succeeded, and I was able to cd to
:    the disk and do ls.  Then, I again did a "umount /cdrom", but this time,
:    I pressed the "eject" button on the cdrom drive, LEFT the just-ejected
:    disk in the tray, pressed the "eject" button again, and finally tried a
:    "mount /cdrom".  This time, mount did not work, and I got:

:       mount: wrong fs type or bad superblock on /dev/hdc

: Finally, Fabien suggested I try executing the following three command
: sequences with "the unmountable cdrom, you should try the following with no
: cdrom mounted"
:      
:         dd if=/dev/hdc of=/tmp/foo bs=1k count=256 || echo Failed
:         file /tmp/foo
:         od -x /tmp/foo | head -10

: I executed these three commands immediately after the mount command that
: gave the error message reported ~10 lines above - before I did, however, I
: ran mount and observed that /cdrom was not listed, and ran umount and was
: told there was no /cdrom to unmount.  Then, I ran the commands as root using
: the bash shell.  The first command gave:

:       256+0 records in
:       256+0 records out

: The second command gave:

:       /tmp/foo: ascii text

: The third command gave:

:       0000000 0000 0000 0000 0000 0000 0000 0000 0000
:       *
:       0100000 4301 3044 3130 0001 494c 554e 2058 2020
:       0100020 2020 2020 2020 2020 2020 2020 2020 2020
:       0100040 2020 2020 2020 2020 4c53 4341 5f4b 3630
:       0100060 3539 325f 2020 2020 2020 2020 2020 2020
:       0100100 2020 2020 2020 2020 0000 0000 0000 0000
:       0100120 0634 0005 0500 3406 0000 0000 0000 0000
:       0100140 0000 0000 0000 0000 0000 0000 0000 0000
:       0100160 0000 0000 0000 0000 0001 0100 0001 0100
:       Broken pipe
:      
: Any ideas?

: Thanks.


 
 
 

problem mounting cdrom once linux is running -- more information

Post by cout.. » Fri, 11 Aug 1995 04:00:00


  | >My last chance suggestions:
  | >        + kernel update to the last 1.2.xx

  | I am using version 1.2.8 and I had the same trouble with the earlier version
  | that shipped with the Yggdrasil fall 1994 disks.

  | I recall reading in the Yggdrasil manual that the idecd device driver would
  | NOT work with CDROMs which where the master device on an IDE chain.  Am I
  | remember incorrectly?  Could this fact be the source of my trouble?

Though I have never used any distribution, this might be possible.  I seem
to remember there have been some (a lot of ?) problems with ATAPI cdrom
drives from early 1.2.? to 1.2.[89] kernel versions.

I can't tell much because I only got my quad-speed mitsumi not long ago.
I currently use the stock 1.2.10 kernel with no problems at all; have
enabled "secondary IDE interface" and "ATAPI cdrom" support in the
kernel's make config.

  ...
  | I have also noticed the following behavior.

  | Suppose I boot linux with a CDROM in the drive, and then list the directory
  | of the cdrom.  Then, without unmounting the cdrom disk, I replace the disk in
  | the cdrom drive with another valid disk (that is, I don't use umount and
  | then mount).  If I then list the directory of the cdrom, the same listing as
  | before comes up.

  | Obviously, the directory of the first disk is being cached by the operating
  | system.  My question is whether this caching could be to blame.

You're right. Not only the directory BTW, but any block of the filesystem.
Note that if you read your HD with the appropriate "dd" command, so as to fill
your disk cache (e.g. reading as much as your total ram should be enough),
then retry to list your cdrom directory contents, you may have problems
because the filsystem's "superblock" (filesystem global informations) is
always kept in memory for all mounted filesystems, which would imply some
inconsistencies between the superblock (of the old cdrom) and the effective
filesystem (of the new cdrom).

  | thanks.

  |     -keith

Upgrading to kernel 1.2.10 should solve your problems, it is quite stable
at least (didn't test above versions).

I don't recommend 1.3.xx, it is under heavy hacking at the moment...

--

,---------------------------.
| Fabien COUTANT            |
| Steria                    |
| 12, rue Paul DAUTIER      |
| 78140 VELIZY VILLACOUBLAY |
| FRANCE                    |
`---------------------------'

 
 
 

problem mounting cdrom once linux is running -- more information

Post by Andre Fach » Fri, 11 Aug 1995 04:00:00



: response to my message about mounting problems once linux has booted.  I
: hope some system gurus can shed some light on this very annoying problem.
: Many thanks in advance.

I have a maybe related 'problem'. When I change CD, and try to mount it,
the first time it fails most of the times - when I do to fast after
inserting the disk.

I think that the driver detects the disk change and tries to find some
info about the CD. During this time a mount getting into the driver
will still not see a valid CD and you might find it a bug that it will
not detect a change in process and wait.
After a while there is no further problem with mount for me, as the
driver found the CD and updated the internal flags so that mount succeeds.

just my 2 cents.
Andre

--

-------------------------------------| same God who has endowed us with sense,
Distribution of this message via     | reason, and intellect has intended us to
the Microsoft network prohibited.    | forego their use."  -- Galileo Galilei

 
 
 

problem mounting cdrom once linux is running -- more information

Post by Andrew Valinti » Sat, 12 Aug 1995 04:00:00


: Following up on one of Fabien's suggestions, I tried the following
: experiment:

:    Once Linux was up and running, I logged in as root, and umounted the
:    cdrom.  Then, without ejecting the disk, I remounted the disk using
:    "mount /cdrom". The mount command succeeded, and I was able to cd to
:    the disk and do ls.  Then, I again did a "umount /cdrom", but this time,
:    I pressed the "eject" button on the cdrom drive, LEFT the just-ejected
:    disk in the tray, pressed the "eject" button again, and finally tried a
:    "mount /cdrom".  This time, mount did not work, and I got:

:       mount: wrong fs type or bad superblock on /dev/hdc

This really bugs me because you don't accually mention changing directory
out of /cdrom.  I don't think you can umount a file system that you are
in, but I'm not sure thats what your doing. After the ls is there a cd ..

Andrew

 
 
 

problem mounting cdrom once linux is running -- more information

Post by Terrence W Mart » Sat, 12 Aug 1995 04:00:00


: >My last chance suggestions:
: >  + kernel update to the last 1.2.xx

: I am using version 1.2.8 and I had the same trouble with the earlier version
: that shipped with the Yggdrasil fall 1994 disks.

: I recall reading in the Yggdrasil manual that the idecd device driver would
: NOT work with CDROMs which where the master device on an IDE chain.  Am I
: remember incorrectly?  Could this fact be the source of my trouble?

: >  + try booting with no CD in the drive, if your installation is
: >    able to boot only with HDs (add "noauto" to the options in
: >    /etc/fstab for your cdrom line)

: I have tried booting with no CD with the same effect, namely, not being able
: to mount a CDROM.

: I have also noticed the following behavior.

: Suppose I boot linux with a CDROM in the drive, and then list the directory
: of the cdrom.  Then, without unmounting the cdrom disk, I replace the disk in
: the cdrom drive with another valid disk (that is, I don't use umount and
: then mount).  If I then list the directory of the cdrom, the same listing as
: before comes up.

: Obviously, the directory of the first disk is being cached by the operating
: system.  My question is whether this caching could be to blame.

: thanks.

:       -keith

When I first started using Linux I had the same problem. It installed
fine via CD-rom but there was no way I could mount it in Linux. It
took me a bit to realize I had not installed the proper kernel when I
installed linux (no mitsumi support) :-). A proper install or a kernel
upgrade fixed the prolem.

This may not be your answer but I always try to look for the simple
solution.

--

|Terrence Martin, Student at the    |"Do Not Gobble Proferred      |
|University of Saskatchewan         | Baits"                       |

|===================================|==============================|
|Any views expressed are my own and do not reflect on the opinions |
|of any group or organization with which I am affiliated.          |

 
 
 

problem mounting cdrom once linux is running -- more information

Post by Stephen E. Thorse » Tue, 15 Aug 1995 04:00:00




> Newsgroups: comp.os.linux.misc,comp.os.linux.hardware
> Followup-To: comp.os.linux.misc,comp.os.linux.hardware
> Date: 10 Aug 1995 13:33:21 GMT
> Organization: Direction des Etudes et Recherches EDF


>   | >My last chance suggestions:
>   | >   + kernel update to the last 1.2.xx

>   | I am using version 1.2.8 and I had the same trouble with the earlier version
>   | that shipped with the Yggdrasil fall 1994 disks.

>   | I recall reading in the Yggdrasil manual that the idecd device driver would
>   | NOT work with CDROMs which where the master device on an IDE chain.  Am I
>   | remember incorrectly?  Could this fact be the source of my trouble?

> Though I have never used any distribution, this might be possible.  I seem
> to remember there have been some (a lot of ?) problems with ATAPI cdrom
> drives from early 1.2.? to 1.2.[89] kernel versions.

I had exactly the same symptoms as the original poster with a Toshiba
ATAPI drive -- things work fine if the disk is in the drive when linux
boots, but unmounting, ejecting, reinserting, and mounting the CD fails
(in my case with a hung linux).  If they really are the same trouble, then
it isn't the kernel -- I tried all the 1.2.x series through .13, and the
current 1.3.x kernel as well, with no change of behavior.  I could also
hang the system with fast CD accesses (eg, running grep on the document
directory, or running find).  But keeping things slow and steady, I could
read files on the disk all day...  I was using Slackware 2.3.

In the end, I returned the ATAPI drive for a SCSI drive, and have had no
troubles...  

--steve thorsett